Port Scanning With Python

  
from socket import *
prompt = 'masukkan ip yang ingin Anda Scan : '
target = raw_input(prompt)
prompt = 'Mulai Scan Dari port : '
port_mulai = input(prompt)
prompt = 'Berakhir Di Port : '
port_akhir = input(prompt)
ip_target = gethostbyname(target)
print 'Mulai Scan di host ',ip_target
for i in range (port_mulai , port_akhir):
s = socket(AF_INET, SOCK_STREAM)
ulang = s.connect_ex((ip_target,i))
if (ulang == 0):
print 'Port %d: Kebuka' % (i,)
s.close()


Port Scanning With Python Port Scanning With Python Reviewed by Unknown on 5:31 AM Rating: 5
Editor By 54v0y. Powered by Blogger.