Skip to content

Instantly share code, notes, and snippets.

View thermosilla's full-sized avatar

Tomás Hermosilla thermosilla

  • Santiago, Chile
View GitHub Profile
@thermosilla
thermosilla / scanports.py
Created March 23, 2012 02:17
Python port scaner
#! /usr/bin/python2.7
import argparse
import socket
def prueba_host(host, puerto):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(10)
try:
s.connect((host, int(puerto)))
import operator
nums = {
1: "(4/4)",
2: "(4/r(4))",
4: "(r(4)+r(4))",
6: "(r(4)+4)",
8: "(4+4)",
9: "(4/.4')",