Created
August 9, 2024 01:01
-
-
Save JadaDev/6b237c2c99a21f9ae6a18be8c1ecadfa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
websites = [ | |
"google.com", "facebook.com" # Add More Here | |
] | |
# List of common ports | |
ports = "20,21,22,23,25,53,67,68,69,80,110,143,161,162,194,443,465,514,993,995,1433,1434,3306,3389,5432,5900,6379,6660,6661,6662,6663,6664,6665,6666,6667,8080,8443" | |
url = "https://port.jadadev.com/api.php" | |
for website in websites: | |
params = { | |
"ip": website, | |
"port": ports, | |
"removeClosed": "true" | |
} | |
response = requests.get(url, params=params) | |
data = response.json() | |
ip = data["ip"] | |
ports_status = data["ports"] | |
status = data["status"] | |
print(f"Website: {ip}") | |
for port in ports_status: | |
print(f"Port {port}: {'Open' if status[port] else 'Closed'}") | |
print("-" * 40) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment