hackoo

Wifi Passwords Recovery.bat

Apr 2nd, 2017
3,820
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off & setlocal enabledelayedexpansion
  2. Set "Copyright=by Hackoo 2017"
  3. Title  %~n0 %Copyright%
  4. Mode con cols=75 lines=8
  5. cls & color 0A & echo.
  6.     echo             ***********************************************
  7.     echo                 %~n0 %Copyright%
  8.     echo             ***********************************************
  9.     echo(
  10. if _%1_==_Main_  goto :Main
  11. Set Count=0
  12. Set L=0
  13. :getadmin
  14.     echo               %~nx0 : self elevating
  15.     set vbs=%temp%\getadmin.vbs
  16. (
  17.     echo Set UAC = CreateObject^("Shell.Application"^)
  18.     echo UAC.ShellExecute "%~s0", "Main %~sdp0 %*", "", "runas", 1
  19. )> "%vbs%"
  20.     "%temp%\getadmin.vbs"
  21.     del "%temp%\getadmin.vbs"
  22. goto :eof
  23. ::*************************************************************************************
  24. :Main
  25. Call :init
  26. Call :CountLines
  27. Set "PasswordLog=%~dp0Wifi_Passwords_on_%ComputerName%.txt"
  28. %Mod%
  29.     echo(
  30.     echo             ***********************************************
  31.     echo                 %~n0 %Copyright%
  32.     echo             ***********************************************
  33.     echo(
  34. Call :Color 0E "                 [N][SSID] ================ Password" 1
  35. echo(
  36. (
  37.     echo             ***********************************************
  38.     echo                 %~n0 %Copyright%
  39.     echo             ***********************************************
  40.     echo(
  41.     echo                  [N][SSID] ==============^> "Password"
  42.     echo(
  43.    
  44. )>"%PasswordLog%"
  45. for /f "skip=2 delims=: tokens=2" %%a in ('netsh wlan show profiles') do (
  46.     if not "%%a"=="" (
  47.         set "ssid=%%a"
  48.         set "ssid=!ssid:~1!"
  49.         call :Getpassword "!ssid!"
  50.     )
  51. )
  52. echo(
  53. echo Done
  54. If exist "%PasswordLog%" start "" "%PasswordLog%"
  55. pause>nul
  56. exit
  57. ::*************************************************************************************
  58. :Getpassword
  59. set "name=%1"
  60. set "name=!name:"=!"
  61. Set "passwd="
  62. for /f "delims=: tokens=2" %%a in ('netsh wlan show profiles %1 key^=clear ^|find /I "Cont"') do (
  63.     set "passwd=%%a"
  64.     Set /a Count+=1
  65. )
  66.  
  67. If defined passwd (
  68.     set passwd=!passwd:~1!
  69.     echo                  [!Count!][!name!] ====^> "!passwd!"
  70.     echo                  [!Count!][!name!] ====^> "!passwd!" >> "%PasswordLog%"
  71. ) else (
  72.     Set /a Count+=1
  73. call :color 0C "                 [!Count!][!name!] The Password is empty" 1
  74.     echo                  [!Count!][!name!] The Password is empty >> "%PasswordLog%"
  75. )
  76. exit /b
  77. ::*************************************************************************************
  78. :init
  79. prompt $g
  80. for /F "delims=." %%a in ('"prompt $H. & for %%b in (1) do rem"') do set "BS=%%a"
  81. exit /b
  82. ::*************************************************************************************
  83. :color
  84. set nL=%3
  85. if not defined nL echo requires third argument & pause > nul & goto :eof
  86. if %3 == 0 (
  87.    <nul set /p ".=%bs%">%2 & findstr /v /a:%1 /r "^$" %2 nul & del %2 2>&1 & goto :eof
  88. ) else if %3 == 1 (
  89.    echo %bs%>%2 & findstr /v /a:%1 /r "^$" %2 nul & del %2 2>&1 & goto :eof
  90. )
  91. exit /b
  92. ::*************************************************************************************
  93. :CountLines
  94. for /f "skip=2 delims=: tokens=2" %%a in ('netsh wlan show profiles') do (
  95.    if not "%%a"=="" (
  96.         set /a L+=1
  97.     )
  98. )
  99. set /a L=!L! + 10
  100. Set Mod=Mode con cols=75 Lines=!L!
  101. exit /b
  102. ::*************************************************************************************
RAW Paste Data