Showing posts with label port scanner. Show all posts
Showing posts with label port scanner. Show all posts

Saturday, 4 August 2012

Making a simple port scanner

Lets make a simple port scanner with opens a full TCP connection to detect if a port is open or not.
This is not the best way to scan because it makes a lot of noise, some other ways are Half TCP (TCP SYN) and TCP FIN.
Code in python::

import socket
i = “127.0.0.1″
for p in range(19, 26):
spy = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
spy.connect((i, p)

LinkWithin

Related Posts Plugin for WordPress, Blogger...