Facebook tools (autoliker, account verifier)

Hello all,

I have decided to publish my work regarding facebook scripts like autoliker, account verifier, automated comment liker, automated photo liker, wall posts liker and of course account bruteforce.

First of all keep in mind that you have to use this script only on your own accounts!

Today I will list only these 4:

I.Account verifier (verifier.php) (This script checks the valid facebook accounts found in users.txt file)

<?php

/*
#########################################################
#       Copyright to Zatarra @ rstforums.com            #
#        Use it only with your own accounts!            #
#########################################################
*/

//Initializing cookies folder
$directory=getcwd()."/cookies";

//Checking if cookies folder exists
if (file_exists($directory))
{
//Eating all the cookies to avoid problems
echo shell_exec("rm -rf cookies/*.cookie");
}
else
{
//Creating directory
echo shell_exec("mkdir cookies");
}

$goodone=0;
$badone=0;
$var=file('users.txt');
for ($i=0;$i<count($var);$i++)
{
$fb=explode(" ",trim($var[$i]));
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://login.facebook.com/login.php?m&next=http://m.facebook.com/home.php");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POSTFIELDS, "email=" . @trim($fb[0]) . "&pass=" . @trim($fb[1]) . "&login=Log In");
curl_setopt($curl, CURLOPT_ENCODING, "");
curl_setopt($curl, CURLOPT_COOKIEJAR, "cookies/$i.cookie");
curl_setopt($curl, CURLOPT_COOKIEFILE, "cookies/$i.cookie");
$curlData = curl_exec($curl);
$curlData = curl_exec($curl);

@preg_match_all('/data-sigil=(.*?)\>\<table/',$curlData,$rasp);
if (@$rasp[1][0])
{
echo "[RST] Goodone => ".trim($fb[0])." ".trim($fb[1])."\n";
$goodone++;
}
/*
else
{
echo "[RST] Badone => ".trim($fb[0])." - ".trim($fb[1])."\n";
$badone++;
}
*/
}

echo "Am verificat ".count($var)." conturi dintre care $goodone au fost bune\n";

//Eating all the cookies
echo shell_exec("rm -rf cookies/*.cookie");

?>

Usage:
1. You create a file named users.txt which must contain facebook username (email) and password under this form:

email1@yahoo.com pass1
email2@yahoo.com pass2
email3@yahoo.com pass3

2. After you caret the users.txt file and verifier.php file you can simply run the script by typing php verifier.php

[root@OptimusPrime RST]# php verifier.php
[RST] Goodone => email1@yahoo.com pass1
[RST] Goodone => email2@yahoo.com pass2
[RST] Goodone => email3@yahoo.com pass3
Am verificat 3 conturi dintre care 3 au fost bune
[root@OptimusPrime RST]#

3. Please notice that all the valid accounts must have this options set on the facebook profile:

II. Link/Page liker (like.php) (This script will give like to a page or a link with users found in users.txt)

<?php

/*
#########################################################
#       Copyright to Zatarra @ rstforums.com            #
#        Use it only with your own accounts!            #
#########################################################
*/

//The link variable is the only one you have to modify!!! Leave the rest as it is in order to work.
$link='https://www.facebook.com/rstforums';

//Initializing cookies folder
$directory=getcwd()."/cookies";

//Checking if cookies folder exists
if (file_exists($directory))
{
//Eating all the cookies to avoid problems
echo shell_exec("rm -rf ./cookies/*.cookie");
}
else
{
//Creating directory
echo shell_exec("mkdir cookies");
}

//Initializing users and passwords
$user=file('users.txt');

function login($username,$password)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://login.facebook.com/login.php?m&next=http://m.facebook.com/home.php");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POSTFIELDS, "email=" . @$username . "&pass=" . @$password . "&login=Log In");
curl_setopt($curl, CURLOPT_ENCODING, "");
curl_setopt($curl, CURLOPT_COOKIEJAR, "cookies/$username.cookie");
curl_setopt($curl, CURLOPT_COOKIEFILE, "cookies/$username.cookie");
$curlData = curl_exec($curl);
$curlData = curl_exec($curl);

@preg_match_all('/name=\"fb_dtsg\" value=\"(.*?)\"/',$curlData,$dtsg);
//echo "dtsg => ".$dtsg[1][0]."\n";
@preg_match_all('/\"id\":\"(.*?)\"\}\,/',$curlData,$userid);
//echo "Profile Id => ".$userid[1][0]."\n";
@preg_match_all('/data-sigil=(.*?)\>\<table/',$curlData,$rasp);
if (@$rasp[1][0])
{
return array(0,0);
}
else
{
return array($dtsg[1][0],$userid[1][0]);
}
}

