Wednesday, June 26, 2013

networkscanner.py 1.4

The is a TCP port network scanner. It takes a CIDR network range as input and perform the network TCP scan. Optionally, you can:

  • Change the default TCP port [22] to others. Such as 22,80,443
  • Take input from a text file [1/line]
  • Can specify the number of threads.

This version uses function, queue (for synchronization), threading (for speed), and class (OO).

Comments:
  • Lack of accuracy. May miss out some ports.
  • Slow. Have to wait till timeout for joining the queue and threads.

IP Geolocator (Python Script)

Here's the 1st modified python script to perform geolocation checking on whois. By supplying an IP address, it will locate the country and the whois[OrgName].

import re
import sys
import urllib2
import BeautifulSoup
 
usage = "Run the script: ./geolocate.py IPAddress"
if len(sys.argv)!=2:
    print(usage)
    sys.exit(0)
if len(sys.argv) > 1:
    ipaddr = sys.argv[1]
 
geody = "http://www.geody.com/geoip.php?ip=" + ipaddr
html_page = urllib2.urlopen(geody).read()
soup = BeautifulSoup.BeautifulSoup(html_page)
# Filter paragraph containing geolocation info.
paragraph = soup('p')[3]
# Remove html tags using regex.
geo_txt = re.sub(r'<.*?>', '', str(paragraph))
print geo_txt[32:].strip()

Thursday, June 20, 2013

dnsresolver1.py

This script helps to resolve DNS to IP address.

1st, it prompts to input a text file name that contains list of FQDN. Then it resolves them into IP address.

Comments:

  • Simple.
  • Planning to add in whois option.

Friday, June 14, 2013

networkscanner.py 1.3

The is a TCP port network scanner. It takes a CIDR network range as input and perform the network TCP scan. Optionally, you can:

  • Change the default TCP port [22] to others. Such as 22,80,443
  • Take input from a text file [1/line]

This version uses function, and threading (for speed).

Comments:

  • Fast, reliable and high accuracy. 
  • Planning to improve with OO and threads control.

networkscanner.py 1.2

The is a TCP port network scanner. It takes a CIDR network range as input and perform the network TCP scan. Optionally, you can:
  • Change the default TCP port [22] to other.
  • Take input from a text file [1/line]


This version uses function, and threading (for speed).

Comments:
  • Fast, reliable and high accuracy. 
  • Planning to improve it by allow to specify multiple ports.

networkscanner.py 1.1

The is a TCP port network scanner. It takes a CIDR network range as input and perform the network TCP scan. Optionally, you can:

  • Change the default TCP port [22] to other.


This version uses function, and threading (for speed).

Comments:

  • Fast, reliable and high accuracy. 
  • Planning to improve it by allow to specify input file [1/line].