40 lines
1.2 KiB
Batchfile
40 lines
1.2 KiB
Batchfile
@echo off
|
|
title Build rdpthread.exe
|
|
cd /d "%~dp0"
|
|
|
|
echo.
|
|
echo ╔════════════════════════════════════════════════════════╗
|
|
echo ║ Building rdpthread.exe - RDP Credential Validator ║
|
|
echo ╚════════════════════════════════════════════════════════╝
|
|
echo.
|
|
|
|
:: Find the C# compiler
|
|
set CSC=
|
|
for %%d in (v4.0.30319 v3.5 v2.0.50727) do (
|
|
if exist "%windir%\Microsoft.NET\Framework\%%d\csc.exe" (
|
|
set CSC="%windir%\Microsoft.NET\Framework\%%d\csc.exe"
|
|
goto :compile
|
|
)
|
|
)
|
|
|
|
echo [FAIL] C# compiler (csc.exe) not found!
|
|
echo Install .NET Framework SDK or Visual Studio Build Tools.
|
|
pause
|
|
exit /b 1
|
|
|
|
:compile
|
|
echo [*] Found C# compiler: %CSC%
|
|
echo [*] Compiling rdpthread.cs...
|
|
%CSC% /target:exe /out:rdpthread.exe /nologo rdpthread.cs
|
|
if %errorlevel% neq 0 (
|
|
echo [FAIL] Compilation failed
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo [OK] rdpthread.exe built successfully
|
|
echo.
|
|
echo Usage: rdpthread.exe ^<ip^> ^<port^> ^<username^> ^<password^>
|
|
echo.
|
|
pause
|