An ip and port scanner with the ability to scan in seconds
import socket
from colorama import *
def is_port_open(ip, port):
"""
`ip` has the `port` open
"""
s = socket.socket()
try:
host=input("Enter the ip:")
for port in range(1, 1025):
if is_port_open(host, port):
print(f"{GREEN}[+] {host}:{port} is open {RESET}")
else:
Stop code
ctrl+c
Code execution
git clone https://github.com/m4rks30/ip.and.port
ls
cd ip.and.port
python ips1.py