Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

Scan IP Ranges

Hello Everyone!

I am trying to teach myself python and I am not sure which direction to go in when it comes to actually creating something that scans IP ranges with a specific port. Can someone help me out or provide a module that would do this?

I would greatly appreciate it!
You would want to look into sockets.

If you are trying to scan what ports are open, make a function that tries to establish a connection, and run it in a for loop.
1NevE2JpzhMs8rzCxSHAdmjtf1Ud8KGxJC
cool thanks for the question and thanks for the comment. i can now explore the sockets mod.
FinnTheHuman, thanks man greatly appreciated. I will post my source once I get this ironed out. :)
You could do this much more efficiently in bash but if you're a solely a python programmer than yes you will want to look into sockets, send and receive and parsing the return. You could technically just make a front end and use nmap for the sweeping, thus implementing service scanning etc

Note that if you try using a connection type of scan like -sT in nmap you WILL be noticed on log files all over the place, a more discrete but not idiot proof is the SYN scanner.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by Fivepoint0Oct 23, 2018 05:24 PM 3 192 Oct 23, 2018 05:24 PM
Last Post: Fivepoint0
[Java] by ClockismOct 17, 2017 12:10 PM 1 143 Oct 17, 2017 12:10 PM
Last Post: Glass Bones
[C] by DerekMFeb 17, 2015 08:34 PM 3 343 Feb 17, 2015 08:34 PM
Last Post: Zettabit