ThisisLegal.com

ThisisLegal Forums

Welcome to the forums! A chance for site members to chat and get help.

You are not logged in.

#1 2008-03-10 17:01:26

DarkMunk
Member
Registered: 2007-09-17
Posts: 17

Simple Python P­ort Scanner

I've written a damn simple python script that acts as a p­ort scanner. Problem is that it works, but it doesn't... test it and you'll see what I mean. Just thought I'd post it here.

#! /usr/bin/env python

#H1 Simple Python P­ort Scanner v1

#Written by Brad Smith

import socket
import sys


portList = "-"

mySocket = socket.socket ( socket.AF_INET, socket.SOCK_STREAM )

print "Enter Host IP"
hostIP = raw_input()
print "Start Port?"
portStart = int(raw_input())
print "End Port?"
portEnd = int(raw_input())
print "Scanning ports, please be patient..."

for a in range(portStart, portEnd + 1):

	try:
		mySocket.connect ( ( hostIP, a ) )
		print a, "-open"
	except:
		print a, "-closed"

Btw, you really need to get some [ code][ /code] tags. smile

Offline

#2 2008-03-14 11:49:30

t0mmy9
Administrator
Registered: 2005-01-07
Posts: 21

Re: Simple Python P­ort Scanner

edited your post to try the new code option. Hope ya like it smile


Site admin

Offline

#3 2008-03-15 12:48:56

DarkMunk
Member
Registered: 2007-09-17
Posts: 17

Re: Simple Python P­ort Scanner

Nice one, cheers smile

Offline

#4 2008-03-15 14:06:03

sOwL
Member
Registered: 2007-09-16
Posts: 97

Re: Simple Python P­ort Scanner

is works fine, i want an .exe copy of that for the upcoming mIRC script im making. I used to feature WinGate P­ort Scanner with my scripts but if this is good i wanna give it a try smile

PS: would u like to start working on it so it gets good features and stuff?


withstupid

Offline

#5 2008-03-16 15:34:10

DarkMunk
Member
Registered: 2007-09-17
Posts: 17

Re: Simple Python P­ort Scanner

Yeah sure, i'll start work tonight. I've got a crate of beer and plenty of time on my hands smile

Offline

#6 2008-03-19 12:44:37

sOwL
Member
Registered: 2007-09-16
Posts: 97

Re: Simple Python P­ort Scanner

haha nice


withstupid

Offline

Board footer

Powered by FluxBB