Info BackTrack

Linux & Security Tutorial


Script python ini berfungsi untuk mencari jumlah alamat ip dan port yang terbuka secara acak.


python NUM

NUM : adalah jumlah alamat ip yang ingin anda hasilkan.

# This was written for educational purpose and pentest only. Use it at your own risk.
# Author will be not responsible for any damage!
# !!! Special greetz for my friend sinner_01 !!!
# Toolname        :
# Coder           : baltazar a.k.a b4ltazar <>
# Version         : 0.1
# Greetz for rsauron and low1z, great python coders
# greetz for d3hydr8, r45c4l, fx0, Soul, MikiSoft, c0ax, b0ne and all members of ex,

import sys, subprocess, socket, httplib, threading
from time import sleep
import random as ran

timeout = 5

def logo():
  print "n|---------------------------------------------------------------|"
  print "| b4ltazar[@]gmail[dot]com                                      |"
  print "|   04/2012    v.0.1                           |"
  print "|     &               |"
  print "|                                                               |"
  print "|---------------------------------------------------------------|n"

if sys.platform == 'linux' or sys.platform == 'linux2':"clear", shell=True)
else:"cls", shell=True)

if len(sys.argv) != 2:
    print "[!] Usage: python NUM"
    print "[!] Please visit &"
    print "[!] Thx for using this script, now exiting!"

number = int(sys.argv[1])
port = int(80)

def randomIP():
    ran1 = ran.randrange(255) + 1
    ran2 = ran.randrange(255) + 1
    ran3 = ran.randrange(255) + 1
    ran4 = ran.randrange(255) + 1
    randIP = "%d.%d.%d.%d" % (ran1, ran2, ran3, ran4)
    return randIP

def srvscan(ip, e):
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.connect((ip, port))

def srvcheck(ip):
    conn = httplib.HTTPConnection(ip, port)
        conn.request("HEAD", "/")
    except socket.timeout:
        print "n[-] Server Timeout", ip
    except(KeyboardInterrupt, SystemExit):
        print "[!] Now exiting, thx for using this script!"
    r1 = conn.getresponse()
    server = r1.getheader('Server')
    xpoweredby = r1.getheader('x-powered-by')
    date = r1.getheader('date')
    if xpoweredby == None:
        print "n[+] Ip of server: "+ip
        print "[+] Server info: "+server
        print "[+] Server date: "+date
        print "n[+] Ip of server: "+ip
        print "[+] Server info: "+server
        print "[+] Xpoweredby: "+xpoweredby
        print "[+] Server date: "+date

if __name__ == "__main__":
    print "[!] There is %s random IP addresses for checking" % number
    print "[!] Port for checking: %s" % str(port)
    print "[!] Let's start ...n"

    for x in xrange(number):
        threading.Thread(target=srvscan, args=(randomIP(), 0)).start()
    print "n[!] Scanning finished!"
    print "[!] Please visit &"

Artikel Terkait:

3 responses to “./

  1. renzrawk August 19, 2012 at 5:26 pm

    jadi ip terbuka itu buat apa yah bang ?

  2. renzrawk August 20, 2012 at 8:11 am

    oh gitu yah bang
    okey nice info yah bang

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: