Hello Guys I have written some small banner grabbing script in python. It is very simple and basic. By using this script you can check the services any network or domain. You will be able to know which services as well as version of service they are using.
In our penetration testing we do some nmap or other port scanning. After we come to know that these much of ports are opened, we try to find the version of service they are using. We do that in order to find if there is any direct exploit available or not. So in this case this little code will help you to find out the version of services.
Script
# FTP BANNER GRABBING SCRIPT # Created By : Chintan Gurjar # Date = 07/08/2013
import socket
import urllib2
print("\n \nINFORMATION GATHERING OF TARGET") print("By - Chintan Gurjar") print("Contact : chintangurjar@outlook.com \n\n") import socket import urllib2 # FTP Fingerprinting host1 = str(raw_input("Enter the IP adress of the domain:")) print(" \n \n ***** FTP Banner Grabbing ***** \n") socket.setdefaulttimeout(33) con = socket.socket() con.connect((host1,21)) result = con.recv(33333) print result #HTTP FINGERPRINTING SCRIPT print(" \n \n ***** HTTP Banner Grabbing ***** \n") host2 = raw_input("Enter the full URL starts with HTTP or HTTPS \n eg : http://www.lucideus.com/ \n Enter Url Here => :") c = urllib2.urlopen(host2) print c.info() print c.getcode() print("Thank You")
Usage :
Download Script : https://www.dropbox.com/s/0f5wznwpo9ex2qj/Banner_grabbing.py