Page 1 of 4 1234 LastLast
Results 1 to 10 of 34
  1. #1
    Service Manager 10,000+ Posts
    How to grab Wifi passwords with only 2 commands

    BillyCarpenter's Avatar
    Join Date
    Aug 2020
    Location
    Long Beach, Mississippi
    Posts
    13,300
    Rep Power
    447

    How to grab Wifi passwords with only 2 commands

    I thought this was pretty cool.

    This first command can show us all the wifi profiles stored on a windows pc.

    netsh wlan show profile


    This second command can show us all the wifi passwords

    netsh wlan show profile name="name of wifi" key=clear


    Give it a try.
    Growth is found only in adversity.

  2. #2
    Retired 10,000+ Posts
    How to grab Wifi passwords with only 2 commands

    slimslob's Avatar
    Join Date
    May 2013
    Location
    Bakersfield, CA
    Posts
    33,994
    Rep Power
    983

    Re: How to grab Wifi passwords with only 2 commands

    I use a freeware WiFi password revealer from magic jelly bean. It allows one to export the results to a text of CSV file. As with all freeware use caution and have a good virus protection software.

  3. #3
    Service Manager 5,000+ Posts tsbservice's Avatar
    Join Date
    May 2007
    Posts
    7,012
    Rep Power
    344

    Re: How to grab Wifi passwords with only 2 commands

    Quote Originally Posted by BillyCarpenter View Post
    I thought this was pretty cool.

    This first command can show us all the wifi profiles stored on a windows pc.

    netsh wlan show profile


    This second command can show us all the wifi passwords

    netsh wlan show profile name="name of wifi" key=clear


    Give it a try.
    Sometimes users don't have any clue what the wifi password is. It will help, Thanks Billy.
    A tree is known by its fruit, a man by his deeds. A good deed is never lost, he who sows courtesy, reaps friendship, and he who plants kindness gathers love.

    Blessed are they who can laugh at themselves, for they shall never cease to be amused.

    I don't reply to private messages from end users.

  4. #4
    Field Supervisor 500+ Posts
    How to grab Wifi passwords with only 2 commands

    techsxge's Avatar
    Join Date
    Jan 2022
    Location
    N/A
    Posts
    661
    Rep Power
    28

    Re: How to grab Wifi passwords with only 2 commands

    I mean yeah its a fancy command but not realy practical as you can just click your way through to see the password.

    Anyways, want to do it without user input?
    Code:
    (netsh wlan show profile name="$(netsh wlan show interfaces | Select-String 'SSID' | ForEach-Object { $_ -replace '^\s+SSID\s+: ','' })" key=clear) | Select-String 'Key content'
    Might work, have no wlan to test it out rn. Should grab the currently connected Wlan connection and output the password though.
    Powershell command, wont work in cmd.

  5. #5
    Field Supervisor 500+ Posts
    How to grab Wifi passwords with only 2 commands

    dalewb74's Avatar
    Join Date
    Feb 2018
    Posts
    827
    Rep Power
    29

    Re: How to grab Wifi passwords with only 2 commands

    yeah that works well, have used it before. only works though if the person has connected once to the network. then they forgot the password. and for whatever reason was disconnected. run both of those commands and you have the info you need. you can blow someone's mind with that trick. lol

  6. #6
    Field Supervisor 500+ Posts
    How to grab Wifi passwords with only 2 commands

    techsxge's Avatar
    Join Date
    Jan 2022
    Location
    N/A
    Posts
    661
    Rep Power
    28

    Re: How to grab Wifi passwords with only 2 commands

    I made a script that will let you extract the passwords from any recently connected wifi to just simplify this.

    Script:
    https://github.com/vlc3n/FuckUrBatch...fipassword.ps1

    Compiled to exe:
    Release wifiPassword.ps1 compiled to .exe * vlc3n/FuckUrBatch * GitHub

    Its open source, so you dont have to worry about any bloatware being installed or the script doing shady things.
    Last edited by techsxge; 10-06-2023 at 02:04 PM.

  7. #7
    Service Manager 2,500+ Posts
    How to grab Wifi passwords with only 2 commands

    skynet's Avatar
    Join Date
    Apr 2009
    Location
    You know by now
    Posts
    2,575
    Rep Power
    167

    Re: How to grab Wifi passwords with only 2 commands

    Quote Originally Posted by techsxge View Post
    I made a script that will let you extract the passwords from any recently connected wifi to just simplify this.

    Script:
    https://github.com/vlc3n/FuckUrBatch...fipassword.ps1


    Compiled to exe:
    Release wifiPassword.ps1 compiled to .exe * vlc3n/FuckUrBatch * GitHub
    Can I add #!/bin/sh to the beginning of that script for Linux?
    When you think you have made a procedure idiot proof your company employs a better idiot.

  8. #8
    Service Manager 2,500+ Posts rthonpm's Avatar
    Join Date
    Aug 2007
    Location
    Pennsyltucky
    Posts
    2,779
    Rep Power
    108

    Re: How to grab Wifi passwords with only 2 commands

    Quote Originally Posted by skynet View Post
    Can I add #!/bin/sh to the beginning of that script for Linux?
    No.

    Sent from my Pixel 6 Pro using Tapatalk

  9. #9
    Field Supervisor 500+ Posts
    How to grab Wifi passwords with only 2 commands

    techsxge's Avatar
    Join Date
    Jan 2022
    Location
    N/A
    Posts
    661
    Rep Power
    28

    Re: How to grab Wifi passwords with only 2 commands

    Quote Originally Posted by skynet View Post
    Can I add #!/bin/sh to the beginning of that script for Linux?
    not too sure if powershell is 1:1 supported by linux.

    In any case bin/sh would be for shell scripts, not powershell scripts.
    You would need to add:

    #!/usr/bin/pwsh -Command
    Last edited by techsxge; 10-06-2023 at 02:03 PM. Reason: replaced powershell with pwsh

  10. #10
    Field Supervisor 500+ Posts
    How to grab Wifi passwords with only 2 commands

    techsxge's Avatar
    Join Date
    Jan 2022
    Location
    N/A
    Posts
    661
    Rep Power
    28

    Re: How to grab Wifi passwords with only 2 commands

    On linux it would be smarter to just do it with a python script. I quickly translated this code so forgive any mistakes:

    Code:
    import subprocess
    
    
    wifi_profiles_info = subprocess.check_output(['nmcli', '-t', '-f', 'SSID', 'connection', 'show', '--active']).decode('utf-8')
    wifi_profiles = [line.strip() for line in wifi_profiles_info.split('\n')]
    
    
    print("Available Wi-Fi networks:")
    for index, profile in enumerate(wifi_profiles):
        print(f"{index + 1}. {profile}")
    
    
    selection = input("Select a Wi-Fi network (enter the number): ")
    try:
        selected_profile = wifi_profiles[int(selection) - 1]
    except (ValueError, IndexError):
        selected_profile = None
    
    
    if selected_profile:
        wifi_password_info = subprocess.check_output(['nmcli', '-s', '-g', '802-11-wireless-security.psk', 'connection', 'show', selected_profile]).decode('utf-8')
        wifi_password = wifi_password_info.strip()
    
    
        print(f"Wi-Fi network: {selected_profile}")
        print(f"Password: {wifi_password}")
    else:
        print("No Wi-Fi network selected.")
    Last edited by techsxge; 10-06-2023 at 02:13 PM. Reason: Updated script as netsh does not exists on linux

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Get the Android App
click or scan for the Copytechnet Mobile App

-= -= -= -= -=


IDrive Remote Backup

Lunarpages Internet Solutions

Advertise on Copytechnet

Your Link Here