HTRegz: really awesome.
"I've got one question: is it possible to make executables with Python so they can be run on another computer that doesn't have the interpreter installed?"
mjk : yes, you can do that.
One of the links pointed out earlier is py2exe.
Same exists for linux also, it is called freeze and comes with standard installtion. This link should be helpful http://wiki.python.org/moin/Freeze
Also IronPython is another python implementation for .Net platform by Microsoft which allows you to make .net binaries.
So be it exe, elf or .Net binary, you can do it.
Well you don't need a binary for python when using linux. Every linux distro includes python, even slackware. To ensure compatibility, you need to use whats called a shabang as the first line: #! /usr/bin/env or wherever the interpreter is stored. IIRC, debian uses python as part of its installation, or was that a different distro? hmmm.. anyways, htregz, i'm working on a fast tcpscan and fast udpscan using threading. I'd be careful about using the thread module as its been found to cause deadlocks and races within the interpreter itself, which means nothing you do in your program will prevent the thread issues. You should soon switch to threading. I could do the code fix for you.
heres the fast udp scan version, using threads and and locks to scan multiple ports simultaneously.
btw, i was wrong about the thread module being dangerous. That was the old version. how embarassed am i? anyways, heres teh fix:
Threaded udp scan. uses a lock and a central list to indicate which ports are open.
The closed list is to ensure that all threads have finished. NOTE: Function coded by Tyler
Laing on Jan 28/06
lock = thread.allocate_lock()
openPorts = 
closedPorts = 
for portcounter in range(numberofports):
port = int(portstoscan[portcounter])
thread.start_new_thread(threadedUdpScan, (timeout, ipaddress, port))
while len(openPorts)+len(closedPorts) != numberofports:#this is here to ensure that all threads started have finished
if len(openPorts) == numberofports:
print "There is a firewall present that is blocking udpscans."
for port in openPorts:
print "Port", port, "is open."
def threadedUdpScan(timeout, ipaddress, port):
"""This takes care of all of the fun scanning part. Ensure that lock is a global lock!"""
scansocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print ".",#this is here to indicate number of successes.