ShenMian 当前离线
列兵
@echo off set pingTimes=1 if "%1"=="/?" ( echo Usage: %~n0 [-f filename] [-o filename] domain [-call skip lines ^| -t Threads_NUM All_lines] echo Options: echo -f Dict file used to brute sub names. echo Default:resolvers.txt echo -o Output file name. echo -t Number of threads and lines. rem echo -call emm... echo; echo 20171003 exit /b ) :0 if "%1"=="-f" ( set resolvers=%~2 shift shift goto 0 ) if not defined resolvers set resolvers=resolvers.txt if not exist "%resolvers%" ( echo Can't found "%resolvers%". exit /b ) if "%1"=="-o" ( set output=%~2 shift shift goto 0 ) if not defined output set output=nul set domain=%~1 if "%2"=="-t" ( if "%output%"=="nul" ( echo Output file is not specified. exit /b ) set /a threads=%3-1 set allLines=%4 setlocal enabledelayedexpansion if !threads! lss 0 ( echo Threads leq 0! exit /b ) if !allLines! lss !threads! ( echo All_lines lss Threads_NUM! exit /b ) set /a lines=allLines/(threads+1^) for /l %%a in (1,1,!threads!) do ( set /a skip=%%a*lines start "SubBrute Threads:%%a" subbrute -o "%output%" -f "%resolvers%" %domain% -call !skip! !lines! >nul ) title SubBrute Threads:0 echo All threads are running. ) if "%2"=="-call" ( if "%output%"=="nul" ( echo Output file is not specified. exit /b ) setlocal enabledelayedexpansion set skip=%3 if !skip! leq 0 ( echo Skip leq 0! exit /b ) set times=%4 shift shift shift for /f "usebackq skip=%skip%" %%a in ("%resolvers%") do ( ping /n %pingTimes% %%a.%domain% >nul 2>nul if !errorlevel!==0 ( echo %%a.%domain% echo %%a.%domain% >>"%output%" ) set /a times-=1 if "!times!"=="0" exit ) ) if defined lines setlocal enabledelayedexpansion set scan=0 set found=0 for /f usebackq %%a in ("%resolvers%") do ( ping /n %pingTimes% %%a.%domain% >nul 2>nul if !errorlevel!==0 ( echo %%a.%domain% echo %%a.%domain% >>"%output%" set /a found+=1 ) set /a scan+=1 set /a lines-=1 if !lines!==0 exit ) echo; echo %found% found ^| %scan% sacnned exit /b复制代码
TOP