Skip to content

Instantly share code, notes, and snippets.

@R3DHULK
Created February 10, 2023 15:08
Show Gist options
  • Save R3DHULK/a9a264e8976c08772a71c34f6f8fc3ab to your computer and use it in GitHub Desktop.
Save R3DHULK/a9a264e8976c08772a71c34f6f8fc3ab to your computer and use it in GitHub Desktop.
Website Vulnerability Scanner In Python
#pip install portscanner
import portscanner
targets_ip = input('[+] * Enter Target To Scan For Vulnerable Open Ports: ')
port_number = int(input('[+] * Enter Amount Of Ports You Want To Scan (500 - First 500 Ports): '))
vul_file = input('[+] * Enter Path To The File With Vulnerable Softwares: ')
print('\n')
target = portscanner.portscan(targets_ip, port_number)
target.scan()
with open(vul_file,'r') as file:
count = 0
for banner in target.banners:
file.seek(0)
for line in file.readlines():
if line.strip() in banner:
print('[!!] VULNERABLE BANNER: "' + banner + '" ON PORT: ' + str(target.open_ports[count]))
count += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment