Advertisement
opexxx

threatexpertmd5search.pl

Feb 5th, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.59 KB | None | 0 0
  1. #!/usr/bin/perl -w
  2.  
  3.  
  4. use LWP::Simple;
  5.  
  6.  
  7. $input = $ARGV[0];
  8.  
  9.  
  10. $url = 'http://www.threatexpert.com/report.aspx?md5='.$input;
  11. my $fetch = get ($url);
  12.  
  13.  
  14.  
  15. if ( md5check () >= 0 and
  16.     $fetch !~ m/Sign In/g){
  17.     $fetch =~ s/\<[^>]*\>//g;
  18.     $fetch =~ s/&nbsp;//g;
  19.     $fetch =~ s/"//g;
  20.     $fetch =~ s/body a \{color:(.*)\}//g;
  21.     $fetch =~ s/_uacct =(.*)\;//g;
  22.     print $fetch;
  23. }else{
  24.     print "\n\n\n"."$input has not been submitted"."\n\n\n";
  25. }
  26.  
  27.  
  28. sub md5check{
  29. if ($input =~ m/[0-9a-f]{32}/i){
  30.     $input =~ tr/a-z/A-Z/;
  31. }else{
  32.     print "\n\n\n"."Valid MD5 Please"."\n\n\n";
  33.     exit;
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement