Build rdpthread.exe - RDP credential validator (C# via WNetAddConnection2)

This commit is contained in:
drjones
2026-05-06 16:31:32 -07:00
parent f0f14b2129
commit 225b787a1f
5 changed files with 296 additions and 9 deletions

View File

@@ -20,7 +20,7 @@ echo Made for doom by drjones.
echo.
:: ── STEP 1: CHECK PYTHON ────────────────────────────────────
echo [*] Step 1/6 — Checking Python...
echo [*] Step 1/7 — Checking Python...
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo.
@@ -37,7 +37,7 @@ echo [OK] Python %pyver% found
echo.
:: ── STEP 2: INSTALL DEPENDENCIES ────────────────────────────
echo [*] Step 2/6 — Installing dependencies (aiohttp, aiohttp-socks, paramiko)...
echo [*] Step 2/7 — Installing dependencies (aiohttp, aiohttp-socks, paramiko)...
echo.
python -m pip install --upgrade pip -q
python -m pip install aiohttp aiohttp-socks paramiko -q
@@ -49,14 +49,14 @@ if %errorlevel% neq 0 (
echo.
:: ── STEP 3: CREATE DIRECTORIES ──────────────────────────────
echo [*] Step 3/6 — Creating directories...
echo [*] Step 3/7 — Creating directories...
if not exist "wordlists" mkdir wordlists
if not exist "results" mkdir results
echo [OK] Directories ready
echo.
:: ── STEP 4: VERIFY FILES ────────────────────────────────────
echo [*] Step 4/6 — Verifying project files...
echo [*] Step 4/7 — Verifying project files...
set FILES=main.py gui.py scanner.py bruteforce.py ip_utils.py proxy.py
set ALL_OK=1
for %%f in (%FILES%) do (
@@ -73,8 +73,39 @@ if not exist "results\good.txt" (
)
echo.
:: ── STEP 5: TEST IMPORTS ────────────────────────────────────
echo [*] Step 5/6Testing imports...
:: ── STEP 5: BUILD RDPTHREAD ─────────────────────────────────
echo [*] Step 5/7Building rdpthread.exe (credential validator)...
if exist "rdpthread.cs" (
if not exist "rdpthread.exe" (
echo [*] Compiling rdpthread.cs...
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 :build_rdp
)
)
echo [WARN] C# compiler not found — rdpthread.exe not built
echo Credential validation will use banner-only fallback
goto :skip_build
:build_rdp
%CSC% /target:exe /out:rdpthread.exe /nologo rdpthread.cs >nul 2>&1
if exist "rdpthread.exe" (
echo [OK] rdpthread.exe built successfully
) else (
echo [WARN] rdpthread.exe build failed — using banner-only fallback
)
) else (
echo [OK] rdpthread.exe already exists
)
) else (
echo [WARN] rdpthread.cs not found — using banner-only fallback
)
:skip_build
echo.
:: ── STEP 6: TEST IMPORTS ────────────────────────────────────
echo [*] Step 6/7 — Testing imports...
python -c "from scanner import scan_ips, RDP_PORTS, SSH_PORT, check_ssh_banner; from ip_utils import parse_ranges_file; from bruteforce import spray_all_hosts, spray_ssh_single_host, TOP50_PASSWORDS, GUEST_USERNAMES; from proxy import ProxyManager; print(' [OK] All modules loaded')" 2>&1
if %errorlevel% neq 0 (
echo [FAIL] Import test failed. There may be a syntax error.
@@ -84,8 +115,8 @@ if %errorlevel% neq 0 (
echo [OK] All systems nominal
echo.
:: ── STEP 6: LAUNCH ──────────────────────────────────────────
echo [*] Step 6/6 — Launching the Reaper...
:: ── STEP 7: LAUNCH ──────────────────────────────────────────
echo [*] Step 7/7 — Launching the Reaper...
echo.
echo ╔══════════════════════════════════════════════════════════════╗
echo ║ ☠ REAPER v2.0 ☠ ║