Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- # slow gan ane hanya newbie hehehe
- class NyariPort:
- def __init__(self, ip):
- self.ip = ip
- def getPort(self):
- self.host = socket.gethostbyname(self.ip)
- print("menghubungkan ke {}\n".format(self.host))
- for port in range(1,10000):
- net = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
- res = net.connect_ex((self.host,port))
- if res == 0:
- print("port {} terbuka! ^_^".format(port))
- print("\n\033[91mRampung coy -.-")
- if __name__=='__main__':
- import socket
- url = input("target host: ")
- e = NyariPort(url)
- e.getPort()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement