I want to share a portscanner I wrote in Python_2.
Since I am better at writing tools&wares than actually intrusion of systems, this is about as usefull as i can get ^^
First things first, here’s the code:
Usage works like this:
parser = optparse.OptionParser("%prog -H <target_hosts> "
“-T <target_TCP_ports> -U <target_UDP_ports>”)
parser.add_option("-H", dest = “targetHost”, type = “string”)
parser.add_option("-T", dest = “tcpPort”, type = “string”)
parser.add_option("-U", dest = “udpPort”, type = “string”)
ATM you have to specify target hosts seperated with “,” while the ports can be listet as range with a “-”
During the scan you will expiriance a console freeze since I wanted to output all results to a .html file and therefore deleted all user feedback output.
If u want a plain console usage or different parameters, feel free to modify the script as you please, also it could be wiser to just sent nothing to the port, unlike my “knock knock motherfucker”.
You are absolutely right! And normally, you should use C and craft own IP-Pakages, like Nmap’s x-mas and ACK -scan.
But, and this is important, what happens if u came accross a server that has neither Nmap nor su available? Do you really plan to compile C stuff there? Here comes this tool in play.
I hope you can use this and will find it at least a little helpfull, if not feel free to flame me.