Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
r['location.country'],
" ".join(r['protocols'])
)
)
else:
print("[+] %s\t\t[Location: %s] [Ports: %s]" % (
r['ip'],
r['location.country'],
" ".join(r['protocols'])
)
)
else:
try:
ip = api.view(args.IP)
print(json.dumps(ip, sort_keys=True, indent=4, separators=(',', ': ')))
except censys.base.CensysNotFoundException:
print('IP not found')
elif args.subcommand == 'cert':
try:
c = certificates.CensysCertificates(conf['Censys']['id'], conf['Censys']['secret'])
res = c.view(args.ID)
except censys.base.CensysNotFoundException:
print("Certificate not found")
else:
print(json.dumps(res, sort_keys=True, indent=4, separators=(',', ': ')))
elif args.subcommand == 'subdomains':
subdomains = self.get_subdomains(conf, args.DOMAIN, args.verbose)
for d in subdomains:
print(d)
else:
self.parser.print_help()
else: