passlogic.bat
@echo off
set LINE[1]= dBBBBBb dBBBBBb .dBBBBP.dBBBBP dBP dBBBBP dBBBBb dBP dBBBP
set LINE[2]= dB' BB BP BP dBP.BP
set LINE[3]= dBBBP' dBP BB `BBBBb `BBBBb dBP dBP.BP dBBBB dBP dBP
set LINE[4]= dBP dBP BB dBP dBP dBP dBP.BP dB' BB dBP dBP
set LINE[5]= dBP dBBBBBBBdBBBBP'dBBBBP' dBBBBP dBBBBP dBBBBBB dBP dBBBBP
set SELF=%~n0
set FILE=%TEMP%\%SELF%.%RANDOM%
set USERNAME=(Basic 認証:ユーザー名)
set PASSWORD=(Basic 認証:パスワード)
set HOST=(ホスト)
set PORT=(ポート番号)
set U=(ユーザー名)
set P=
set X=(パターン:以下の表をもとに「1 16 29 20 33 36」のように半角空白を区切り文字として設定)
:: ------------------ ------------------ ------------------
:: 1 2 3 4 17 18 19 20 33 34 35 36
:: ------------------ ------------------ ------------------
:: 5 6 7 8 21 22 23 24 37 38 39 40
:: ------------------ ------------------ ------------------
:: 9 10 11 12 25 26 27 28 41 42 43 44
:: ------------------ ------------------ ------------------
:: 13 14 15 16 29 30 31 32 45 46 47 48
:: ------------------ ------------------ ------------------
setlocal enabledelayedexpansion
echo.
for /l %%i in (1, 1, 5) do (echo !LINE[%%i]!)
echo.
echo Gathering information, please wait ...
curl -s -u %USERNAME%:%PASSWORD% "https://%HOST%:%PORT%/xxxxx/xxxxx?xxxxx=%U%&xxxxx=xxxxx" > %FILE%
if %ERRORLEVEL% neq 0 (
echo An error has been occurred: curl >&2
exit /b 1
)
if not exist "%FILE%" (
echo File not found: %FILE% >&2
exit /b 1
)
set n=
set i=1
set t=
for /f "tokens=*" %%i in ('findstr "randamNumberBoxRadius" %FILE%') do (
set t=%%i
set t=!t:^</p^>^</div^>^</td^>=!
for /f "tokens=4 delims=^>" %%j in ("!t!") do (set n[!i!]=%%j)
set /a i+=1
)
if exist "%FILE%" (del %FILE% > NUL 2>&1)
for %%i in (%X%) do (set P=!P!!n[%%i]!)
set /p ="%P%" < NUL | clip
echo.
echo ^ P: %P%
echo.
set /p =Press any key to close this window.
endlocal
