def get_reverse_from_logontube(value, extensive): url = 'http://reverseip.logontube.com/?url=' + value + '&output=json' data = core.get_json_from_url(url) domain = (data['response']['domains']) domains=[] if not core.get_ip(value) == False: ip = core.get_ip(value) for site in domain: if site != '': if not extensive: result = core.get_ip(site) if result==ip or result==None: domains.append(site) elif extensive: domains.append(site) return domains
def get_reverse_from_logontube(value, extensive): url = 'http://reverseip.logontube.com/?url=' + value + '&output=json' data = core.get_json_from_url(url) domain = (data['response']['domains']) domains = [] if not core.get_ip(value) == False: ip = core.get_ip(value) for site in domain: if site != '': if not extensive: result = core.get_ip(site) if result == ip or result == None: domains.append(site) elif extensive: result = core.get_ip(site) domains.append(site + " " + result) return domains
def host_inspect(target, extensive): if core.is_valid_ip(target): msg = "Ip Validation OK" logger.debug(msg) msg = "[+] Valid ip" logger.info(msg) msg = "[*] Performing hostname conversion" logger.info(msg) try: value = core.get_host_by_ip(target) util.list_to_string(value) except: msg = "[-] ERROR: Cannot resolve hostname" logger.error(msg) elif core.is_valid_hostname(target): msg = "Host Validation OK" logger.debug(msg) msg = "[+] Valid host" logger.info(msg) msg = "[*] Performing ip conversion" logger.info(msg) try: value = core.get_host_by_name(target) util.list_to_string(value) except: msg = "[-] ERROR: Cannot resolve hostname" logger.error(msg) else: msg = "[-] ERROR: You must provide a valid target. Given: "+ target showhelp() logger.error(msg) sys.exit(1) db = GEOIPFILE geo = core.ip_to_country(core.get_ip(target), db) if geo: msg = "[+] The host is situated in "+geo logger.info(msg) else: msg = "[-] Cannot geolocalize the host" logger.warning(msg) if extensive: msg = "Extensive probing" logger.debug(msg) msg = "[*] Starting extensive information gathering" logger.info(msg) whois = core.get_extensive_data(target, 0) info = core.get_extensive_data(target, 1) dns = core.get_extensive_data(target, 2)
def host_inspect(target, extensive): if core.is_valid_ip(target): msg = "Ip Validation OK" logger.debug(msg) msg = "[+] Valid ip" logger.info(msg) msg = "[*] Performing hostname conversion" logger.info(msg) try: value = core.get_host_by_ip(target) util.list_to_string(value) except: msg = "[-] ERROR: Cannot resolve hostname" logger.error(msg) elif core.is_valid_hostname(target): msg = "Host Validation OK" logger.debug(msg) msg = "[+] Valid host" logger.info(msg) msg = "[*] Performing ip conversion" logger.info(msg) try: value = core.get_host_by_name(target) util.list_to_string(value) except: msg = "[-] ERROR: Cannot resolve hostname" logger.error(msg) else: msg = "[-] ERROR: You must provide a valid target. Given: " + target showhelp() logger.error(msg) sys.exit(1) db = GEOIPFILE geo = core.ip_to_country(core.get_ip(target), db) if geo: msg = "[+] The host is situated in " + geo logger.info(msg) else: msg = "[-] Cannot geolocalize the host" logger.warning(msg) if extensive: msg = "Extensive probing" logger.debug(msg) msg = "[*] Starting extensive information gathering" logger.info(msg) whois = core.get_extensive_data(target, 0) info = core.get_extensive_data(target, 1) dns = core.get_extensive_data(target, 2)
def get_reverse_from_yougetsignal(value, extensive): url = 'http://domains.yougetsignal.com/domains.php?remoteAddress=' + value data = core.get_json_from_url(url) status = (data['status']) domains=[] if status=='Success': domain = (data['domainArray']) if not core.get_ip(value) == False: ip = core.get_ip(value) for value in domain: for site in value: if site != '': if not extensive: result = core.get_ip(site) if result==ip or result==None: domains.append(site) elif extensive: domains.append(site) return domains else: return False
def get_reverse_from_yougetsignal(value, extensive): url = 'http://domains.yougetsignal.com/domains.php?remoteAddress=' + value data = core.get_json_from_url(url) status = (data['status']) domains = [] if status == 'Success': domain = (data['domainArray']) if not core.get_ip(value) == False: ip = core.get_ip(value) for value in domain: for site in value: if site != '': if not extensive: result = core.get_ip(site) if result == ip or result == None: domains.append(site) elif extensive: result = core.get_ip(site) domains.append(site + " " + result) return domains else: return False