Page 4 of 4 FirstFirst 1234
Results 31 to 34 of 34
  1. #31
    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

    So to wrap it up since i uploaded multiple script versions here that you could use:

    For Linux Distros using NetworkManager (Ubuntu, Debian etc.)
    Run as .py or .txt file (lol)

    Code:
    import subprocess
    
    
    try:
        # Get a list of active Wi-Fi connections
        wifi_profiles_info = subprocess.check_output(['nmcli', '-t', '-f', 'NAME', 'connection', 'show', '--active']).decode('utf-8')
        wifi_profiles = wifi_profiles_info.strip().split('\n')
    
    
        if wifi_profiles:
            print("Available Wi-Fi networks:")
            for index, profile in enumerate(wifi_profiles, start=1):
                print(f"{index}. {profile}")
    
    
            selection = int(input("Select a Wi-Fi network (enter the number): ")) - 1
            selected_profile = wifi_profiles[selection]
    
    
            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 networks found.")
    except (ValueError, IndexError):
        print("Invalid selection or no Wi-Fi network selected.")
    For Windows Users (Win 7, 10, 11)

    Code:
    $wifiProfiles = netsh wlan show profiles | Select-String "All User Profile" | ForEach-Object { $_ -replace "All User Profile\s+:\s+" }
    
    
    $selectedProfile = $wifiProfiles | Out-GridView -Title "Select a Wi-Fi network" -OutputMode Single
    
    
    if ($selectedProfile) {
        $wifiPassword = (netsh wlan show profile name="$selectedProfile" key=clear | Select-String "Key Content").ToString() -replace "Key Content\s+:\s+"
        
        Write-Host "Wi-Fi network: $selectedProfile"
        Write-Host "Password: $wifiPassword"
    } else {
        Write-Host "No Wi-Fi network selected."
    }
    Compiled as .exe:
    Release wifiPassword.ps1 compiled to .exe * vlc3n/FuckUrBatch * GitHub




  2. #32
    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
    Run as .py or .txt file (lol)
    If it works, why fix it?
    File extensions are not as critical as on Windows
    When you think you have made a procedure idiot proof your company employs a better idiot.

  3. #33
    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
    If it works, why fix it?
    File extensions are not as critical as on Windows
    i just find this funny for some reason, leave me alone


  4. #34
    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 just find this funny for some reason, leave me alone
    Well you learnt something, my laptop was a budget one 15 years ago, so you can imagine what Firefox is like now.
    So I copied the script in windows and transferred it to the laptop. So thats how it ended up .txt
    When you think you have made a procedure idiot proof your company employs a better idiot.

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