================ Scripts using regex: ================ Socket method: github.com/davidbombal/red-python-scripts/blob/main/port_scanner_regex.py nmap method: github.com/davidbombal/red-python-scripts/blob/main/nmap_port_scanner.py ==================== Scripts using IP address: ==================== Socket method: github.com/davidbombal/red-python-scripts/blob/main/port_scanner_ip_obj.py nmap method: github.com/davidbombal/red-python-scripts/blob/main/nmap_port_scanner_ip_obj.py Menu: Python port scanner nmap and sockets: 0:00 This is a journey: 0:20 Sockets on Windows: 1:09 Download and install Python: 1:40 Run python socket port scanner: 2:40 Test against a web server: 4:07 Timeout to check connection: 5:00 Kali Linux example: 5:25 Test sockets Python script on Kali Linux: 6:06 Catching mistakes: 6:42 Sockets Python Code: 7:08 nmap script on Kali: 7:38 Troubleshooting nmap issues: 8:18 Python nmap port scanner: 9:22 Comparison of the scripts: 10:04 Sockets script explanation: 10:50 nmap Python script explanation: 13:25 ================ Connect with me: ================ Discord: discord.com/invite/usKSyzb Twitter: twitter.com/davidbombal Instagram: instagram.com/davidbombal LinkedIn: www.linkedin.com/in/davidbombal Facebook: facebook.com/davidbombal.co TikTok: tiktok.com/@davidbombal UA-cam: ua-cam.com/users/davidbombal ================ Support me: ================ DavidBombal.com: CCNA ($10): bit.ly/yt999ccna Udemy CCNA Course: bit.ly/ccnafor10dollars GNS3 CCNA Course: CCNA ($10): bit.ly/gns3ccna10 ====================== Special Offers: ====================== Boson software: 15% discount Link: bit.ly/boson15 Code: DBAF15P Please note that links listed may be affiliate links and provide me with a small percentage/kickback should you use them to purchase any of the items listed or recommended. Thank you for supporting me and this channel!
Hello sir I'm from Bangladesh. Can you please make a video on how to crack wifi password using only a mobile device. It would be very helpful. I don't have any PC or Laptop.
Thanks David! This has been the toughest and most important part of my Pen-tester journey. I believe its important to understand what exactly the code is tying to do in order to be a great penetration tester. Learning how to integrate all the libraries that python has to offer has been my biggest challenge
This is the first example of a port scanner I've found that works as advertised. The comments you placed in it make me thoroughly understand how it is working. Thank you so much for this.
-Great content Professor David ... !!! -Python is practically a Swiss army knife, server for Pentest, Devnet, and many others. -I started to study for Python seriously by taking the very advanced Python courses on Udemy because I think about making a different version of the Quokka project but instead of using Flask use Django, and even the preparation for Python certification I think in doing, now the Devnet or the Python certification to PCAP that when you finish the course at the Cisco academy it comes out at half the value which is still going to be 150 dollars which is almost the value of the Brazilian minimum wage so I still can't do it without a job in the area. -Now I need to say one fact: -My wife studied nursing and thought about doing Cook in college, but I introduced her to Python and she is already in her second course and is learning Web now, and in the morning in Bed when I put this video she understood the codes and asked me about IP addressing , it was magical. -Thank you professor David ... !!!
Great job as always David, I too love when people put in comments in their code to help newbies like myself learn how and (the big one) WHY, it does what you (hopefully) want it to. Thanks again.
Sir My dream is become a CyberSecurity Engineer but I am not having that much money for the Expensive courses but have the passion for it. Sir you are my Inspiration.
I'm a cyber security student and I wish this video came out last year when I had to create a port scanner for a project but I used Scapy. Great video David !!
This man is giving out quality knowledge for free! What a legend! P.S. shout out to other legends like Networkchuck and of course, Man, The myth, The legend, Professor Messer!
A feature u cud add to the socket port scanner is to check the port and determine the default service. U cud add something like if port==21: print(f"Port {port} is open, this could be FTP") and a bunch of elifs after that.
Great video!!! Adding your comments to the scripts is awesome to., If you don’t mind, I want to add to the python nmap script the ability to store results in a self-contained database. Also thinking on adding the ability to load/create scan policies too. My goal is to add this to my home network on a raspberry pi and use it as a network discovery tool. I will use a corn job to run the script multiple times a day. The Pi will also have a 5 inch LCD to display a dashboard of current hosts on the network and if they are authorised hosts or not. I plan to capture MACs, IP’s and Ports. If anyone is interested, I can share my project when its finished. Thanks again David for the script. It’s given me a-lot of ideas :-)
nmap is good tool. I am using nmap in my job almost everyday to scan some particular ports on servers. As you were talking about red and blue team 😀 My job is kind of like being the blue team 🤔
I am very interested in this David.. And automathation (however how's we write that) is something I need to focus on. Thank you for helping tons!! Rock on!!!!
look i have just used threading and i have made it faster checking all of the ports in approximately 100 seconds and it is much better because it waits for a second not a half so the results can be even more accurate it works
Do you have a video on how to build a CV especially for the people with no experience, or could you please consider this subject in one of the following videos?
Hello sir I'm from Bangladesh. Can you please make a video on how to crack wifi password using only a mobile device. It would be very helpful. I don't have any PC or Laptop.
Thank you for the detailed video it really helped me a lot. If you wanted to add a geolocation or traceroute to this script how would you go about it? Any help on a direction would be much appreciated
@@davidbombal oh yeah, you've also helped me create a MAC changer aswell as a keylogger, i love the programming vids! keep them up! Best channel on youtube in terms of hacking and computer science!
Thanks David! that's very useful, for me to learn new stuff. Sorry to ask, by not going through your video series, what virtualization software you are using on your Windows laptop ?
Sir, How can I improve my logic for coding! , or How can I make my logical thinking strong so that I am able to structure data as well as not reduce static programming.
Rafy-Ivan Morales 0 seconds ago I'm a new student trying to learn, so I can become a programmer with python I see this video tutorial, it is very good. I would like to ask for your advice if you can and guide me on how I will add this 3 in a Python script, I have: 2. System should look for all the ports between the range of 1 to 1025 3. If the Ports is open, it should create a file and add an entry for port number 4. In case of any exception for instance “host is not available”, “host name could not be resolved” or due to any other error, you need to write that exception into the same file. Thank you and Merry Christmas.
thanks for the information, it is very useful for me, but is it possible if each video is accompanied by Indonesian subtitles because many people want to learn but have difficulty speaking English
hi david, first of all thank you for your job here. i have a question: your nmap script generate an error on my kali thats says: "import nmap , module not found error" i was thinking may because nmap was not intalled, but if i try to install nmap i recive an output that say me nmap is alredy installed on newest version, or if i write a pip-install it says that requirement is alredy satisfied.. how i can found a way for run your script? thanks
I want to ask for help....I need to make a program with Python program that should test the given host and it should generate a list of all the TCP Open ports within the range of 1 to 1025. You are required to accomplish this task by using standard Python’s “socket” library. Following are the functional requirements: 1. On execution of program system should prompt “Enter a host to scan”. User will provide a host name 2. System should look for all the ports between the range of 1 to 1025 3. If the Ports is open it should create a file and add an entry for port number 4. In case of any exception for instance “host is not available”, “host name could not be resolved” or due to any other error you need to write that exception into same file 5. You also need to record starting and ending date and time at the beginning and ending of file accordingly. It should also show the total time it took in port scanning process
I'm confused... Why do we have to stream the socket? I works even if you don't specify a TCP/UDP connection, and it also recognizes URLs and IPs without an IP module?!
Great video! Does anyone have any idea why both nmap and socket report that every port is open when I scan my home IP address? Plus, nmap takes quite a long time to scan each port too.
Excuse me, I am only asking because I couldn't find this information anywhere else, but what type of scan is the nmap script actually doing? (i.e, SYN half-open, TCP full, FIN, X-MAS etc.) I would be very grateful for any help.
Sir I Used Threading For The Socket Method But I Am Getting An Error. In The Windows Machine I Can Scan 1-65535 Ports In 30 Seconds. But When I Use My Kali Machine I Get An Error: Can't Start New Thread. And Even If I Do From 1-100 Port Range, It Doesn't Run On Kali. Why And Any Solution??
================
Scripts using regex:
================
Socket method:
github.com/davidbombal/red-python-scripts/blob/main/port_scanner_regex.py
nmap method: github.com/davidbombal/red-python-scripts/blob/main/nmap_port_scanner.py
====================
Scripts using IP address:
====================
Socket method: github.com/davidbombal/red-python-scripts/blob/main/port_scanner_ip_obj.py
nmap method: github.com/davidbombal/red-python-scripts/blob/main/nmap_port_scanner_ip_obj.py
Menu:
Python port scanner nmap and sockets: 0:00
This is a journey: 0:20
Sockets on Windows: 1:09
Download and install Python: 1:40
Run python socket port scanner: 2:40
Test against a web server: 4:07
Timeout to check connection: 5:00
Kali Linux example: 5:25
Test sockets Python script on Kali Linux: 6:06
Catching mistakes: 6:42
Sockets Python Code: 7:08
nmap script on Kali: 7:38
Troubleshooting nmap issues: 8:18
Python nmap port scanner: 9:22
Comparison of the scripts: 10:04
Sockets script explanation: 10:50
nmap Python script explanation: 13:25
================
Connect with me:
================
Discord: discord.com/invite/usKSyzb
Twitter: twitter.com/davidbombal
Instagram: instagram.com/davidbombal
LinkedIn: www.linkedin.com/in/davidbombal
Facebook: facebook.com/davidbombal.co
TikTok: tiktok.com/@davidbombal
UA-cam: ua-cam.com/users/davidbombal
================
Support me:
================
DavidBombal.com: CCNA ($10): bit.ly/yt999ccna
Udemy CCNA Course: bit.ly/ccnafor10dollars
GNS3 CCNA Course: CCNA ($10): bit.ly/gns3ccna10
======================
Special Offers:
======================
Boson software: 15% discount
Link: bit.ly/boson15
Code: DBAF15P
Please note that links listed may be affiliate links and provide me with a small percentage/kickback should you use them to purchase any of the items listed or recommended. Thank you for supporting me and this channel!
Hi David. Do you have a video about Python regular expression? Thanks!
Ok Thank you
Sir please checkout your email.
Hello sir I'm from Bangladesh. Can you please make a video on how to crack wifi password using only a mobile device. It would be very helpful. I don't have any PC or Laptop.
Thanks for doing this.
Thanks David! This has been the toughest and most important part of my Pen-tester journey. I believe its important to understand what exactly the code is tying to do in order to be a great penetration tester. Learning how to integrate all the libraries that python has to offer has been my biggest challenge
I love how much u go into detail when ur writing youre code and it makes it so much easier to understand
I absolutely agree. Even as a beginner in Python, I basically understood everything.
This is the first example of a port scanner I've found that works as advertised. The comments you placed in it make me thoroughly understand how it is working. Thank you so much for this.
David thank you for the tutorials! As an aspiring Cybersecurity professional, these are invaluable!
David Bombal is Amazing and Legendary Like Always ! Thank You so Much Mr.David ! 👏👏👏👏👏👏👍👍
Thank you and you're welcome :)
-Great content Professor David ... !!!
-Python is practically a Swiss army knife, server for Pentest, Devnet, and many others.
-I started to study for Python seriously by taking the very advanced Python courses on Udemy because I think about making a different version of the Quokka project but instead of using Flask use Django, and even the preparation for Python certification I think in doing, now the Devnet or the Python certification to PCAP that when you finish the course at the Cisco academy it comes out at half the value which is still going to be 150 dollars which is almost the value of the Brazilian minimum wage so I still can't do it without a job in the area.
-Now I need to say one fact:
-My wife studied nursing and thought about doing Cook in college, but I introduced her to Python and she is already in her second course and is learning Web now, and in the morning in Bed when I put this video she understood the codes and asked me about IP addressing , it was magical.
-Thank you professor David ... !!!
Great job as always David, I too love when people put in comments in their code to help newbies like myself learn how and (the big one) WHY, it does what you (hopefully) want it to. Thanks again.
You are the man David, unlike others you are explaining what, why and how it works which is much needed to understand.
Thank you Deepak. I really appreciate that :)
Never seen such working and well explained programming in this (nmap and sockets) topic... Thanks david...... Big fan of yours ❤️❤️
Sir My dream is become a CyberSecurity Engineer but I am not having that much money for the Expensive courses but have the passion for it.
Sir you are my Inspiration.
Never give up. Lots of free content available online these days.
Thunkz alot. Sir david. Me I'm IT student from somali actually I learned more detail from this channel. Thunkz alot. Teacher
I'm a cyber security student and I wish this video came out last year when I had to create a port scanner for a project but I used Scapy. Great video David !!
Thank you for watching!
Brilliant. I'm cracking the tab on your Udemy CCNA class tonight... ty !
thanks so much profesor David you teach in such a manner that makes me want to keep learning. THANKS
Love your work David, you've really inspired me to get back into programming :) so inspirational
Thank you Fred. Programming can be a lot of fun :)
This content is fantastic and very well explained. I am so looking forward to following these tutorials into the advanced stages. Excellent work Sir.
Thank you!
This man is giving out quality knowledge for free! What a legend!
P.S. shout out to other legends like Networkchuck and of course, Man, The myth, The legend, Professor Messer!
This is Very Cool Mr.David Bombal ! 👏👏👏👏👏👏👏👏👍👍👍🔥🔥
Thank you
This is really cool, these scripts can be useful at times when the NSE of Nmap are not much needed..
thank you so much for this!!
could barely find any scripts that worked on google, let stand with comments and explanations.
You're welcome!
A feature u cud add to the socket port scanner is to check the port and determine the default service. U cud add something like if port==21: print(f"Port {port} is open, this could be FTP") and a bunch of elifs after that.
Great video!!! Adding your comments to the scripts is awesome to., If you don’t mind, I want to add to the python nmap script the ability to store results in a self-contained database. Also thinking on adding the ability to load/create scan policies too. My goal is to add this to my home network on a raspberry pi and use it as a network discovery tool. I will use a corn job to run the script multiple times a day. The Pi will also have a 5 inch LCD to display a dashboard of current hosts on the network and if they are authorised hosts or not. I plan to capture MACs, IP’s and Ports. If anyone is interested, I can share my project when its finished. Thanks again David for the script. It’s given me a-lot of ideas :-)
Thx for the video i didn't know it have a library call nmap all these time i been using socket , thread and scapy this video is a good mine keep it up
Saluti Engineer David,
Always enjoy watching your videos.
Ive recently started learning python thanks you so much for the help David!
You are my inspiration! No words! just THANK YOU SO MUCH!!! Keep it up!!!
Incredible info in these videos David. Superb as always !
David Bombal...my inspiration. Thank you dear.
nmap is good tool.
I am using nmap in my job almost everyday to scan some particular ports on servers.
As you were talking about red and blue team 😀 My job is kind of like being the blue team 🤔
Just looking for it for a week & finally got it. ❤️
Really happy to hear that! :)
New intro is awesome!
Thank you :)
I am very interested in this David.. And automathation (however how's we write that) is something I need to focus on. Thank you for helping tons!! Rock on!!!!
Really happy to hear that! And thank you for your support. I appreciate it :)
I really enjoy this video, thank you for help us to improve our skills with python!
Thank you!
Big fan from France 🇫🇷
Thank you Younis!
I need more videos like this! Keep up the good work!
just installing python 3.10.1, and I don't have the option to check any of the two boxes, @ 2:12 . So I can't add to path.. Any advice, Please.
Sir we need more videos of python pls upload a video we are glad
look i have just used threading and i have made it faster checking all of the ports in approximately 100 seconds and it is much better because it waits for a second not a half so the results can be even more accurate it works
Pls I need ur reply. Can i use that website of urs for practice
So much better than the 10 year old book im trying to learn from.
You always delight me,with your content !!! Thank you
Thank you!
Thank you so much for your amazing and powerful content.
Thank you! And you are welcome!
Do you have a video on how to build a CV especially for the people with no experience, or could you please consider this subject in one of the following videos?
Thanks a lot David. Still new @ python.. Got me more excited
Really happy to hear that Adesh. So many cool things we can do with Python :)
Amazing video for beginners
Thank you for watching!
I'm without words! Thank u Davidddd!!!
Big fan from Netherlands 🇳🇱
Welcome Netherlands!!!
You are a legend as always
This intro is dope
Hello sir I'm from Bangladesh. Can you please make a video on how to crack wifi password using only a mobile device. It would be very helpful. I don't have any PC or Laptop.
Thank u bro we need more for python hacker and surce code and remote please.
Big fan from India❤️
I am also form india to learn please reply tor
@@carryminatiarmy7696 🙂
Welcome India!!
@@davidbombal ❤️❤️❤️❤️❤️❤️
Thank you for the detailed video it really helped me a lot. If you wanted to add a geolocation or traceroute to this script how would you go about it? Any help on a direction would be much appreciated
Python is universal language ❤️
Agreed - it is fantastic
sir bombal version of Nmap!! Hell yeah! I'll try to make one too! Thanks!
Go for it Nawid! These are very simple scripts and can definitely be improved :)
@@davidbombal oh yeah, you've also helped me create a MAC changer aswell as a keylogger, i love the programming vids! keep them up! Best channel on youtube in terms of hacking and computer science!
Very helpful and interesting.
Thank you so much !
This video has been super useful
Good Lesson, Sang!
Another great video, thank you David.
Thank you Kevin
Is the only downside of using the nmap module that you need to have it installed, or is there another advantage to using socket over nmap?
Thanks David! that's very useful, for me to learn new stuff.
Sorry to ask, by not going through your video series, what virtualization software you are using on your Windows laptop ?
Sir, How can I improve my logic for coding! , or How can I make my logical thinking strong so that I am able to structure data as well as not reduce static programming.
Super vedio 👍👍
Thank you
Great content David!
Rafy-Ivan Morales
0 seconds ago
I'm a new student trying to learn, so I can become a programmer with python
I see this video tutorial, it is very good.
I would like to ask for your advice if you can and guide me on how I will add this 3
in a Python script, I have:
2. System should look for all the ports between the range of 1 to 1025
3. If the Ports is open, it should create a file and add an entry for port number
4. In case of any exception for instance “host is not available”, “host name could not be resolved” or
due to any other error, you need to write that exception into the same file.
Thank you and Merry Christmas.
Thanks for the video keep up the great content 👍👍👍
Thank you
I'm your big fan sir
Sir, Please can you tell me Which textbook is best for learning python as a beginner? I am also with W3school.
could threading be used to make this port scanner thing faster ?????
thanks for the information, it is very useful for me, but is it possible if each video is accompanied by Indonesian subtitles because many people want to learn but have difficulty speaking English
Great video. I liked it a lot!!
Now I’m curious, is your port scanner better then mine?
So is this useful? I don't understand the differences basically
Awesome explanation
hi david, first of all thank you for your job here.
i have a question:
your nmap script generate an error on my kali thats says: "import nmap , module not found error"
i was thinking may because nmap was not intalled, but if i try to install nmap i recive an output that say me nmap is alredy installed on newest version, or if i write a pip-install it says that requirement is alredy satisfied..
how i can found a way for run your script? thanks
i love vids like this.
Happy to hear that Abrar!
we want oswap course 😊❤️
I want to ask for help....I need to make a program with Python program that should test the given host and it should generate a list of
all the TCP Open ports within the range of 1 to 1025. You are required to accomplish this task by using
standard Python’s “socket” library. Following are the functional requirements:
1. On execution of program system should prompt “Enter a host to scan”. User will provide a host
name
2. System should look for all the ports between the range of 1 to 1025
3. If the Ports is open it should create a file and add an entry for port number
4. In case of any exception for instance “host is not available”, “host name could not be resolved” or
due to any other error you need to write that exception into same file
5. You also need to record starting and ending date and time at the beginning and ending of file
accordingly. It should also show the total time it took in port scanning process
how you write your name like that? What s the program
Thanks for this sir!
You're welcome!
I'm confused... Why do we have to stream the socket? I works even if you don't specify a TCP/UDP connection, and it also recognizes URLs and IPs without an IP module?!
Hey David where to learn python for hacking and networking
Put video about PoE it's important to know (CCNA)
Its working 200%
Sir, is nmap enough for checking network vulnerabilities or other tools required?
I'll cover this in more detail in another video.
Lovely Davi Bomba
Sir plz upload a video on how to watch someone from video surveillance on nmap !
sir make more python tools like dirbuster ,arp spoof or mitm
Big fan form india
Welcome India!!
Great video! Does anyone have any idea why both nmap and socket report that every port is open when I scan my home IP address? Plus, nmap takes quite a long time to scan each port too.
Nice video, im subing
Excuse me, I am only asking because I couldn't find this information anywhere else, but what type of scan is the nmap script actually doing? (i.e, SYN half-open, TCP full, FIN, X-MAS etc.) I would be very grateful for any help.
Sir I Used Threading For The Socket Method But I Am Getting An Error. In The Windows Machine I Can Scan 1-65535 Ports In 30 Seconds. But When I Use My Kali Machine I Get An Error: Can't Start New Thread. And Even If I Do From 1-100 Port Range, It Doesn't Run On Kali. Why And Any Solution??
can u share the threading script?
@@itsjobangrewal Where?
Please when I input cd python, it says the system cannot find the path specified
Thank you again David
Please show more python tuts!!!
hey david , i was woundring if u suggest any book for python in cybersecurity and network
Black Hat Python is a good start. But, that isn't just python.
@@davidbombal thank you 😊
High level and useful but find python syntax weird (used to C like languages really).
Hello, sir. Can I use your codes on my personal project?