Advertisement
NewBestPastebins

Network tool

Dec 23rd, 2024 (edited)
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. @echo off
  2. title Internet Password-logger
  3. color a
  4. :MENU
  5. cls
  6. echo ================================
  7. echo WiFi Network Menu
  8. echo ================================
  9. echo Listing all connected networks:
  10. netsh wlan show profiles
  11. echo ================================
  12. set /p wifiname=Enter WiFi Name (SSID) or "all":
  13.  
  14. if /i "%wifiname%"=="all" (
  15. cls
  16. echo Running tree for visual effect...
  17. tree
  18. echo ================================
  19. echo Displaying all networks and passwords:
  20. del temp.txt >nul 2>&1
  21. for /f "tokens=*" %%i in ('netsh wlan show profiles ^| findstr ":"') do (
  22. for /f "tokens=2 delims=: " %%j in ("%%i") do (
  23. call :showPassword "%%j"
  24. )
  25. )
  26. echo ================================
  27. echo All passwords have been copied to the clipboard.
  28. type temp.txt | clip
  29. del temp.txt >nul 2>&1
  30. pause
  31. goto MENU
  32. ) else (
  33. cls
  34. echo Running tree for visual effect...
  35. tree
  36. echo ================================
  37. echo Retrieving password for "%wifiname%":
  38. netsh wlan show profiles name="%wifiname%" key=clear | findstr "Key Content" > temp.txt
  39. type temp.txt
  40. type temp.txt | clip
  41. del temp.txt >nul 2>&1
  42. echo ================================
  43. echo Password copied to clipboard.
  44. pause
  45. goto MENU
  46. )
  47.  
  48. :showPassword
  49. setlocal enabledelayedexpansion
  50. set "profileName=%~1"
  51. echo WiFi: !profileName! >> temp.txt
  52. echo WiFi: !profileName!
  53. netsh wlan show profile name="!profileName!" key=clear | findstr "Key Content" >> temp.txt
  54. netsh wlan show profile name="!profileName!" key=clear | findstr "Key Content"
  55. endlocal
  56. exit /b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement