Return to Snippet

Revision: 22220
at January 6, 2010 10:24 by trg


Initial Code
#!/usr/bin/python
 
import sys
from socket import *
 
for port in range(int(sys.argv[2].split('-')[0]), int(sys.argv[2].split('-')[1])+1):
    try:socket(AF_INET, SOCK_STREAM).connect((sys.argv[1], port)); print "Able to connect to port:", port
    except: pass

Initial URL

                                

Initial Description
This is mostly just a "Hello World" post for Snipplr... nothing impressive here

Initial Title
Python Port Scanner

Initial Tags

                                

Initial Language
Python