-
Notifications
You must be signed in to change notification settings - Fork 2
!notes
Artëm Tsvetkov edited this page Dec 12, 2019
·
3 revisions
#!/usr/bin/env python3
from bs4 import BeautifulSoup as BS
from pathlib import Path
'''
nmap -Pn -n -vvv --script ssl-enum-ciphers -p 443 -oA nmap.ssl -iL hosts
'''
xml = Path('nmap.ssl.xml')
if not xml.exists():
exit(f'{xml} not found!')
soup = BS(xml.read_text(), 'lxml')
print(f'] TLSv1.0'.rjust(30, '='))
for host in soup.find_all('host'):
_ip = host.find('address')['addr']
for port in host.find_all('port'):
_port = port['portid']
script = port.find('script')
if not script:
continue
output = script['output']
if 'TLSv1.0' not in output:
continue
print(f'{_ip}:{_port}')