Skip to content

This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.

first commit

aw-junaid2bbbc2940f6e
diff --git a/port_scanner.py b/port_scanner.py
new file mode 100644
index 0000000..03c3e74
--- /dev/null
+++ b/port_scanner.py
@@ -0,0 +1,30 @@
+
+
+import socket
+import termcolor
+
+
+def scan(target, ports):
+ print('\n' + ' Starting Scan For ' + str(target))
+ for port in range(1,ports):
+ scan_port(target,port)
+
+
+def scan_port(ipaddress, port):
+ try:
+ sock = socket.socket()
+ sock.connect((ipaddress, port))
+ print("[+] Port Opened " + str(port))
+ sock.close()
+ except:
+ pass
+
+
+targets = input("[*] Enter Targets To Scan(split them by ,): ")
+ports = int(input("[*] Enter How Many Ports You Want To Scan: "))
+if ',' in targets:
+ print(termcolor.colored(("[*] Scanning Multiple Targets"), 'green'))
+ for ip_addr in targets.split(','):
+ scan(ip_addr.strip(' '), ports)
+else:
+ scan(targets,ports)