random- collection of un-sorted bollocks |
git clone git://git.acid.vegas/random.git |
Log | Files | Refs | Archive |
ampscan.py (1326B)
1 #!/usr/bin/env python 2 # developed by acidvegas in Python (https://acid.vegas/random) 3 4 import socket, struct, random, threading 5 6 scan_ports = { 7 17 : 'qotd', # 140.3 8 19 : 'chargen', # 358.8 9 53 : 'dns', # 28-54 10 69 : 'tftp', # 60 11 111 : 'portmap', # 7 to 28 12 123 : 'ntp', # 556.9 13 137 : 'netbios', # 3.8 14 139 : 'ws-discovery', # 15k 15 161 : 'snmpv2', # 6.3 16 520 : 'ripv1', # 131.24 17 389 : 'ldap', # 46-55 (TCP) 18 389 : 'cldap', # 56-70 19 445 : 'ws-discovery', # 15k 20 751 : 'kad', # 16.3 21 1900 : 'ssdp', # 30.8 22 3283 : 'apple remote', # 35.5 23 1434 : 'mssql', # 25 24 5353 : 'mdns', # 2-10 25 6881 : 'bittorrent', # 3.8 26 26000 : 'quake', # 63.9 27 27015 : 'steam', # 5.5 28 11211 : 'memcached', # 10k-51k 29 } 30 31 def scan(): 32 while True: 33 ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff))) 34 for port in scan_ports: 35 sock = socket.socket() 36 sock.settimeout(3) 37 try: 38 code = sock.connect((ip, port)) 39 except socket.error: 40 pass 41 else: 42 if not code: 43 print('FOUND ' + ip + ':' + str(port) + ' (' + scan_ports[port] + ')') 44 finally: 45 sock.close() 46 47 for i in range(100): 48 threading.Thread(target=scan).start() 49 50 while True: 51 input('')