4 ms·
This is brilliant. Thank you so much! Edit: I made a modification for conciseness' sake, and to include SSH in the mix as that can be used as a poor man's VPN.
by AnkhMorporkian 10y ago
This is brilliant. Thank you so much!
Edit: I made a modification for conciseness' sake, and to include SSH in the mix as that can be used as a poor man's VPN.
def is_vpn(self, ip):
api = shodan.Shodan(self.config['keys']['shodan'])
host = api.host(ip)
return any(banner['port'] in [22, 80, 500, 4500] for banner in host['data'])
- achillean 10y agoI realized it only afterwards but you can actually just look at the host['ports'] property which contains a list of ports that were found open. And you might also want to include PPTP on port 1723.