Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.43 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use if $^O eq "MSWin32", Win32::Console::ANSI;
  4. use Getopt::Long;
  5. use HTTP::Request;
  6. use LWP::UserAgent;
  7. use IO::Select;
  8. use HTTP::Headers;
  9. use IO::Socket;
  10. use HTTP::Response;
  11. use Term::ANSIColor;
  12. use HTTP::Request::Common qw(POST);
  13. use HTTP::Request::Common qw(GET);
  14. use URI::URL;
  15. use IO::Socket::INET;
  16. use Data::Dumper;
  17. use LWP::Simple;
  18. use JSON qw( decode_json encode_json );
  19.  
  20. my $ua = LWP::UserAgent->new;
  21. $ua = LWP::UserAgent->new(keep_alive => 1);
  22. $ua->agent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31");
  23.  
  24. GetOptions(
  25. "h|help" => \$help,
  26. "i|info=s" => \$site1,
  27. "n|number=s" => \$PhoneNumber,
  28. "mx|mailserver=s" => \$site2,
  29. "w|whois=s" => \$site3,
  30. "l|location=s" => \$site4,
  31. "c|cloudflare=s" => \$site5,
  32. "a|age=s" => \$site6,
  33. "ua|useragent=s" => \$useragent,
  34. "p|port=s" => \$target,
  35. "b|bin=s" => \$bin,
  36. "s|subdomain=s" => \$site8,
  37. "e|email=s" => \$email,
  38. "cms|cms=s" => \$site7,
  39. );
  40.  
  41. if ($help) { banner();help(); }
  42. if ($site1) { banner();Websiteinformation(); }
  43. if ($PhoneNumber) { banner();Phonenumberinformation(); }
  44. if ($site2) { banner();FindIPaddressandemailserver(); }
  45. if ($site3) { banner();Domainwhoislookup(); }
  46. if ($site4) { banner();Findwebsitelocation(); }
  47. if ($site5) { banner();CloudFlare(); }
  48. if ($site6) { banner();DomainAgeChecker(); }
  49. if ($useragent) { banner();UserAgent(); }
  50. if ($bin) { banner();BIN(); }
  51. if ($site8) { banner();subdomain(); }
  52. if ($email) { banner();email(); }
  53. if ($site7) { banner();cms(); }
  54. if ($target) { banner();port(); }
  55. unless ($help|$site1|$PhoneNumber|$site2|$site3|$site4|$site5|$site6|$useragent|$bin|$email|$site7|$site8|$target) { banner();menu(); }
  56.  
  57. ##### Help #######
  58. sub help {
  59. print item('1'),"Website Information ";
  60. print color('bold red'),"=> ";
  61. print color("bold white"),"perl Detektif.pl -i example.com\n";
  62. print item('2'),"Phone Number Information ";
  63. print color('bold red'),"=> ";
  64. print color("bold white"),"perl Detektif.pl -n xxxxxxx\n";
  65. print item('3'),"Find IP Address And E-mail Server ";
  66. print color('bold red'),"=> ";
  67. print color("bold white"),"perl Detektif.pl -mx example.com\n";
  68. print item('4'),"Domain Whois Lookup ";
  69. print color('bold red'),"=> ";
  70. print color("bold white"),"perl Detektif.pl -w example.com\n";
  71. print item('5'),"Find Website/IP Address Location ";
  72. print color('bold red'),"=> ";
  73. print color("bold white"),"perl Detektif.pl -l example.com\n";
  74. print item('6'),"Bypass CloudFlare ";
  75. print color('bold red'),"=> ";
  76. print color("bold white"),"perl Detektif.pl -c example.com\n";
  77. print item('7'),"Domain Age Checker ";
  78. print color('bold red'),"=> ";
  79. print color("bold white"),"perl Detektif.pl -a example.com\n";
  80. print item('8'),"User Agent Info ";
  81. print color('bold red'),"=> ";
  82. print color("bold white"),"perl Detektif.pl -ua Mozilla/5.0 xxxxxxxxxxxxxxxxxxxx\n";
  83. print item('9'),"Check Active Services On Resource";
  84. print color('bold red'),"=> ";
  85. print color("bold white"),"perl Detektif.pl -p 127.0.0.1\n";
  86. print item('10'),"Credit Card Bin Checker ";
  87. print color('bold red'),"=> ";
  88. print color("bold white"),"perl Detektif.pl -b 123456\n";
  89. print item('11'),"Subdomain Scanner ";
  90. print color('bold red'),"=> ";
  91. print color("bold white"),"perl Detektif.pl -s example.com\n";
  92. print item('12'),"E-mail Address Checker ";
  93. print color('bold red'),"=> ";
  94. print color("bold white"),"perl Detektif.pl -e example@gmail.com\n";
  95. print item('13'),"Content Management System Checker ";
  96. print color('bold red'),"=> ";
  97. print color("bold white"),"perl Detektif.pl -cms example.com\n";
  98. }
  99.  
  100. ##### Banner #######
  101. sub banner {
  102. if ($^O =~ /MSWin32/) {system("mode con: cols=100 lines=29");system("cls"); }else { system("resize -s 28 87");system("clear"); }
  103. print "____ ______ _____ ______ __ __ _____ _ ______ \n";
  104. print " || \\ || | |_ _| || | || // |_ _| | | || \n";
  105. print " || \\ ||___ | | ||___ || // | | | | ||__ \n";
  106. print " || // || | | || || \\ | | | | || \n";
  107. print " ||__/ ||____/ |_| ||____/ || \\ |_| |_| || \n";
  108. print " ~~~~~ ~~~~~~~ ~~~ ~~~~~~~ ~~ ~~ ~~~ ~~~ ~~ \n";
  109. print " \n";
  110. print color('bold green')," V.1\n\n";
  111. print " \033[0;31m[\033[0;33m127.0.0.1\033[0;31m] \033[0;37m|_|\033[0;31m [\033[1;34m192.168.1.1\033[0;31m] \033[0;37m\n";
  112. print " \033[0;31m[\033[0;37mDitata Oleh BLackWhiteTeam\033[0;31m]\033[0;37m\n";
  113. print " \n";
  114. }
  115.  
  116. ##### Menu #######
  117. sub menu {
  118. print item('01'),"Website Information\n";
  119. print item('02'),"Phone Number Information\n";
  120. print item('03'),"Find IP Address And E-mail Server\n";
  121. print item('04'),"Domain Whois Lookup\n";
  122. print item('05'),"Find Website/IP Address Location\n";
  123. print item('06'),"Bypass CloudFlare\n";
  124. print item('07'),"Domain Age Checker\n";
  125. print item('08'),"User Agent Info\n";
  126. print item('09'),"Check Active Services On Resource\n";
  127. print item('10'),"Credit Card Bin Checker\n";
  128. print item('11'),"Subdomain Scanner\n";
  129. print item('12'),"Check E-mail Address\n";
  130. print item('13'),"Content Management System Checker\n";
  131. print item('14'),"Update\n\n";
  132. print item('-'),"Choose : ";
  133. print color('reset');
  134.  
  135. chomp($number=<STDIN>);
  136.  
  137. if($number eq '01'){
  138. banner();
  139. print item(),"Enter Website : ";
  140. chomp($site1=<STDIN>);
  141. banner();
  142. Websiteinformation();
  143. enter();
  144. }if($number eq '02'){
  145. banner();
  146. print item(),"Enter Phone Number : +";
  147. chomp($PhoneNumber=<STDIN>);
  148. banner();
  149. Phonenumberinformation();
  150. enter();
  151. }if($number eq '03'){
  152. banner();
  153. print item(),"Enter Website : ";
  154. chomp($site2=<STDIN>);
  155. banner();
  156. FindIPaddressandemailserver();
  157. enter();
  158. }if($number eq '04'){
  159. banner();
  160. print item(),"Enter Website : ";
  161. chomp($site3=<STDIN>);
  162. banner();
  163. Domainwhoislookup();
  164. enter();
  165. }if($number eq '05'){
  166. banner();
  167. print item(),"Enter Website/IP : ";
  168. chomp($site4=<STDIN>);
  169. banner();
  170. Findwebsitelocation();
  171. enter();
  172. }if($number eq '06'){
  173. banner();
  174. print item(),"Enter Website : ";
  175. chomp($site5=<STDIN>);
  176. banner();
  177. CloudFlare();
  178. enter();
  179. }if($number eq '07'){
  180. banner();
  181. print item(),"Enter Website : ";
  182. chomp($site6=<STDIN>);
  183. banner();
  184. DomainAgeChecker();
  185. enter();
  186. }if($number eq '08'){
  187. banner();
  188. print item(),"Enter User Agent : ";
  189. chomp($useragent=<STDIN>);
  190. my $find = "/";
  191. my $replace = "%2F";
  192.  
  193. $find = quotemeta $find;
  194. $useragent =~ s/$find/$replace/g;
  195. $useragent =~ s/ /+/g;
  196. banner();
  197. UserAgent();
  198. enter();
  199. }if($number eq '09'){
  200. banner();
  201. port();
  202. enter();
  203. }if($number eq '10'){
  204. banner();
  205. print item(),"Enter First 6 Digits Of A Credit Card Number : ";
  206. chomp($bin=<STDIN>);
  207. banner();
  208. BIN();
  209. enter();
  210. }if($number eq '11'){
  211. banner();
  212. print item(),"Enter website: ";
  213. chomp($site8=<STDIN>);
  214. banner();
  215. subdomain();
  216. enter();
  217. }if($number eq '12'){
  218. banner();
  219. print item(),"Enter E-mail : ";
  220. chomp($email=<STDIN>);
  221. banner();
  222. email();
  223. enter();
  224. }if($number eq '13'){
  225. banner();
  226. print item(),"Enter website: ";
  227. chomp($site7=<STDIN>);
  228. banner();
  229. cms();
  230. enter();
  231. }if($number eq '14'){
  232. update();
  233. }
  234. }
  235.  
  236. ####### Website information #######
  237. sub Websiteinformation {
  238. $url = "https://myip.ms/$site1";
  239. $request = $ua->get($url);
  240. $response = $request->content;
  241.  
  242. if($response =~/> (.*?) visitors per day </)
  243. {
  244. print item(),"Hosting Info for Website: $site1\n";
  245. print item(),"Visitors per day: $1 \n";
  246.  
  247. if($response =~/> (.*?) visitors per day on (.*?)</){
  248. print item(),"Visitors per day: $1 \n";
  249. }
  250. $ip= (gethostbyname($site1))[4];
  251. my ($a,$b,$c,$d) = unpack('C4',$ip);
  252. $ip_address ="$a.$b.$c.$d";
  253. print item(),"IP Address: $ip_address\n";
  254.  
  255. if($response =~/IPv6.png'><a href='\/info\/whois6\/(.*?)'>/)
  256. {
  257. $ipv6_address=$1;
  258. print item(),"Linked IPv6 Address: $ipv6_address\n";
  259. }
  260. if($response =~/IP Location: <\/td> <td class='vmiddle'><span class='cflag (.*?)'><\/span><a href='\/view\/countries\/(.*?)\/Internet_Usage_Statistics_(.*?).html'>(.*?)<\/a>/)
  261. {
  262. $Location=$1;
  263. print item(),"IP Location: $Location\n";
  264. }
  265. if($response =~/IP Reverse DNS (.*?)<\/b><\/div><div class='sval'>(.*?)<\/div>/)
  266. {
  267. $host=$2;
  268. print item(),"IP Reverse DNS (Host): $host\n";
  269. }
  270. if($response =~/Hosting Company: <\/td><td valign='middle' class='bold'> <span class='nounderline'><a title='(.*?)'/)
  271. {
  272. $ownerName=$1;
  273. print item(),"Hosting Company: $ownerName\n";
  274. }
  275. if($response =~/Hosting Company \/ IP Owner: <\/td><td valign='middle' class='bold'> <span class='cflag (.*?)'><\/span> <a href='\/view\/web_hosting\/(.*?)'>(.*?)<\/a>/)
  276. {
  277. $ownerip=$3;
  278. print item(),"Hosting Company IP Owner: $ownerip\n";
  279. }
  280. if($response =~/Hosting Company \/ IP Owner: <\/td><td valign='middle' class='bold'> <span class='nounderline'><a title='(.*?)'/)
  281. {
  282. $ownerip=$1;
  283. print item(),"Hosting Company IP Owner: $ownerip\n";
  284. }
  285. if($response =~/IP Range <b>(.*?) - (.*?)<\/b><br>have <b>(.*?)<\/b>/)
  286. {
  287. print item(),"Hosting IP Range: $1 - $2 ($3 ip) \n";
  288. }
  289. if($response =~/Hosting Address: <\/td><td>(.*?)<\/td><\/tr>/)
  290. {
  291. $address=$1;
  292. print item(),"Hosting Address: $address\n";
  293. }
  294. if($response =~/Owner Address: <\/td><td>(.*?)<\/td>/)
  295. {
  296. $addressowner=$1;
  297. print item(),"Owner Address: $addressowner\n";
  298. }
  299. if($response =~/Hosting Country: <\/td><td><span class='cflag (.*?)'><\/span><a href='\/view\/countries\/(.*?)\/(.*?)'>(.*?)<\/a>/)
  300. {
  301. $HostingCountry=$1;
  302. print item(),"Hosting Country: $HostingCountry\n";
  303. }
  304. if($response =~/Owner Country: <\/td><td><span class='cflag (.*?)'><\/span><a href='\/view\/countries\/(.*?)\/(.*?)'>(.*?)<\/a>/)
  305. {
  306. $OwnerCountry=$1;
  307. print item(),"Owner Country: $OwnerCountry\n";
  308. }
  309. if($response =~/Hosting Phone: <\/td><td>(.*?)<\/td><\/tr>/)
  310. {
  311. $phone=$1;
  312. print item(),"Hosting Phone: $phone\n";
  313. }
  314. if($response =~/Owner Phone: <\/td><td>(.*?)<\/td><\/tr>/)
  315. {
  316. $Ownerphone=$1;
  317. print item(),"Owner Phone: $Ownerphone\n";
  318. }
  319. if($response =~/Hosting Website: <img class='cursor-help noprint left10' border='0' width='12' height='10' src='\/images\/tooltip.gif'><\/td><td><a href='\/(.*?)'>(.*?)<\/a><\/td>/)
  320. {
  321. $website=$1;
  322. print item(),"Hosting Website: $website\n";
  323. }
  324. if($response =~/Owner Website: <img class='cursor-help noprint left10' border='0' width='12' height='10' src='\/(.*?)'><\/td><td><a href='\/(.*?)'>(.*?)<\/a>/)
  325. {
  326. $Ownerwebsite=$3;
  327. print item(),"Owner Website: $Ownerwebsite\n";
  328. }
  329. if($response =~/CIDR:<\/td><td> (.*?)<\/td><\/tr>/)
  330. {
  331. $CIDR=$1;
  332. print item(),"CIDR: $CIDR\n";
  333. }
  334. if($response =~/Owner CIDR: <\/td><td><span class='(.*?)'><a href="\/view\/ip_addresses\/(.*?)">(.*?)<\/a>\/(.*?)<\/span><\/td><\/tr>/)
  335. {
  336. print item(),"Owner CIDR: $3/$4\n\n";
  337. }
  338. if($response =~/Hosting CIDR: <\/td><td><span class='(.*?)'><a href="\/view\/ip_addresses\/(.*?)">(.*?)<\/a>\/(.*?)<\/span><\/td><\/tr>/)
  339. {
  340. print item(),"Hosting CIDR: $3/$4\n\n";
  341. }
  342. $url = "https://dns-api.org/NS/$site1";
  343. $request = $ua->get($url);
  344. $response = $request->content;
  345. }else {
  346. print item(),"There Is A Problem\n\n";
  347. print item('1'),"Checking The Connection\n";
  348. print item('2'),"Enter Website Without HTTP/HTTPs\n";
  349. print item('3'),"Check If Website Working\n";
  350. }
  351. my %seen;
  352. while($response =~m/"value": "(.*?)."/g)
  353. {
  354. $ns=$1;
  355. next if $seen{$ns}++;
  356. print item(),"NS: $ns \n";
  357. }
  358. }
  359.  
  360. ### Phone number information ###########
  361. sub Phonenumberinformation {
  362.  
  363. $url = "https://pastebin.com/raw/egbm0eEk";
  364. $request = $ua->get($url);
  365. $api2 = $request->content;
  366.  
  367. $url = "http://apilayer.net/api/validate?access_key=$api2&number=$PhoneNumber&country_code=&format=1";
  368. $request = $ua->get($url);
  369. $response = $request->content;
  370. if($response =~/"valid":true/)
  371. {
  372. $valid=$1;
  373. print item(),"Valid : ";
  374. print color("bold green"),"true\n";
  375.  
  376. if($response =~/local_format":"(.*?)"/)
  377. {
  378. $localformat=$1;
  379. print item(),"Local Format : $localformat\n";
  380. }
  381. if($response =~/international_format":"(.*?)"/)
  382. {
  383. $international_format=$1;
  384. print item(),"International Format : $international_format\n";
  385. }
  386. if($response =~/country_name":"(.*?)"/)
  387. {
  388. $country_name=$1;
  389. print item(),"Country : $country_name\n";
  390. }
  391. if($response =~/location":"(.*?)"/)
  392. {
  393. $location=$1;
  394. print item(),"Location : $location\n";
  395. }
  396. if($response =~/carrier":"(.*?)"/)
  397. {
  398. $carrier=$1;
  399. print item(),"Carrier : $carrier\n";
  400. }
  401. if($response =~/line_type":"(.*?)"/)
  402. {
  403. $line_type=$1;
  404. print item(),"Line Type : $line_type\n";
  405. }
  406. }else {
  407. print item(),"There Is A Problem\n\n";
  408. print item('1'),"Checking The Connection\n";
  409. print item('2'),"Enter Phone Number Without +/00\n";
  410. print item('3'),"Check If Phone Number Exists\n";
  411. exit
  412. }
  413. }
  414. ### Find IP address and email server ###########
  415. sub FindIPaddressandemailserver {
  416. $ua = LWP::UserAgent->new(keep_alive => 1);
  417. $ua->agent("Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0");
  418. my $url = "https://dns-api.org/MX/$site2";
  419.  
  420. $request = $ua->get($url);
  421. $response = $request->content;
  422. if ($response =~ /error/){
  423. print item(),"There Is A Problem\n\n";
  424. print item('1'),"Checking The Connection\n";
  425. print item('2'),"Enter Website Without HTTP/HTTPs\n";
  426. print item('3'),"Check If Website Working\n";
  427. exit
  428. }
  429. print item(),"Domain name for MX records: $site2\n\n";
  430. my %seen;
  431. while($response =~m/"value": "(.*?)."/g)
  432. {
  433. $mx=$1;
  434. next if $seen{$mx}++;
  435. print item(),"MX: $mx \n";
  436. }
  437. }
  438. ### Domain whois lookup ###########
  439. sub Domainwhoislookup {
  440. $url = "https://pastebin.com/raw/YfHdX0jE";
  441. $request = $ua->get($url);
  442. $api4 = $request->content;
  443. $url = "http://www.whoisxmlapi.com//whoisserver/WhoisService?domainName=$site3&username=$api4&outputFormat=JSON";
  444. $request = $ua->get($url);
  445. $response = $request->content;
  446.  
  447. my $responseObject = decode_json($response);
  448.  
  449. if (exists $responseObject->{'WhoisRecord'}->{'createdDate'}){
  450. print item(),"Whois lookup for : $site3 \n";
  451. print item(),'Created date: ',
  452. $responseObject->{'WhoisRecord'}->{'createdDate'},"\n";sleep(1);
  453. if (exists $responseObject->{'WhoisRecord'}->{'expiresDate'}){
  454. print item(),'Expires date: ',
  455. $responseObject->{'WhoisRecord'}->{'expiresDate'},"\n";}sleep(1);
  456. if (exists $responseObject->{'WhoisRecord'}->{'contactEmail'}){
  457. print item(),'Contact email: ',
  458. $responseObject->{'WhoisRecord'}->{'contactEmail'},"\n";}sleep(1);
  459. if (exists $responseObject->{'WhoisRecord'}->{'registrant'}->{'name'}){
  460. print item(),'Registrant Name: ',
  461. $responseObject->{'WhoisRecord'}->{'registrant'}->{'name'},"\n";} sleep(1);
  462. if (exists $responseObject->{'WhoisRecord'}->{'registrant'}->{'organization'}){
  463. print item(),'Registrant Organization: ',
  464. $responseObject->{'WhoisRecord'}->{'registrant'}->{'organization'},"\n";} sleep(1);
  465. if (exists $responseObject->{'WhoisRecord'}->{'registrant'}->{'street1'}){
  466. print item(),'Registrant Street: ',
  467. $responseObject->{'WhoisRecord'}->{'registrant'}->{'street1'},"\n";} sleep(1);
  468. if (exists $responseObject->{'WhoisRecord'}->{'registrant'}->{'city'}){
  469. print item(),'Registrant City: ',
  470. $responseObject->{'WhoisRecord'}->{'registrant'}->{'city'},"\n";}sleep(1);
  471. if (exists $responseObject->{'WhoisRecord'}->{'registrant'}->{'state'}){
  472. print item(),'Registrant State/Province: ',
  473. $responseObject->{'WhoisRecord'}->{'registrant'}->{'state'},"\n";}sleep(1);
  474. if (exists $responseObject->{'WhoisRecord'}->{'registrant'}->{'postalCode'}){
  475. print item(),'Registrant Postal Code: ',
  476. $responseObject->{'WhoisRecord'}->{'registrant'}->{'postalCode'},"\n";}sleep(1);
  477. if (exists $responseObject->{'WhoisRecord'}->{'registrant'}->{'country'}){
  478. print item(),'Registrant Country: ',
  479. $responseObject->{'WhoisRecord'}->{'registrant'}->{'country'},"\n";}sleep(1);
  480. if (exists $responseObject->{'WhoisRecord'}->{'registrant'}->{'email'}){
  481. print item(),'Registrant Email: ',
  482. $responseObject->{'WhoisRecord'}->{'registrant'}->{'email'},"\n";}sleep(1);
  483. if (exists $responseObject->{'WhoisRecord'}->{'registrant'}->{'telephone'}){
  484. print item(),'Registrant Phone: ',
  485. $responseObject->{'WhoisRecord'}->{'registrant'}->{'telephone'},"\n";}sleep(1);
  486. if (exists $responseObject->{'WhoisRecord'}->{'registrant'}->{'fax'}){
  487. print item(),'Registrant Fax: ',
  488. $responseObject->{'WhoisRecord'}->{'registrant'}->{'fax'},"\n";}sleep(1);
  489. if (exists $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'name'}){
  490. print item(),'Admin Name: ',
  491. $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'name'},"\n";}sleep(1);
  492. if (exists $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'organization'}){
  493. print item(),'Admin Organization: ',
  494. $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'organization'},"\n";}sleep(1);
  495. if (exists $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'street1'}){
  496. print item(),'Admin Street: ',
  497. $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'street1'},"\n";}sleep(1);
  498. if (exists $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'city'}){
  499. print item(),'Admin City: ',
  500. $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'city'},"\n";}sleep(1);
  501. if (exists $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'state'}){
  502. print item(),'Admin State/Province: ',
  503. $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'state'},"\n";}sleep(1);
  504. if (exists $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'postalCode'}){
  505. print item(),'Admin Postal Code: ',
  506. $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'postalCode'},"\n";}sleep(1);
  507. if (exists $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'country'}){
  508. print item(),'Admin Country: ',
  509. $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'country'},"\n";}sleep(1);
  510. if (exists $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'email'}){
  511. print item(),'Admin Email: ',
  512. $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'email'},"\n";}sleep(1);
  513. if (exists $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'telephone'}){
  514. print item(),'Admin Phone: ',
  515. $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'telephone'},"\n";}sleep(1);
  516. if (exists $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'fax'}){
  517. print item(),'Admin Fax: ',
  518. $responseObject->{'WhoisRecord'}->{'administrativeContact'}->{'fax'},"\n";}sleep(1);
  519. if (exists $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'name'}){
  520. print item(),'Tech Name: ',
  521. $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'name'},"\n";}sleep(1);
  522. if (exists $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'organization'}){
  523. print item(),'Tech Organization: ',
  524. $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'organization'},"\n";}sleep(1);
  525. if (exists $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'street1'}){
  526. print item(),'Tech Street: ',
  527. $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'street1'},"\n";}sleep(1);
  528. if (exists $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'city'}){
  529. print item(),'Tech City: ',
  530. $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'city'},"\n";}sleep(1);
  531. if (exists $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'state'}){
  532. print item(),'Tech State/Province: ',
  533. $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'state'},"\n";}sleep(1);
  534. if (exists $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'postalCode'}){
  535. print item(),'Tech Postal Code: ',
  536. $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'postalCode'},"\n";}sleep(1);
  537. if (exists $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'country'}){
  538. print item(),'Tech Country: ',
  539. $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'country'},"\n";}sleep(1);
  540. if (exists $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'email'}){
  541. print item(),'Tech Email: ',
  542. $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'email'},"\n";}sleep(1);
  543. if (exists $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'telephone'}){
  544. print item(),'Tech Phone: ',
  545. $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'telephone'},"\n";}sleep(1);
  546. if (exists $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'fax'}){
  547. print item(),'Tech Fax: ',
  548. $responseObject->{'WhoisRecord'}->{'technicalContact'}->{'fax'},"\n";}sleep(1);
  549. }else {
  550. print item(),"There Is A Problem\n\n";
  551. print item('1'),"Checking The Connection\n";
  552. print item('2'),"Enter Website Without HTTP/HTTPs\n";
  553. print item('3'),"Check If Website Working\n";
  554. }
  555. }
  556. ### Find website location ###########
  557. sub Findwebsitelocation {
  558. $ip= (gethostbyname($site4))[4];
  559. my ($a,$b,$c,$d) = unpack('C4',$ip);
  560. $ip ="$a.$b.$c.$d";
  561.  
  562. $url = "https://ipapi.co/$ip/json/";
  563. $request = $ua->get($url);
  564. $response = $request->content;
  565.  
  566. if($response =~/country_name": "(.*?)"/){
  567. print item(),"IP Address: $ip\n";
  568. print item(),"Country: $1\n";
  569. if($response =~/city": "(.*?)"/){
  570. print item(),"City: $1\n";
  571. }if($response =~/region": "(.*?)"/){
  572. print item(),"Region: $1\n";
  573. }if($response =~/region_code": "(.*?)"/){
  574. print item(),"Region Code: $1\n";
  575. }if($response =~/continent_code": "(.*?)"/){
  576. print item(),"Continent Code: $1\n";
  577. }if($response =~/postal": "(.*?)"/){
  578. print item(),"Postal Code: $1\n";
  579. }if($response =~/latitude": (.*?),/){
  580. print item(),"Latitude / Longitude: $1, ";
  581. }if($response =~/longitude": (.*?),/){
  582. print color("bold white"),"$1\n";
  583. }if($response =~/timezone": "(.*?)"/){
  584. print item(),"Timezone: $1\n";
  585. }if($response =~/utc_offset": "(.*?)"/){
  586. print item(),"Utc Offset: $1\n";
  587. }if($response =~/country_calling_code": "(.*?)"/){
  588. print item(),"Calling Code: $1\n";
  589. }if($response =~/currency": "(.*?)"/){
  590. print item(),"Currency: $1\n";
  591. }if($response =~/languages": "(.*?)"/){
  592. print item(),"Languages: $1\n";
  593. }if($response =~/asn": "(.*?)"/){
  594. print item(),"ASN: $1\n";
  595. }if($response =~/org": "(.*?)"/){
  596. print item(),"ORG: $1\n";
  597. }
  598. }else {
  599. print item(),"There Is A Problem\n\n";
  600. print item('1'),"Checking The Connection\n";
  601. print item('2'),"Enter Website Without HTTP/HTTPs\n";
  602. print item('3'),"Check If Website/IP Working\n";
  603. }
  604. }
  605. ### Bypass CloudFlare ###########
  606. sub CloudFlare {
  607. my $ua = LWP::UserAgent->new;
  608. $ua = LWP::UserAgent->new(keep_alive => 1);
  609. $ua->agent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31");
  610.  
  611. $ip= (gethostbyname($site5))[4];
  612. my ($a,$b,$c,$d) = unpack('C4',$ip);
  613. $ip_address ="$a.$b.$c.$d";
  614. if($ip_address =~ /[0-9]/){
  615. print item(),"CloudFlare IP: $ip_address\n\n";
  616. }
  617.  
  618. $url = "https://dns-api.org/NS/$site5";
  619. $request = $ua->get($url);
  620. $response = $request->content;
  621.  
  622. my %seen;
  623. while($response =~m/"value": "(.*?)."/g)
  624. {
  625. $ns=$1;
  626. next if $seen{$ns}++;
  627. print item(),"NS: $ns \n";
  628. }
  629. print color("bold white"),"\n";
  630. $url = "http://www.crimeflare.us/cgi-bin/cfsearch.cgi";
  631. $request = POST $url, [cfS => $site5];
  632. $response = $ua->request($request);
  633. $riahi = $response->content;
  634.  
  635. if($riahi =~m/">(.*?)<\/a>&nbsp/g){
  636. print item(),"Real IP: $1\n";
  637. $ip=$1;
  638. }elsif($riahi =~m/not CloudFlare-user nameservers/g){
  639. print item(),"These Are Not CloudFlare-user Nameservers !!\n";
  640. print item(),"This Website Not Using CloudFlare Protection\n";
  641. }elsif($riahi =~m/No direct-connect IP address was found for this domain/g){
  642. print item(),"No Direct Connect IP Address Was Found For This Domain\n";
  643. }else{
  644. print item(),"There Is A Problem\n\n";
  645. print item('1'),"Checking The Connection\n";
  646. print item('2'),"Enter Website Without HTTP/HTTPs\n";
  647. print item('3'),"Check If Website Working\n";
  648. }
  649.  
  650. $url = "http://ipinfo.io/$ip/json";
  651. $request = $ua->get($url);
  652. $response = $request->content;
  653.  
  654. if($response =~m/hostname": "(.*?)"/g){
  655. print item(),"Hostname: $1\n";
  656. }if($response =~m/city": "(.*?)"/g){
  657. print item(),"City: $1\n";
  658. }if($response =~m/region": "(.*?)"/g){
  659. print item(),"Region: $1\n";
  660. }if($response =~m/country": "(.*?)"/g){
  661. print item(),"Country: $1\n";
  662. }if($response =~m/loc": "(.*?)"/g){
  663. print item(),"Location: $1\n";
  664. }if($response =~m/org": "(.*?)"/g){
  665. print item(),"Organization: $1\n";
  666. }
  667. }
  668.  
  669.  
  670.  
  671. ### User Agent Info ###########
  672. sub UserAgent {
  673. $ua = LWP::UserAgent->new(keep_alive => 1);
  674. $ua->agent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31");
  675.  
  676. $url = "https://pastebin.com/raw/pTXVQiuJ";
  677. $request = $ua->get($url);
  678. $api8 = $request->content;
  679.  
  680. $url = "https://useragentapi.com/api/v4/json/$api8/$useragent";
  681. $request = $ua->get($url);
  682. $response = $request->content;
  683.  
  684. if($response =~m/ua_type":"(.*?)"/g){
  685. print item(),"User Agent Type: $1\n";
  686. if($response =~m/os_name":"(.*?)"/g){
  687. print item(),"OS name: $1\n";
  688. }if($response =~m/os_version":"(.*?)"/g){
  689. print item(),"OS version: $1\n";
  690. }if($response =~m/browser_name":"(.*?)"/g){
  691. print item(),"Browser name: $1\n";
  692. }if($response =~m/browser_version":"(.*?)"/g){
  693. print item(),"Browser version: $1\n";
  694. }if($response =~m/engine_name":"(.*?)"/g){
  695. print item(),"Engine name: $1\n";
  696. }if($response =~m/engine_version":"(.*?)"/g){
  697. print item(),"Engine version: $1\n";
  698. }
  699. }else{
  700. print item(),"There Is A Problem\n\n";
  701. print item('1'),"Checking The Connection\n";
  702. print item('2'),"Check If User Agent Exists\n";
  703. }
  704. }
  705.  
  706. ### Domain Age Checker ###########
  707. sub DomainAgeChecker {
  708. $ua = LWP::UserAgent->new(keep_alive => 1);
  709. $ua->agent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31");
  710.  
  711. $url = "https://input.payapi.io/v1/api/fraud/domain/age/$site6";
  712. $request = $ua->get($url);
  713. $response = $request->content;
  714.  
  715. if($response =~m/is (.*?) days (.*?) Date: (.*?)"/g){
  716. $days=$1;
  717. $created=$3;
  718.  
  719. print item(),"Domain Name : $site6\n";
  720. print item(),"Domain Created on : $created\n";
  721.  
  722. $url = "http://unitconverter.io/days/years/$days";
  723. $request = $ua->get($url);
  724. $response = $request->content;
  725.  
  726. if($response =~m/<strong style="color:red"> = (.*?)<\/strong><\/p>/g){
  727. $age=$1;
  728. $age =~ s/ / /g;
  729. print item(),"Domain Age : $age\n";
  730. }
  731. }else{
  732. print item(),"There Is A Problem\n\n";
  733. print item('1'),"Checking The Connection\n";
  734. print item('2'),"Enter Website Without HTTP/HTTPs\n";
  735. print item('3'),"Check If Website Working\n";
  736. }
  737. }
  738. ######################## Credit card BIN number Check ################################
  739. sub BIN {
  740. $ua = LWP::UserAgent->new(keep_alive => 1);
  741. $ua->agent("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31");
  742.  
  743. $url = "https://lookup.binlist.net/$bin";
  744. $request = $ua->get($url);
  745. $response = $request->content;
  746.  
  747. if($response =~/scheme/){
  748. print color('bold red')," [";
  749. print color('bold green'),"+";
  750. print color('bold red'),"] ";
  751. print color("bold white"),"Credit card BIN number: $bin XX XXXX XXXX\n";
  752. if($response =~/scheme":"(.*?)"/){
  753. print color('bold red')," [";
  754. print color('bold green'),"+";
  755. print color('bold red'),"] ";
  756. print color("bold white"),"Credit card brand: $1\n";
  757. }if($response =~/type":"(.*?)"/){
  758. print color('bold red')," [";
  759. print color('bold green'),"+";
  760. print color('bold red'),"] ";
  761. print color("bold white"),"Type: $1\n";
  762. }if($response =~/name":"(.*?)"/){
  763. print color('bold red')," [";
  764. print color('bold green'),"+";
  765. print color('bold red'),"] ";
  766. print color("bold white"),"Bank: $1\n";
  767. }if($response =~/url":"(.*?)"/){
  768. print color('bold red')," [";
  769. print color('bold green'),"+";
  770. print color('bold red'),"] ";
  771. print color("bold white"),"Bank URL: $1\n";
  772. }if($response =~/phone":"(.*?)"/){
  773. print color('bold red')," [";
  774. print color('bold green'),"+";
  775. print color('bold red'),"] ";
  776. print color("bold white"),"Bank Phone: $1\n";
  777. }if($response =~/alpha2":"(.*?)","name":"(.*?)"/){
  778. print color('bold red')," [";
  779. print color('bold green'),"+";
  780. print color('bold red'),"] ";
  781. print color("bold white"),"Country Short: $1\n";
  782. print color('bold red')," [";
  783. print color('bold green'),"+";
  784. print color('bold red'),"] ";
  785. print color("bold white"),"Country: $2\n";
  786. }if($response =~/latitude":"(.*?)"/){
  787. print color('bold red')," [";
  788. print color('bold green'),"+";
  789. print color('bold red'),"] ";
  790. print color("bold white"),"Latitude: $1\n";
  791. }if($response =~/longitude":"(.*?)"/){
  792. print color('bold red')," [";
  793. print color('bold green'),"+";
  794. print color('bold red'),"] ";
  795. print color("bold white"),"Longitude: $1\n";
  796. }
  797. }else{
  798. print color('bold red')," [";
  799. print color('bold green'),"+";
  800. print color('bold red'),"] ";
  801. print color("bold white"),"There Is A Problem\n\n";
  802. print color('bold red')," [";
  803. print color('bold green'),"1";
  804. print color('bold red'),"] ";
  805. print color("bold white"),"Checking The Connection\n";
  806. print color('bold red')," [";
  807. print color('bold green'),"2";
  808. print color('bold red'),"] ";
  809. print color("bold white"),"Enter Only First 6 Digits Of A Credit Card Number\n";
  810. }
  811. }
  812. ####### Subdomain Scanner #######
  813. sub subdomain {
  814. $url = "https://www.pagesinventory.com/search/?s=$site8";
  815. $request = $ua->get($url);
  816. $response = $request->content;
  817.  
  818. $ip= (gethostbyname($site8))[4];
  819. my ($a,$b,$c,$d) = unpack('C4',$ip);
  820. $ip_address ="$a.$b.$c.$d";
  821. if($response =~ /Search result for/){
  822. print item(),"Website: $site8\n";
  823. print item(),"IP: $ip_address\n\n";
  824.  
  825. while($response =~ m/<td><a href=\"\/domain\/(.*?).html\">(.*?)<a href="\/ip\/(.*?).html">/g ) {
  826.  
  827. print item(),"Subdomain: $1\n";
  828. print item('-'),"IP: $3\n\n";
  829. sleep(1);
  830. }
  831. }elsif($ip_address =~ /[0-9]/){
  832. if($response =~ /Nothing was found/){
  833. print item(),"Website: $site8\n";
  834. print item(),"IP: $ip_address\n\n";
  835. print item(),"No Subdomains Found For This Domain\n";
  836. }}else {
  837. print item(),"There Is A Problem\n\n";
  838. print item('1'),"Checking The Connection\n";
  839. print item('2'),"Enter Website Without HTTP/HTTPs\n";
  840. print item('3'),"Check If Website Working\n";
  841. }
  842. }
  843.  
  844. ####### Port scanner #######
  845. sub port {
  846. print item(),"Enter Website/IP : ";
  847.  
  848. chop ($target = <stdin>);
  849. $| = 1;
  850.  
  851. print "\n";
  852. print item(),"PORT STATE SERVICE\n";
  853. my %ports = (
  854. 21 => 'FTP'
  855. ,22 => 'SSH'
  856. ,23 => 'Telnet'
  857. ,25 => 'SMTP'
  858. ,43 => 'Whois'
  859. ,53 => 'DNS'
  860. ,68 => 'DHCP'
  861. ,80 => 'HTTP'
  862. ,110 => 'POP3'
  863. ,115 => 'SFTP'
  864. ,119 => 'NNTP'
  865. ,123 => 'NTP'
  866. ,139 => 'NetBIOS'
  867. ,143 => 'IMAP'
  868. ,161 => 'SNMP'
  869. ,220 => 'IMAP3'
  870. ,389 => 'LDAP'
  871. ,443 => 'SSL'
  872. ,1521 => 'Oracle SQL'
  873. ,2049 => 'NFS'
  874. ,3306 => 'mySQL'
  875. ,5800 => 'VNC'
  876. ,8080 => 'HTTP'
  877. );
  878. foreach my $p ( sort {$a<=>$b} keys( %ports ) )
  879. {
  880. $socket = IO::Socket::INET->new(PeerAddr => $target , PeerPort => "$p" , Proto => 'tcp' , Timeout => 1);
  881. if( $socket ){
  882. print item(); printf("%4s Open %s\n", $p, $ports{$p});
  883.  
  884. }else{
  885. print item(); printf("%4s Closed %s\n", $p, $ports{$p});
  886. }
  887. }
  888. }
  889.  
  890. ####### Check e-mail address #######
  891. sub email {
  892. $url = "https://api.2ip.me/email.txt?email=$email";
  893. $request = $ua->get($url);
  894. $response = $request->content;
  895.  
  896. if($response =~/true/)
  897. {
  898. print item(),"E-mail address : $email \n";
  899. print item(),"Valid : ";
  900. print color('bold green'),"YES\n";
  901. print color('reset');
  902. }elsif($response =~/false/){
  903. print item(),"E-mail address : $email \n";
  904. print item(),"Valid : ";
  905. print color('bold red'),"NO\n";
  906. print color('reset');
  907. }else{
  908. print item(),"There Is A Problem\n\n";
  909. print item('1'),"Checking The Connection\n";
  910. print item('2'),"Check If E-mail Exists\n";
  911. }
  912. }
  913.  
  914. ####### Check Content Management System (CMS) #######
  915. sub cms {
  916. $url = "https://pastebin.com/raw/CYaZrPFP";
  917. $request = $ua->get($url);
  918. $api12 = $request->content;
  919.  
  920. $url = "https://whatcms.org/APIEndpoint?key=$api12&url=$site7";
  921. $request = $ua->get($url);
  922. $response = $request->content;
  923.  
  924. my $responseObject = decode_json($response);
  925.  
  926. if($response =~/Success/){
  927. print item(),"WebSite : $site7 \n";
  928. if (exists $responseObject->{'result'}->{'name'}){
  929. print item(),'CMS: ',
  930. $responseObject->{'result'}->{'name'},"\n";}
  931. if (exists $responseObject->{'result'}->{'version'}){
  932. print item(),'Version: ',
  933. $responseObject->{'result'}->{'version'},"\n";}
  934. }elsif($response =~/CMS Not Found/){
  935. print item(),"WebSite : $site7 \n";
  936. print item(),"CMS :";
  937. print color("bold red")," Not Found\n";
  938. print color('reset');
  939. }else{
  940. print item(),"There Is A Problem\n\n";
  941. print item('1'),"Checking The Connection\n";
  942. print item('2'),"Enter Website Without HTTP/HTTPs\n";
  943. print item('3'),"Check If Website Working\n";
  944. }
  945. }
  946.  
  947.  
  948. ##### Update #######
  949. sub update {
  950. if ($^O =~ /MSWin32/) {
  951. banner();
  952. print item('1'),"Download Th3inspector\n";
  953. print item('2'),"Extract Th3inspector into Desktop\n";
  954. print item('3'),"Open CMD and type the following commands:\n";
  955. print item('4'),"cd Desktop/Th3inspector-master/\n";
  956. print item('5'),"perl Th3inspector.pl\n";
  957. }else {
  958. $linux = "/usr/share/Th3inspector";
  959. $termux = "/data/data/com.termux/files/usr/share/Th3inspector";
  960. if (-d $linux){
  961. system("bash /usr/share/Th3inspector/update.sh");
  962. } elsif (-d $termux){
  963. system("chmod +x /data/data/com.termux/files/usr/share/Th3inspector/update.sh && bash /data/data/com.termux/files/usr/share/Th3inspector/update.sh");
  964. }
  965. }
  966. }
  967. ##### Enter #######
  968. sub enter {
  969. print "\n";
  970. print item(),"Press ";
  971. print color('bold red'),"[";
  972. print color("bold white"),"ENTER";
  973. print color('bold red'),"] ";
  974. print color("bold white"),"Key To Continue\n";
  975.  
  976. local( $| ) = ( 1 );
  977.  
  978. my $resp = <STDIN>;
  979. banner();
  980. menu();
  981. }
  982.  
  983. ### Item format ###
  984. sub item
  985. {
  986. my $n = shift // '+';
  987. return color('bold red')," ["
  988. , color('bold green'),"$n"
  989. , color('bold red'),"] "
  990. , color("bold white")
  991. ;
  992. }
  993. __END__
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement