twopac Posted June 25, 2015 Report Posted June 25, 2015 Am cumparat acum cateva zile de la cineva acest scanner si in 2 zile de scanat cu el tot astept sa prind si eu 1 socks. ) Poate nu stiu eu sa-l folosesc rog pe cei care il testeaza sa posteze un feedback .python scanner.py start_ip-end_ipimport sysimport osimport socketimport urllibfrom random import randintdef get_ports(): port=[] for i in range(0,65536): if(i!=80 and i!=1080): port.append(i) return portports = get_ports()get_host = "https://www.google.com"socket.setdefaulttimeout(3)def getGeo(ip): return urllib.urlopen('http://ipinfo.io/'+ip+'/country').read()def get_ips(start_ip, stop_ip): ips = [] tmp = [] for i in start_ip.split('.'): tmp.append("%02X" % long(i)) start_dec = long(''.join(tmp), 16) tmp = [] for i in stop_ip.split('.'): tmp.append("%02X" % long(i)) stop_dec = long(''.join(tmp), 16) while(start_dec < stop_dec + 1): bytes = [] bytes.append(str(int(start_dec / 16777216))) rem = start_dec % 16777216 bytes.append(str(int(rem / 65536))) rem = rem % 65536 bytes.append(str(int(rem / 256))) rem = rem % 256 bytes.append(str(rem)) ips.append(".".join(bytes)) start_dec += 1 return ipsdef scan(ip): vuln = open('vuln.txt', 'a') for port in ports: try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((ip, port)) print "Am gasit unu!\n" vuln.write(ip + ":" + str(port)+'|'+getGeo(ip)+'\n') vuln.flush() s.send("GET " + get_host + " HTTP/1.0\r\n") s.send("\r\n") while 1: data = s.recv(1024) if not data: break print data s.close() except socket.error: print 'Scanez..'if len(sys.argv) < 2: print sys.argv[0] + "IP: start-end" sys.exit(1)else: if len(sys.argv) == 3: get_host = sys.argv[2] if sys.argv[1].find('-') > 0: start_ip, stop_ip = sys.argv[1].split("-") ips = get_ips(start_ip, stop_ip) while len(ips) > 0: i = randint(0, len(ips) - 1) aip = str(ips[i]) del ips[i] scan(aip) else: scan(sys.argv[1]) Quote
Elohim Posted June 25, 2015 Report Posted June 25, 2015 E un port scanner mai degrab decat un socks scanner.Nu are threading + faptul ca scaneaza 60 000 de port-uri aiurea, il face mai incet decat munca manuala al unui chinez.In termeni mai usor, face un ip in 5-6 minute. O clasa A are 255^3 ip-uri. Quote
Gio33 Posted June 26, 2015 Report Posted June 26, 2015 Poti sa uiti de el, e o porcarie inutila. Quote
twopac Posted June 26, 2015 Author Report Posted June 26, 2015 Asta ziceam si eu @Elohim ca nu are threading poate ma ajuti tu cu ceva de gen ca stiu ca esti serios(iti platesc nu vreau moka). ''Scanner'' asta daca il pot numi asa e facut de cineva de aici de pe forum . Quote
twopac Posted June 26, 2015 Author Report Posted June 26, 2015 multumesc @tqcsu vroiam si eu ceva mai avansat ca doar am platit cat a cerut omu nu m-am tiganit cu el. Quote
twopac Posted June 26, 2015 Author Report Posted June 26, 2015 Apropo , acest renumit ''Scanner" a fost realizat de un renumit coder @Worm64 Quote