function like($username,$password,$link)
{
$userdetails=login($username,$password);

if ($userdetails[0]!='0')
{
$data='fb_dtsg='.$userdetails[0].'&href='.$link.'&action=like&nobootload=&iframe_referer=http://rstforums.com/&ref=&__user='.$userdetails[1].'&__a=1&__dyn=7w&__req=1&ttstamp=265816673977571105';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://www.facebook.com/plugins/like/connect");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_ENCODING, "");
curl_setopt($curl, CURLOPT_COOKIEFILE, "cookies/$username.cookie");
$curlData = curl_exec($curl);
$curlData = curl_exec($curl);
}
}

for ($i=0;$i<count($user);$i++)
{
$fb=explode(" ",trim($user[$i]));
like($fb[0],$fb[1],$link);
like($fb[0],$fb[1],$link);
}

//Eating all the cookies
echo shell_exec("rm -rf cookies/*.cookie");

?>

Usage:
1. You must have the users.txt with one username and password on one line (exactly as in the example from verifier.php)
2. As it can be seen in the code, the only parameter that you need to modify is the $link variable.
3. Before running the script you can check your facebook page’s likes number on this link:
https://graph.facebook.com/?ids=https://www.facebook.com/rstforums
4. After you modify the $link variable you only run the script with the command php like.php and everything else will run in the background
5. After script finishes its job you can recheck the link provided at step 2 in order to see how many likes you recieved

III. Link/Page disliker (dislike.php) (This script will do the same thing like the one above but this will DISLIKE the page/link)

<?php

/*
#########################################################
#       Copyright to Zatarra @ rstforums.com            #
#        Use it only with your own accounts!            #
#########################################################
*/

//The link variable is the only one you have to modify!!! Leave the rest as it is in order to work.
$link='https://www.facebook.com/rstforums';

//Initializing cookies folder
$directory=getcwd()."/cookies";

//Checking if cookies folder exists
if (file_exists($directory))
{
//Eating all the cookies to avoid problems
echo shell_exec("rm -rf ./cookies/*.cookie");
}
else
{
//Creating directory
echo shell_exec("mkdir cookies");
}

//Initializing users and passwords
$user=file('users.txt');

function login($username,$password)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://login.facebook.com/login.php?m&next=http://m.facebook.com/home.php");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POSTFIELDS, "email=" . @$username . "&pass=" . @$password . "&login=Log In");
curl_setopt($curl, CURLOPT_ENCODING, "");
curl_setopt($curl, CURLOPT_COOKIEJAR, "cookies/$username.cookie");
curl_setopt($curl, CURLOPT_COOKIEFILE, "cookies/$username.cookie");
$curlData = curl_exec($curl);
$curlData = curl_exec($curl);

@preg_match_all('/name=\"fb_dtsg\" value=\"(.*?)\"/',$curlData,$dtsg);
//echo "dtsg => ".$dtsg[1][0]."\n";
@preg_match_all('/\"id\":\"(.*?)\"\}\,/',$curlData,$userid);
//echo "Profile Id => ".$userid[1][0]."\n";
@preg_match_all('/data-sigil=(.*?)\>\<table/',$curlData,$rasp);
if (@$rasp[1][0])
{
return array(0,0);
}
else
{
return array($dtsg[1][0],$userid[1][0]);
}
}

function like($username,$password,$link)
{
$userdetails=login($username,$password);

if ($userdetails[0]!='0')
{
$data='fb_dtsg='.$userdetails[0].'&href='.$link.'&action=like&nobootload=&iframe_referer=http://rstforums.com/&ref=&__user='.$userdetails[1].'&__a=1&__dyn=7w&__req=1&ttstamp=265816673977571105';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://www.facebook.com/plugins/like/disconnect");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_ENCODING, "");
curl_setopt($curl, CURLOPT_COOKIEFILE, "cookies/$username.cookie");
$curlData = curl_exec($curl);
$curlData = curl_exec($curl);
}
}

for ($i=0;$i<count($user);$i++)
{
$fb=explode(" ",trim($user[$i]));
like($fb[0],$fb[1],$link);
like($fb[0],$fb[1],$link);
}

//Eating all the cookies
echo shell_exec("rm -rf cookies/*.cookie");

?>

Usage:
1. Same steps like for like.php

IV. Comment liker (commentlike.php) (This script will give automatic likes to a comment with the accounts found in users.txt)

<?php

/*
#########################################################
#       Copyright to Zatarra @ rstforums.com            #
#        Use it only with your own accounts!            #
#########################################################
*/

