In fifth part of our Python blog entry i will write my own script.

This script will provide us with the port information of any Linux service.

Also you will see a touch of socket programming in python. Enjoy !

I have named this script as porter.

#!/usr/bin/env python

#program for port info by Hyperi0n

print ” Porter ver 0.1 Created by Hyp3ri0n”

import socket
import time

I = raw_input (‘Please enter the service name’)

print ” You Typed”, I

p = socket.getservbyname(I)

print “port of this Service is”, p


print “………………”


Enjoy !

Please Comment ” It makes me feel alive”


Salman Aftab

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.