-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathip2dns.pl
More file actions
42 lines (35 loc) · 993 Bytes
/
ip2dns.pl
File metadata and controls
42 lines (35 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/perl
# CODED BY AntiGov @ ma
# IDEA BY STRYNGS
use strict;
use warnings;
use WWW::UserAgent::Random;
use Term::ANSIColor qw(:constants);
use LWP;
use 5.010;
if ( $#ARGV != 1 ) {
say("Usage: ./$0 InFile OutFile");
exit(0);
}
my $infile = $ARGV[0];
my $outfile = $ARGV[1];
open( FN, '<', $infile ) or die $!;
my @ips = <FN>;
my $user_agent = rand_ua("browsers");
my $req = new LWP::UserAgent;
$req->agent($user_agent);
$req->proxy( [ 'https', 'http' ], 'http://127.0.0.1:8118/' );
foreach my $ip (@ips) {
chomp($ip);
say( BOLD YELLOW, "[+]Status: Searching: " . BOLD WHITE, "$ip" );
my $url = 'https://www.robtex.com/q/x1?q=' . $ip . '&l=go';
my $resp = $req->get($url);
my $body = $resp->content;
my @x = ( $body =~ />host\sname\s<b>(.+)<\/b>/g );
foreach (@x) {
my $url = $_;
say( BOLD WHITE, "[+]Found: " . BOLD GREEN, "$url" );
open( FN, '>>', $outfile ) or die $!;
print FN "$url\n";
}
}