Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Python group learning


ghost's Avatar
0 0

Hows this for an idea? Somebody suggests an idea for a program (preferably in python for the mo), and anyone who is interested can post their code, so people can learn better techniques and different ways of doing things. Il start.

Challenge: Port Scanner

Code: http://www.hellboundhackers.org/code/readcode.php?id=1140

Add your own twist/features and feel free to put mine to shame, that way we can all learn to code better. I'd recommend uploading your code to the bank so the tabs behave themselves.


ghost's Avatar
0 0
       try:
            self.host = host
            self.minport = minport
            self.maxport = maxport
        except:
            print self.__doc__
            sys.exit(1)

um What error were you trying to catch there?


ghost's Avatar
0 0

I guess it was people inputing the wrong data format…. Or missing some parameters out. Probably redundant now you mention it.


ghost's Avatar
0 0

Don't guess, know that it is redundant.


ghost's Avatar
0 0

well whats the alternative without using messy if statements?

edit - Ah, spose it just wont run without the correct params, but id still need to code a print Pscan.doc in the cli code.