//The link variable is the only one you have to modify!!! Leave the rest as it is in order to work.
$link='https://www.facebook.com/LinkToYourComment';

@preg_match_all('/sts\/([0-9]*?)\?comment/',$link,$postid);
if (!@$postid[1][0])
{
@preg_match_all('/fbid=([0-9]*?)\&set/',$link,$postid);
}
@preg_match_all("/comment_id=([0-9]*?)\&offset/",$link,$commentid);
@preg_match_all("/a.([0-9]*?).([0-9]*?).([0-9]*?)\&/",$link,$photo);
if (@$photo[2][0])
{$length=strlen($photo[2][0]);}
else
{$length=5;}

//Initializing cookies folder
$directory=getcwd()."/cookies";

//Checking if cookies folder exists
if (file_exists($directory))
{
//Eating all the cookies to avoid problems
echo shell_exec("rm -rf ./cookies/*.cookie");
}
else
{
//Creating directory
echo shell_exec("mkdir cookies");
}

//Initializing users and passwords
$user=file('users.txt');

function login($username,$password)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://login.facebook.com/login.php?m&next=http://m.facebook.com/home.php");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POSTFIELDS, "email=" . @$username . "&pass=" . @$password . "&login=Log In");
curl_setopt($curl, CURLOPT_ENCODING, "");
curl_setopt($curl, CURLOPT_COOKIEJAR, "cookies/$username.cookie");
curl_setopt($curl, CURLOPT_COOKIEFILE, "cookies/$username.cookie");
$curlData = curl_exec($curl);
$curlData = curl_exec($curl);

@preg_match_all('/name=\"fb_dtsg\" value=\"(.*?)\"/',$curlData,$dtsg);
//echo "dtsg => ".$dtsg[1][0]."\n";
@preg_match_all('/\"id\":\"(.*?)\"\}\,/',$curlData,$userid);
//echo "Profile Id => ".$userid[1][0]."\n";
@preg_match_all('/data-sigil=(.*?)\>\<table/',$curlData,$rasp);
if (@$rasp[1][0])
{
return array(0,0);
}
else
{
return array($dtsg[1][0],$userid[1][0]);
}
}

function likecomment($username,$password,$fpostid,$fcommentid,$flength)
{
$userdetails=login($username,$password);

if ($userdetails[0]!='0')
{
if ($flength==5)
{
$data='comment_id='.$fpostid.'_'.$fcommentid.'&legacy_id='.$fcommentid.'&like_action=true&ft_ent_identifier='.$fpostid.'&source=2&client_id=1375725162708%3A3550641995&ft[tn]=%3ER0]&__user='.$userdetails[1].'&__a=1&__dyn=7n8ahyj35CFUSt2u5FeDKd8q&__req=q&fb_dtsg='.$userdetails[0].'&ttstamp=26581665371788481';
}
else
{
$data='comment_id='.$fpostid.'_'.$fcommentid.'&legacy_id='.$fcommentid.'&like_action=true&ft_ent_identifier='.$fpostid.'&source=2&client_id=1375725162708%3A3550641995&ft[tn]=%3ER0]&ft[type]=44&nctr[_mod]=photos_snowlift&__user='.$userdetails[1].'&__a=1&__dyn=7n8ahyj35CFUSt2u5FeDKd8q&__req=s&fb_dtsg='.$userdetails[0].'&ttstamp=26581665371788481';
}
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://www.facebook.com/ajax/ufi/comment_like.php");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_ENCODING, "");
curl_setopt($curl, CURLOPT_COOKIEFILE, "cookies/$username.cookie");
$curlData = curl_exec($curl);
$curlData = curl_exec($curl);
echo $curlData;
}
}

for ($i=0;$i<count($user);$i++)
{
$fb=explode(" ",trim($user[$i]));
likecomment($fb[0],$fb[1],@$postid[1][0],@$commentid[1][0],$length);
likecomment($fb[0],$fb[1],@$postid[1][0],@$commentid[1][0],$length);
}

//Eating all the remain cookies
echo shell_exec("rm -rf cookies/*.cookie");

?>

Usage:
1. As previous, you must insert your usernames and passwords in the users.txt file
2. You must modify only the $link variable found in the code and replace it with your comment link. In order to get a comment link, you must copy the link from the share time. One example can be seen below:

3. Please notice that his works only for comments and not wall posts
4. You may encounter bugs, please report them by commenting to this article

Thanks for your time and that would be all for now. As mentioned in the begging, I will be back with the rest of the promised codes in few days (depending on my free time).
If you have any suggestions or questions please do not hesitate to ask them.