If it doesn't work at 16:20, try: if (filename.startswith("Wi-Fi") or filename.startswith("WiFi")) and filename.endswith(".xml"): My XML file starts with "WiFi". Could also make filename lowercase to avoid any further discrepancies.
Nice!!!! But if we were to use this snippet in commercial network systems where there could be a lot of wifi's available, this could take a lot of time since the code is of O(n^4) complexity. This could be bought to O(n^2) by subtle changes to increase execution speed.
Correct me if I’m wrong, but isn’t this actually O(n!)? And it could be just O(n). It actually baffles me how someone could write such a inefficient code and call it an tutorial. I don’t know this channel and maybe he is a great programmer and it is done on purpose so some noobie doesn’t do anything stupid on more than cca 15-20 passwords. Anyway it is in python so efficiently wasn’t the point.
Changing some code since I have some issues when computer has more than one WIFI stored and if there are some open WIFI stored: #Do the hackies for filename in os.listdir(path): if filename.startswith("Wi-Fi") and filename.endswith(".xml"): wifi_files.append(filename) for i in wifi_files: with open(i,'r') as f: for line in f.readlines(): if 'name' in line: stripped = line.strip() front = stripped[6:] back = front[:-7] wifi_name.append(back) if 'keyMaterial' in line: stripped = line.strip() front = stripped[13:] back = front[:-14] wifi_password.append(back) if 'open' in line: stripped = line.strip() front = stripped[16:] back = front[:-17] wifi_password.append(back) for x, y in zip(wifi_name, wifi_password): sys.stdout = open("passwords.txt", "a") print("SSID: "+x, "Password: "+y, sep=' ') sys.stdout.close() wifi_name.clear() wifi_password.clear()
Nice work, mate! Well explained and pretty informative as well. After watching the whole video, there's one thing i would like to know: How can i protect myself from this commands? Can i block a system from accepting that commands or anything like that? What steps should i take after knowing that this kind of stuff is possible?
What goes around,comes around. If you don't harm others, you will most likely be protected from the harm of others. And in case someone manages to steal your password,just ban their MAC adress through the router settings.
I still have a lot to learn but I glad I am learning python, I am understanding the script, what words like append mean, understanding what a for loop does, etc. Then I am learning more things and how to use python for hacking. Being a script kitty sucks kids. I have never been one and never will be.
Any help. Mine printed the passwords and names and so on but did not save to the txt file. I've checked my code 3 times. I cant find the issue. Is there something I need to do.
I have a question let’s say I hypothetically I am hacked into my neginbours wifi and then they change thier password so woudl the cmd show the current password or the password that was saved before
thanks for the code very informative and cool. One question, this code is good for windows machines only or will work for other system? I am assuming is for windows only. if we use a windows command will take one line code netsh wlan export profile key=clear to get the file and then the password. I dont see the benefit using python instead of windows command. Sorry I am learning (super beginner) I just want to understand the advantage of using Python. Thanks again
Some advantages: 1: in Python you can send it somewhere as he did if there are multiple people involved 2: you can put that script on a usb Stick and with some small chnages to the stick you can automatically get all passwords from another Laptop 3: you do not have to do stuff Manual. 4: it is good for learning and having fun with it.
Back in the 80,s was learning computer programming basics , hated it , now I got so much more respect for it , wish I payed attention back then lol. Ps liked and subscribed. 👍
i have this error if filename.startswith("WLAN") and filename.endswith(".xml"): IndentationError: expected an indented block after 'for' statement on line 20 Help
Did you figure this one out allready? It's a good Idea to google search your errors when you program.. Everybody does it. -Programming is 10 percent typing and 95 percent google searching... Anyways- python indentations are important... You use tab spaces to communicate what blocks that should be executed and in what order.
This is unrelated (and probably illegal), but, a while ago, I was put in a refuge for children out of town because my mom was in the hospital as a result of medical negligence during a surgery. Anyway... to get to the point... I wrote a keylogger in python so I could get their wifi password when they typed it in because they wouldn't tell us what it was.
Okay so you never said how to prevent this if you are a person who has someone near them stealing their wifi. I have the issue where Samsung TV and Mediatec with Mac address 28:84:fa:9b:b9:e2 as well as multiple other devices which are not mine keep showing up in my network under Windows, but when I got o my router it does not see those MAC addresses so I cannot block them. I pay a lot of money for my internet and I have a strong password on it, within 8-10 hours no matter what password I put on the SSID and WIFI I get new devices which are not mine popping up in my network. Also I always see them from Windows under Network with a Mac address, but no IP address. How can I stop this. I am using WPA2-PSK encryption this is a PITA changing my WIFI password because I have about 10 IOT devices including Lights and other devices and Every time I change the password I have to spend about 2 hours setting them back up to connect, please help.
At the end of September we went to a country fair in our city out in the country. The only Wi-Fi was locked down, so I found a point of sale terminal that was unlocked went in control panel and got the Wi-Fi password. :D
very good video, but i understand the code show you the password files do you have in your computer, this it's correct? but i dont understand if using this code you can steel password to an network wifi who you dont have the .xml file
Hi can some one steal my wpa supplicant in android Root directory By Sending such scripts through Email or online web links to hack my WiFi password? Or the android root directory Encrypted = unaccessible? Thanks
would this work on most Windows systems though? they don't have python by default do they? guessing you could do a similar process with a batch file or powershell. Cheers for activating the neurons late on a Friday.
Very good video, but wouldn't you get every ssid and password multiple times if there was more than 1 ssid? Because of the for loop at line 29 you append to list then go through the whole list if there was a second ssid it would do all the things to the first ssid as well or am i wrong? I would have seperated the stuff after line 28 into a new line.
@@0baakYT I don't think that's the problem that the comment was talking about, but I think you mean that a dictionary solves the problem of multiple equal SSID's
@@boradagdelen3846 i had a bunch of duplicate instances.. i think it was from my passwords being changed.. not sure. but the dictionary made my output file nice and organized with no dups
@@MuhammadImran-uz6vz I tried recently one to download youtube videos and it did not work in windows. it required to install python and then the modules . so I dont think python just work out of the box in windows in my short experience
I would be good if i ask you for normal reason, other app they can get passwords from unknown ssid/wife routers ..i used kali linus and aircrack but other apps that i wanna say more safe for normal use.. like i got in a vacation, but i don't have the password for the airbnb how do i hack it? without use any of the above hacking programs/apps?
Could you provide source code in the description? I'd like to play around with the code a little to try and make it more efficient/faster. (I'm not going to use it maliciously, don't worry, Im studying to be a white hat hacker lol)
This was a good one. Thanks a lot. Would be nice if you went into the possible payloads one could use with this so that people know what to avoid. Thanks again
Mine gave this problem "command = subprocess.run(["netsh" , "wlan" , "export" , "profile" , "key=clear"] , capture_output=True).stdout.decode() UnicodeDecodeError: 'utf-8' codec can't decode byte 0x88 in position 70: invalid start byte" . I don't know how to solve that. I don't know if the problem is because my keybord is "utf-8" or any other reason.
nice tutorial.. I followed along using VScode. I triple checked and compared codes. the code works, but the output is a huge list.. mostly repeating username and passwords.. i believe about 8 xml files were found. i received a ton of repeats and some files weren't in the output.. not sure what the heck happend.. anyways... I'm about a month in on teaching myself Python. thanks again
It's really badly written code. Every time a filename is added to the list it opens every file in the list and processes it before processing the new file.
Same here, I have basic experience in python but not enough to be able to know how to fix this while keeping the code working, are there any basic solutions?
If you want to see an update to this video with improved code, check out this link: ua-cam.com/video/POgrNo4xRko/v-deo.html
please can you say i have a doubt
that my passwords are not displaying in the file please say what to do
making foolish efforts to show my own passwrod, how can i crack unknown wifi password ? why i steal my own password and spread to world ?
2:15 video starts
Thanks Soldier. 🫡
Thanks my grandma didn't stand a chance
😂
LOOOOOOOOOOL 😂😂😂😂 boy you gonna get your ass slapped
Thanks for the humor. I needed this laugh
🤣🤣🤣🤣😂😂😂
Lmao
so basically, this can be done only if we are connected to the network or we can get all the available networks which are available nearby?
same ques works for some tho check it out
If it doesn't work at 16:20, try:
if (filename.startswith("Wi-Fi") or filename.startswith("WiFi")) and filename.endswith(".xml"):
My XML file starts with "WiFi". Could also make filename lowercase to avoid any further discrepancies.
You could also check the .xml file and see what it starts with(mine was Wi-Fi instead of wifi) and try that, it worked for me
your teaching process awesome ... slowly slowly step by step speak ... too good Sir
My first time watching one of ur vids, I'm not familiar with coding, quit impressive and interesting
Dope content Heath! Super informative too! Please keep the great content coming!
Do you know when I try to the run the file on command prompt it says “no such file or directory”?
Nice!!!!
But if we were to use this snippet in commercial network systems where there could be a lot of wifi's available, this could take a lot of time since the code is of O(n^4) complexity. This could be bought to O(n^2) by subtle changes to increase execution speed.
How
Any ideas !
@@moiz_6 No stress!! We can remove nested for loops, use lambda functions for function definitions and use file parsers
@@tyrannicalguy7262 ok
Thanks
Nice one dudes. One day I want to be able to contribute to threads like this and provide solutions as a coder and ethical hacker.
Correct me if I’m wrong, but isn’t this actually O(n!)?
And it could be just O(n).
It actually baffles me how someone could write such a inefficient code and call it an tutorial. I don’t know this channel and maybe he is a great programmer and it is done on purpose so some noobie doesn’t do anything stupid on more than cca 15-20 passwords.
Anyway it is in python so efficiently wasn’t the point.
Does not work for me it says that there is not file that has that name. Wasted a lot of my time on this.
I thought at the first time that this is a remote-based wifi hacking tutorial. Nice one tho!
didnt realize i was being taught to make a wifi stealing virus lol
Changing some code since I have some issues when computer has more than one WIFI stored and if there are some open WIFI stored:
#Do the hackies
for filename in os.listdir(path):
if filename.startswith("Wi-Fi") and filename.endswith(".xml"):
wifi_files.append(filename)
for i in wifi_files:
with open(i,'r') as f:
for line in f.readlines():
if 'name' in line:
stripped = line.strip()
front = stripped[6:]
back = front[:-7]
wifi_name.append(back)
if 'keyMaterial' in line:
stripped = line.strip()
front = stripped[13:]
back = front[:-14]
wifi_password.append(back)
if 'open' in line:
stripped = line.strip()
front = stripped[16:]
back = front[:-17]
wifi_password.append(back)
for x, y in zip(wifi_name, wifi_password):
sys.stdout = open("passwords.txt", "a")
print("SSID: "+x, "Password: "+y, sep=' ')
sys.stdout.close()
wifi_name.clear()
wifi_password.clear()
Nice work, mate! Well explained and pretty informative as well. After watching the whole video, there's one thing i would like to know: How can i protect myself from this commands? Can i block a system from accepting that commands or anything like that? What steps should i take after knowing that this kind of stuff is possible?
What goes around,comes around. If you don't harm others, you will most likely be protected from the harm of others. And in case someone manages to steal your password,just ban their MAC adress through the router settings.
You can just don't have python installed so that can't really run python on their computer.
What about online interpreters?
How about embed code into excel or word document that does this same thing? :p just an idea.
iam watching this at night and got flashbanged 3:28
how to hack nearby wifi passwords? instead of saved wifi in our system!!
This tutorial is kid stuff, like stealing something inside your home?
Is webhooksite safe? They can collect all passwords as a word Dict ..
But this will only give the passwords for saved profiles, isn't it? Can I know the password of any random SSID ?
U could use the script like a malware and just send it
Very well you're explained, but we re needed to kali Linux video, thanks 🧐
"Hello sir!" is a nice touch. Thanks - I'll be going on my first wifi engagement next month.
are you a pentester?
Is this works for those wifi which were not even connected before.. With your laptop?..
No, you must connect first.
How you go about covering your trail? Deleting process files? Great vid! You've earned my sub!
So first I need to have internet to download Linux and python?
use the same internet as u used to watch the video
@@asadabbas4973 they can be using mobile data and not have any hotspot left
it is showing alot of numbers in the password place, can you fix that?
I still have a lot to learn but I glad I am learning python, I am understanding the script, what words like append mean, understanding what a for loop does, etc. Then I am learning more things and how to use python for hacking. Being a script kitty sucks kids. I have never been one and never will be.
i think ya mean script kiddie ;)
can this only be run through command prompt? Sorry, I'm still very new.
Any help. Mine printed the passwords and names and so on but did not save to the txt file. I've checked my code 3 times. I cant find the issue. Is there something I need to do.
'pip' is not recognized as an internal or external command,
operable program or batch file.
I Need help?
Which Linux software are you using??
Can this be done remotely without hosting any site??
I have a question let’s say I hypothetically I am hacked into my neginbours wifi and then they change thier password so woudl the cmd show the current password or the password that was saved before
It will show the password saved earlier .. there will be no update if the password was changed
Title - Steal wifi passwords in seconds
video - 20 mins💁♂
You have to go through the entire process before it takes seconds.
how did you open file after typing commands in cmd ?
put the the link of the file in the cmd
thanks for the code very informative and cool. One question, this code is good for windows machines only or will work for other system? I am assuming is for windows only. if we use a windows command will take one line code netsh wlan export profile key=clear to get the file and then the password. I dont see the benefit using python instead of windows command. Sorry I am learning (super beginner) I just want to understand the advantage of using Python. Thanks again
Bro did u tried this
Some advantages:
1: in Python you can send it somewhere as he did if there are multiple people involved
2: you can put that script on a usb Stick and with some small chnages to the stick you can automatically get all passwords from another Laptop
3: you do not have to do stuff Manual.
4: it is good for learning and having fun with it.
Back in the 80,s was learning computer programming basics , hated it , now I got so much more respect for it , wish I payed attention back then lol. Ps liked and subscribed. 👍
my dad did basic in college.
i have this error
if filename.startswith("WLAN") and filename.endswith(".xml"):
IndentationError: expected an indented block after 'for' statement on line 20
Help
Did you figure this one out allready? It's a good Idea to google search your errors when you program.. Everybody does it. -Programming is 10 percent typing and 95 percent google searching... Anyways- python indentations are important... You use tab spaces to communicate what blocks that should be executed and in what order.
Hi, Can you share this code?
So informative! Thanks so much ❤️
I'm only 16 years old and still learning python, I'm not a master at it yet
@@basit2737 English is BS
This is unrelated (and probably illegal), but, a while ago, I was put in a refuge for children out of town because my mom was in the hospital as a result of medical negligence during a surgery. Anyway... to get to the point... I wrote a keylogger in python so I could get their wifi password when they typed it in because they wouldn't tell us what it was.
is this helped for unknown wifi, if we didn't connect earlier before
No
Okay so you never said how to prevent this if you are a person who has someone near them stealing their wifi. I have the issue where Samsung TV and Mediatec with Mac address 28:84:fa:9b:b9:e2 as well as multiple other devices which are not mine keep showing up in my network under Windows, but when I got o my router it does not see those MAC addresses so I cannot block them. I pay a lot of money for my internet and I have a strong password on it, within 8-10 hours no matter what password I put on the SSID and WIFI I get new devices which are not mine popping up in my network. Also I always see them from Windows under Network with a Mac address, but no IP address. How can I stop this. I am using WPA2-PSK encryption this is a PITA changing my WIFI password because I have about 10 IOT devices including Lights and other devices and Every time I change the password I have to spend about 2 hours setting them back up to connect, please help.
If it only gives you password of your saved wifi or wifi that you connected before then we can use like 3 cmd in cmd promt to get it easily...
At the end of September we went to a country fair in our city out in the country. The only Wi-Fi was locked down, so I found a point of sale terminal that was unlocked went in control panel and got the Wi-Fi password. :D
This will show passwords for only those wifi networks who had connected in past but how to crack passwords for some new networks?
very good video, but i understand the code show you the password files do you have in your computer, this it's correct? but i dont understand if using this code you can steel password to an network wifi who you dont have the .xml file
End of the ad : 1:45
Please respond! Can I do this mousepad command on ISH SHELL???
Hi can some one steal my wpa supplicant in android
Root directory
By Sending such scripts through Email or online web links to hack my WiFi password?
Or the android root directory Encrypted = unaccessible?
Thanks
i did everything s you said and write but it didnt work for me for some reason...
😕
When I open the mousepad my keyboard it’s Putin other keywords
Is This attack works only if the credentials saved before in my system?
Yes. If your computer automatically connects to wifi on startup, it means the password is stored there, so this attack will work.
would this work on most Windows systems though? they don't have python by default do they? guessing you could do a similar process with a batch file or powershell. Cheers for activating the neurons late on a Friday.
You are correct. That or some c# executable. You can also convert python to a .exe, but I’m not sure if windows defender would like it much
Tested with powershell, it works really well
@@alexpetrean827 did you re-write the script using PowerShell?
His using windows
How do you get the customized linux environment in kali? Also, most of my xml files do not contain the line. Not sure why.
it means the wifi networks you connected to did not require authentication to connect with, ie. they were open wifi
Very good video, but wouldn't you get every ssid and password multiple times if there was more than 1 ssid? Because of the for loop at line 29 you append to list then go through the whole list if there was a second ssid it would do all the things to the first ssid as well or am i wrong? I would have seperated the stuff after line 28 into a new line.
You're right, the for loop at 29 should be outside the first for loop, so no indent
I had this issue. Resolved by creating a dictionary for the wifi profiles
@@0baakYT I don't think that's the problem that the comment was talking about, but I think you mean that a dictionary solves the problem of multiple equal SSID's
Oh wait, a dictionary actually wouldn't allow multiple equal SSID'S
@@boradagdelen3846 i had a bunch of duplicate instances.. i think it was from my passwords being changed.. not sure. but the dictionary made my output file nice and organized with no dups
How do i run it and also create the files
sorry for the noob question , whare are the xml stored in windows?
You can search in the search bar by writing .xml and then can click on the desired file to see its file location
Awesome tutorial. It's also interesting to learn about netsh.
So you need RCE to get the password?
Hi Heath, thank you for another great tutorial. May I ask, How do you get your Windows command prompt to see the python code, please? Thank you.
So simple just type python and file name Python file.py
@@MuhammadImran-uz6vz I tried recently one to download youtube videos and it did not work in windows. it required to install python and then the modules . so I dont think python just work out of the box in windows in my short experience
I would be good if i ask you for normal reason, other app they can get passwords from unknown ssid/wife routers ..i used kali linus and aircrack but other apps that i wanna say more safe for normal use..
like i got in a vacation, but i don't have the password for the airbnb how do i hack it? without use any of the above hacking programs/apps?
how to coonect any wifi without knowing its password and its is our first time to connect with it
Tricky exploits(Usually, the holes are fixed) or brute force( extremely long process) =)
WHICH COMPILER?
what an excellent tutorial> thank you SO MUCH 🤩
Please do more Python scripting videos like this
Could you provide source code in the description? I'd like to play around with the code a little to try and make it more efficient/faster. (I'm not going to use it maliciously, don't worry, Im studying to be a white hat hacker lol)
Check this updated video and the source code is in the description ua-cam.com/video/POgrNo4xRko/v-deo.html
@- Prophess-or-X lol
XD don't worry am not gonna hurt you, said the serial killer
How and where do i find and open the xml file
?
cool video but what about Mac users??? got one for us?
Where can i open/locate that xml file
Is it use as payload?
Just curious about how to make script like this which runs on Android?
Bro you run python program in
Which application?
Is it IDLE
How to do this on mac as these commands are not working there
doesn't working, no display ssid and passsword and idk why
how can be use for unix boxes too?
we do only one yime just beacuse every time show same profiles...
How to do this in notepad++
no , only we do this only one time just because of when i do again this ,this show me again same wifi profiles thats i conneted
Hey my python stealer .py is just not opening its showng no directory can anybody help??
Source code please
we can only hack our password what about other's
Ye
This was a good one. Thanks a lot. Would be nice if you went into the possible payloads one could use with this so that people know what to avoid. Thanks again
Sounds like someone is asking for a friend ;p
But this only work for wifi that you have connected
What if I I’m not connect to that WiFi?
Hi I followed all of you video please am just knew in cyber securite please where should I start from zero ? Help me please
ua-cam.com/video/rpm_V_88wds/v-deo.html
Mine gave this problem "command = subprocess.run(["netsh" , "wlan" , "export" , "profile" , "key=clear"] , capture_output=True).stdout.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x88 in position 70: invalid start byte" . I don't know how to solve that. I don't know if the problem is because my keybord is "utf-8" or any other reason.
Had the same issue
Add 'Windows-1251' in decode()
Should be like this .decode('Windows-1251')
@@heilagr945 Now show me a new problem: sys.stdout = open("passwords.txt", "a")
PermissionError: [Errno 13] Permission denied: 'passwords.txt'
@@heilagr945 When the "password.txt" opens show me repeatedly the same SSID and Password
Do we have to do all this process to hack password
It just shows the password from your already connected devices .. we cannot hack other unknown wifi connections through this code
So you just showed the password to a network you had already been connected to
how did he find the xml file
hi, anyone knows how to execute a windows command in Mac, specially this command in the video thanks.
my "sys" command in python wasnt defined
can i please get the copy paste cuz im lazy you know
cool video, cant wait to try with my brother
Have fun!
Amazing! Thank you...
nice tutorial.. I followed along using VScode. I triple checked and compared codes. the code works, but the output is a huge list.. mostly repeating username and passwords.. i believe about 8 xml files were found. i received a ton of repeats and some files weren't in the output.. not sure what the heck happend.. anyways... I'm about a month in on teaching myself Python. thanks again
It's really badly written code.
Every time a filename is added to the list it opens every file in the list and processes it before processing the new file.
Same here, I have basic experience in python but not enough to be able to know how to fix this while keeping the code working, are there any basic solutions?
it keeps saying wlan not recognized
Did any one tried this yet ? Let me know if it really works
But where the location of .xml file
my file is just opening in Pycharm, bro...