Advertisement
e01

wifi password recovery

e01
Apr 28th, 2018
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.82 KB | None | 0 0
  1.         set "ssid=%%a"
  2.         set "ssid=!ssid:~1!"
  3.         call :Getpassword "!ssid!"
  4.     )
  5. )
  6. echo(
  7. echo Done
  8. If exist "%PasswordLog%" start "" "%PasswordLog%"
  9. pause>nul
  10. exit
  11. ::*************************************************************************************
  12. :Getpassword
  13. set "name=%1"
  14. set "name=!name:"=!"
  15. Set "passwd="
  16. for /f "delims=: tokens=2" %%a in ('netsh wlan show profiles %1 key^=clear ^|find /I "Cont"') do (
  17.     set "passwd=%%a"
  18.     Set /a Count+=1
  19. )
  20.  
  21. If defined passwd (
  22.     set passwd=!passwd:~1!
  23.     echo                  [!Count!][!name!] ====^> "!passwd!"
  24.     echo                  [!Count!][!name!] ====^> "!passwd!" >> "%PasswordLog%"
  25. ) else (
  26.     Set /a Count+=1
  27. call :color 0C "                 [!Count!][!name!] The Password is empty" 1
  28.     echo                  [!Count!][!name!] The Password is empty >> "%PasswordLog%"
  29. )
  30. exit /b
  31. ::*************************************************************************************
  32. :init
  33. prompt $g
  34. for /F "delims=." %%a in ('"prompt $H. & for %%b in (1) do rem"') do set "BS=%%a"
  35. exit /b
  36. ::*************************************************************************************
  37. :color
  38. set nL=%3
  39. if not defined nL echo requires third argument & pause > nul & goto :eof
  40. if %3 == 0 (
  41.    <nul set /p ".=%bs%">%2 & findstr /v /a:%1 /r "^$" %2 nul & del %2 2>&1 & goto :eof
  42. ) else if %3 == 1 (
  43.    echo %bs%>%2 & findstr /v /a:%1 /r "^$" %2 nul & del %2 2>&1 & goto :eof
  44. )
  45. exit /b
  46. ::*************************************************************************************
  47. :CountLines
  48. for /f "skip=2 delims=: tokens=2" %%a in ('netsh wlan show profiles') do (
  49.    if not "%%a"=="" (
  50.         set /a L+=1
  51.     )
  52. )
  53. set /a L=!L! + 10
  54. Set Mod=Mode con cols=75 Lines=!L!
  55. exit /b
  56. ::*************************************************************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement