Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @goto :batch
- =========================================================================================
- look at this file's code, doing this is so simple
- theres litterally a command for exporting your wifi
- setting into a file and leaving the wifi nets pass
- un-encrypted in that file lol
- this is WiFiPass.cmd update 4
- the difference between update3 and update4 is update4 works on wifi-network names
- that have spaces in them and all previous versions dont
- by ImDeepWithWindows from http://hackforums.net
- newest version of this App can be found at http://batch.nhserver.ml
- if there are any updates made to it
- =========================================================================================
- :batch
- @echo off
- title %~n0
- echo. >"%homedrive%\AdminPriv.test"
- if exist "%homedrive%\AdminPriv.test" goto :has_uac_elev
- cls
- echo.requesting UAC elevation ...
- echo.set x = createobject("shell.application")>"%temp%\uacelev.vbs"
- echo.x.shellexecute "%comspec%","/D /C "^&chr("34")^&"@%~dpnx0"^&chr("34"),"%homedrive%\","runas",1 >>"%temp%\uacelev.vbs"
- echo.x.shellexecute "%comspec%","/D /C @del /f /q "^&chr("34")^&wscript.scriptfullname^&chr("34"),"%homedrive%\","open",0 >>"%temp%\uacelev.vbs"
- start "" "%temp%\uacelev.vbs"
- exit
- :has_uac_elev
- del /f /q "%homedrive%\AdminPriv.test" >nul
- for /f "tokens=5" %%A in ('netsh wlan show int') do if "%%A"=="(wlansvc)" (
- echo.--
- echo.You're computer is not set-up to be able to connect to WiFi,
- echo.so there is no WiFi-password to show because you aren't
- echo.connected to WiFi.
- goto :nxt_c
- )
- for /f "tokens=3,4,5" %%A in ('netsh wlan show int') do (
- if /I "%%A %%B %%C"=="no wireless interface" (
- echo.--
- echo.This computer doesn't have the hardware needed to
- echo.connect to WiFi, so there is no WiFi-password to show
- echo.such it isn't connected to WiFi.
- goto :nxt_c
- )
- )
- mkdir "%temp%\ForTempXMLfile" >nul
- for /f "tokens=1,* delims=: skip=8" %%A in ('netsh wlan show int') do set "currnetwork=%%B" & goto :nxt_a
- :nxt_a
- set "currnetwork=%currnetwork:~1%"
- netsh wlan export profile name="%currnetwork%" folder="%temp%\ForTempXMLfile" key=clear >nul
- for /f "tokens=*" %%a in ('dir /b %temp%\ForTempXMLfile\') do set "currfile=%%a"
- for /f "tokens=2 delims=^> skip=21" %%a in ('type %temp%\ForTempXMLfile\%currfile%') do set "networkpass=%%a" & goto :nxt_b
- :nxt_b
- set "networkpass=%networkpass:</keyMaterial=%"
- del /f /q "%temp%\ForTempXMLfile\*" >nul
- rmdir "%temp%\ForTempXMLfile" >nul
- cls
- echo.
- echo.--
- if "%currnetwork%"=="Notstarted" echo.this computer is not connected to a WiFi network right now &goto :nxt_c
- echo.Network-Name: [ "%currnetwork%" ]
- echo.Network-Password: [ "%networkpass%" ]
- :nxt_c
- echo.--
- echo.
- echo.
- echo.tap ^<space^> to close
- pause >nul
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement