[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
根据这个改吧,作者QQ:2294394563
  1. @echo off
  2. set pingTimes=1
  3. if "%1"=="/?" (
  4. echo Usage: %~n0 [-f filename] [-o filename] domain [-call skip lines ^| -t Threads_NUM All_lines]
  5. echo Options:
  6. echo     -f     Dict file used to brute sub names.
  7. echo            Default:resolvers.txt
  8. echo     -o     Output file name.
  9. echo     -t     Number of threads and lines.
  10. rem echo     -call  emm...
  11. echo;
  12. echo 20171003
  13. exit /b
  14. )
  15. :0
  16. if "%1"=="-f" (
  17. set resolvers=%~2
  18. shift
  19. shift
  20. goto 0
  21. )
  22. if not defined resolvers set resolvers=resolvers.txt
  23. if not exist "%resolvers%" (
  24. echo Can't found "%resolvers%".
  25. exit /b
  26. )
  27. if "%1"=="-o" (
  28. set output=%~2
  29. shift
  30. shift
  31. goto 0
  32. )
  33. if not defined output set output=nul
  34. set domain=%~1
  35. if "%2"=="-t" (
  36. if "%output%"=="nul" (
  37. echo Output file is not specified.
  38. exit /b
  39. )
  40. set /a threads=%3-1
  41. set allLines=%4
  42. setlocal enabledelayedexpansion
  43. if !threads! lss 0 (
  44. echo Threads leq 0!
  45. exit /b
  46. )
  47. if !allLines! lss !threads! (
  48. echo All_lines lss Threads_NUM!
  49. exit /b
  50. )
  51. set /a lines=allLines/(threads+1^)
  52. for /l %%a in (1,1,!threads!) do (
  53. set /a skip=%%a*lines
  54. start "SubBrute Threads:%%a" subbrute -o "%output%" -f "%resolvers%" %domain% -call !skip! !lines! >nul
  55. )
  56. title SubBrute Threads:0
  57. echo All threads are running.
  58. )
  59. if "%2"=="-call" (
  60. if "%output%"=="nul" (
  61. echo Output file is not specified.
  62. exit /b
  63. )
  64. setlocal enabledelayedexpansion
  65. set skip=%3
  66. if !skip! leq 0 (
  67. echo Skip leq 0!
  68. exit /b
  69. )
  70. set times=%4
  71. shift
  72. shift
  73. shift
  74. for /f "usebackq skip=%skip%" %%a in ("%resolvers%") do (
  75. ping /n %pingTimes% %%a.%domain% >nul 2>nul
  76. if !errorlevel!==0 (
  77. echo %%a.%domain%
  78. echo %%a.%domain% >>"%output%"
  79. )
  80. set /a times-=1
  81. if "!times!"=="0" exit
  82. )
  83. )
  84. if defined lines setlocal enabledelayedexpansion
  85. set scan=0
  86. set found=0
  87. for /f usebackq %%a in ("%resolvers%") do (
  88. ping /n %pingTimes% %%a.%domain% >nul 2>nul
  89. if !errorlevel!==0 (
  90. echo %%a.%domain%
  91. echo %%a.%domain% >>"%output%"
  92. set /a found+=1
  93. )
  94. set /a scan+=1
  95. set /a lines-=1
  96. if !lines!==0 exit
  97. )
  98. echo;
  99. echo %found% found ^| %scan% sacnned
  100. exit /b
复制代码

TOP

返回列表