■ ■ ■ ■ ■ ■
backend/storage/tools/libs/tools/httpx.rb
| skipped 36 lines |
37 | 37 | | |
38 | 38 | | # Allows not to pollute the recon with useless domains |
39 | 39 | | # Ex http://www.domain.tld 302 to https://www.domain.tld |
40 | | - | next if url.start_with?('http://') && url.match?(%r{https://(www\.)?#{host}(:443)?/?}) |
41 | | - | next if url.match?(%r{https://.*:80}) |
| 40 | + | next if url.start_with?('http://') && result_json['location'].match?(%r{https://(www\.)?#{host}(:443)?/?}) |
| 41 | + | next if url.start_with?('https://') && url.end_with?(':80') |
| 42 | + | next if url.start_with?('http://') && url.end_with?(':443') |
42 | 43 | | |
43 | | - | url.sub!(':443', '') |
44 | | - | url.sub!(':80', '') |
| 44 | + | url.sub!(':443', '') if url.end_with?(':443') |
| 45 | + | url.sub!(':80', '') if url.end_with?(':80') |
45 | 46 | | |
46 | 47 | | technologies = [] |
47 | 48 | | |
| skipped 46 lines |