| skipped 73 lines |
74 | 74 | | args.ct |
75 | 75 | | ) |
76 | 76 | | |
| 77 | + | if args.subdomains or args.vt or args.subdomains or args.phishing \ |
| 78 | + | or args.portscheck: |
| 79 | + | print("[*] Total found:", len(file_content)) |
| 80 | + | |
77 | 81 | | # Check for subdomains |
78 | 82 | | if (args.subdomains): |
| 83 | + | list_aux = [] |
79 | 84 | | print("\n+---------- Checking for Subdomains ----------+") |
80 | 85 | | time.sleep(1) |
81 | 86 | | for domain in file_content: |
82 | 87 | | print("[*]", domain) |
83 | | - | subdomains = vt.VirusTotal().main(domain) |
| 88 | + | subdomains = vt.VirusTotal().main(domain, "subdomains") |
84 | 89 | | |
85 | 90 | | if subdomains: |
86 | 91 | | for subdomain in subdomains: |
| skipped 2 lines |
89 | 94 | | " \_", subdomain + |
90 | 95 | | Style.RESET_ALL, |
91 | 96 | | ) |
| 97 | + | list_aux.append(subdomain) |
| 98 | + | file_content = list_aux |
| 99 | + | print("[*] Total found:", len(file_content)) |
| 100 | + | |
| 101 | + | # Check for VirusTotal |
| 102 | + | if (args.vt): |
| 103 | + | list_aux = [] |
| 104 | + | print("\n+---------- VirusTotal ----------+") |
| 105 | + | time.sleep(1) |
| 106 | + | for domain in file_content: |
| 107 | + | malicious = vt.VirusTotal().main(domain, "malicious") |
| 108 | + | |
| 109 | + | if malicious > 0: |
| 110 | + | print( |
| 111 | + | Style.BRIGHT + Fore.RED + |
| 112 | + | "[*] found:", domain, "({})".format(str(malicious)) + |
| 113 | + | Style.RESET_ALL, |
| 114 | + | ) |
| 115 | + | list_aux.append(domain) |
| 116 | + | elif malicious < 0: |
| 117 | + | print( |
| 118 | + | Style.BRIGHT + Fore.YELLOW + |
| 119 | + | "[*] VT is throttling the response:", domain + |
| 120 | + | Style.RESET_ALL, |
| 121 | + | ) |
| 122 | + | file_content = list_aux |
| 123 | + | print("[*] Total found:", len(file_content)) |
92 | 124 | | |
93 | 125 | | # Check for phishing |
94 | 126 | | if (args.phishing != ""): |
95 | 127 | | file_phishing = phishing.Phishing().main(args.keywords) |
96 | 128 | | output.SaveFile().main(args.phishing, "txt", file_phishing) |
97 | 129 | | |
| 130 | + | # Check if domain has webserver port opened |
98 | 131 | | if (args.portcheck): |
99 | | - | file_content_ports = [] |
| 132 | + | list_aux = [] |
100 | 133 | | print("\n+---------- Domains with open webserver ports ----------+") |
101 | 134 | | time.sleep(1) |
102 | 135 | | |
| skipped 1 lines |
104 | 137 | | ports = port_check.PortCheck().main(domain) |
105 | 138 | | |
106 | 139 | | if ports: |
107 | | - | file_content_ports.append(domain) |
| 140 | + | list_aux.append(domain) |
108 | 141 | | print( |
109 | 142 | | Fore.YELLOW + |
110 | 143 | | "[*]", domain, ports, "" + |
111 | 144 | | Style.RESET_ALL, |
112 | 145 | | ) |
113 | | - | |
114 | | - | file_content = file_content_ports |
| 146 | + | file_content = list_aux |
| 147 | + | print("[*] Total found:", len(file_content)) |
115 | 148 | | |
116 | 149 | | output.SaveFile().main(args.output, args.type, file_content) |
117 | 150 | | end_time_squatting = round(time.time() - start_time_squatting, 2) |
| skipped 20 lines |