Advertisement
NewBestPastebins

Network Tool (Password Retriever)

Jan 7th, 2025
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.80 KB | None | 0 0
  1. @echo off
  2. chcp 65001 >nul
  3. cls
  4. title Network Tool
  5. color a
  6.  
  7. :MENU
  8. cls
  9. echo. ███╗ ██╗███████╗████████╗██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗ ████████╗ ██████╗ ██████╗ ██╗
  10. echo. ████╗ ██║██╔════╝╚══██╔══╝██║ ██║██╔═══██╗██╔══██╗██║ ██╔╝ ╚══██╔══╝██╔═══██╗██╔═══██╗██║
  11. echo. ██╔██╗ ██║█████╗ ██║ ██║ █╗ ██║██║ ██║██████╔╝█████╔╝ ██║ ██║ ██║██║ ██║██║
  12. echo. ██║╚██╗██║██╔══╝ ██║ ██║███╗██║██║ ██║██╔══██╗██╔═██╗ ██║ ██║ ██║██║ ██║██║
  13. echo. ██║ ╚████║███████╗ ██║ ╚███╔███╔╝╚██████╔╝██║ ██║██║ ██╗ ██║ ╚██████╔╝╚██████╔╝███████╗
  14. echo. ╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚══╝╚══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝
  15. echo.
  16. echo Listing all connected networks:
  17. echo.
  18. echo.════════════════════════════════════════════
  19. netsh wlan show profiles | findstr "All User Profile"
  20. echo.════════════════════════════════════════════
  21. echo.
  22. set /p wifiname=Enter WiFi Name (SSID) or "all":
  23.  
  24. if /i "%wifiname%"=="all" (
  25. cls
  26. echo Retrieving wifi passwords from all connected SSID's:
  27. timeout /t 1 >nul
  28. set outputFile=wifi_passwords.txt
  29. echo Wi-Fi Networks and Passwords > "%outputFile%"
  30. echo ------------------------------------------ >> "%outputFile%"
  31. for /f "tokens=*" %%i in ('netsh wlan show profiles ^| findstr "All User Profile"') do (
  32. for /f "tokens=2 delims=:" %%j in ('echo %%i') do (
  33. set "profile=%%j"
  34. setlocal enabledelayedexpansion
  35. set "profile=!profile:~1!"
  36. endlocal
  37. call :showPassword "!profile!"
  38. )
  39. )
  40. echo All passwords have been saved in "%outputFile%" and copied to clipboard.
  41. type "%outputFile%" | clip
  42. pause
  43. goto MENU
  44. ) else (
  45. cls
  46. echo Retrieving password for "%wifiname%":
  47. timeout /t 1 >nul
  48. netsh wlan show profiles name="%wifiname%" key=clear | findstr "Key Content" > temp.txt
  49. type temp.txt | clip
  50. echo Password copied to clipboard and saved in "temp.txt"
  51. timeout /t 1 >nul
  52. cls
  53. echo Password retrieved:
  54. netsh wlan show profiles name="%wifiname%" key=clear | findstr "Key Content"
  55. del temp.txt
  56. pause
  57. goto MENU
  58. )
  59.  
  60. :showPassword
  61. setlocal enabledelayedexpansion
  62. set "profileName=%1"
  63. echo Network: !profileName! >> "%outputFile%"
  64. for /f "tokens=*" %%k in ('netsh wlan show profile name^="!profileName!" key^=clear ^| findstr "Key Content"') do (
  65. for /f "tokens=2 delims=:" %%l in ('echo %%k') do (
  66. set "password=%%l"
  67. setlocal enabledelayedexpansion
  68. set "password=!password:~1!"
  69. echo Password: !password! >> "%outputFile%"
  70. echo Network: !profileName!, Password: !password!
  71. endlocal
  72. )
  73. )
  74. endlocal
  75. goto :eof
  76.  
  77.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement