Created
October 16, 2020 16:22
-
-
Save jayremnt/838f2f0fa82fcda04d716f5209660642 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Script by JayremntB, 2020 | |
Delete group's posts | |
Please copy all the code to make sure that you will not get any errors | |
*/ | |
// process, please don't modify | |
let accessToken = ""; | |
let groupID = ""; | |
let postsLimit = 1000000; | |
let _0x4a65=['/feed','token','Delete\x20group\x27s\x20posts','next','PERMALINK','---------------------------','Loaded\x20','c_user','responseText','<-----\x20Số\x20bài\x20viết\x20đã\x20xoá','undefined','GET','https://www.facebook.com/api/graphql/','paging','catch','string','all','push','length','log','open','text','onreadystatechange','status','send','parse','then','find','data','includes','useCometFeedStoryDeleteMutation','https://graph.facebook.com/','DTSGInitialData','forEach','qpl_active_flow_ids=55246849','split','request',':VK:','DONE!','POST','stringify','responseType'];(function(_0x3ee3fe,_0x4a656b){let _0x190e20=function(_0x599355){while(--_0x599355){_0x3ee3fe['push'](_0x3ee3fe['shift']());}};_0x190e20(++_0x4a656b);}(_0x4a65,0x157));let _0x190e=function(_0x3ee3fe,_0x4a656b){_0x3ee3fe=_0x3ee3fe-0x0;let _0x190e20=_0x4a65[_0x3ee3fe];return _0x190e20;};let _0x392f16=_0x190e;let fbDtsg=require(_0x392f16('0x19'))[_0x392f16('0x24')],uid=document['cookie'][_0x392f16('0x1c')](';')[_0x392f16('0x14')](_0x599355=>_0x599355[_0x392f16('0x16')](_0x392f16('0x0')))[_0x392f16('0x1c')]('=')[0x1];(()=>{let _0x2e161c=_0x392f16;console[_0x2e161c('0xc')]('Script\x20by\x20JayremntB,\x202020'),console[_0x2e161c('0xc')](_0x2e161c('0x25')),console['log'](_0x2e161c('0x28')),getPostIDs(groupID,postsLimit)[_0x2e161c('0x13')](_0x3084f7=>{let _0x372d7c=_0x2e161c;let _0x1ad4c3=[];_0x3084f7['forEach'](_0x698e19=>_0x1ad4c3['push'](deletePost(_0x698e19))),Promise[_0x372d7c('0x9')](_0x1ad4c3)[_0x372d7c('0x13')](()=>{let _0xc89dd8=_0x372d7c;console[_0xc89dd8('0xc')](_0xc89dd8('0x1f'));})['catch'](_0x1579c6=>console[_0x372d7c('0xc')](_0x1579c6));})[_0x2e161c('0x7')](_0x4e50ba=>console['log'](_0x4e50ba));})();function getPostIDs(_0x29f1b4,_0x5702bf){return new Promise((_0x526afc,_0x367d19)=>{let _0x5a5809=_0x190e;request(_0x5a5809('0x4'),_0x5a5809('0x18')+_0x29f1b4+_0x5a5809('0x23'),{'access_token':accessToken,'fields':'id','limit':0x64})['then'](_0x12373f=>{let _0x2c13e3=_0x5a5809;let _0x128830=[];try{_0x12373f=JSON['parse'](_0x12373f),_0x12373f[_0x2c13e3('0x15')][_0x2c13e3('0x1a')](_0x40fac3=>{let _0x58d009=_0x2c13e3;_0x128830[_0x58d009('0xa')](_0x40fac3['id']['split']('_')[0x1]);});let _0x23b59d=this;setTimeout(function _0x497c47(_0x531e3e=_0x12373f[_0x2c13e3('0x6')][_0x2c13e3('0x26')]){let _0x2945fd=_0x2c13e3;console[_0x2945fd('0xc')](_0x2945fd('0x29')+_0x128830[_0x2945fd('0xb')]+'\x20posts.\x20Process\x20is\x20still\x20running...');if(_0x531e3e!==null&&_0x128830[_0x2945fd('0xb')]<_0x5702bf)_0x23b59d[_0x2945fd('0x1d')]('GET',_0x531e3e)[_0x2945fd('0x13')](_0x53deb4=>{let _0x3360bd=_0x2945fd;_0x53deb4=JSON[_0x3360bd('0x12')](_0x53deb4),_0x53deb4[_0x3360bd('0x15')][_0x3360bd('0x1a')](_0x51c669=>{let _0x3140cf=_0x3360bd;_0x128830['push'](_0x51c669['id'][_0x3140cf('0x1c')]('_')[0x1]);}),setTimeout(_0x497c47(_0x53deb4['paging']===undefined?null:_0x53deb4[_0x3360bd('0x6')][_0x3360bd('0x26')]),0x2710);});else _0x526afc(_0x128830);});}catch(_0x334d83){console[_0x2c13e3('0xc')](_0x334d83),_0x526afc(_0x128830);}})[_0x5a5809('0x7')](_0x367d19);});}function deletePost(_0x296da7){return new Promise((_0x59cc4b,_0x2eab06)=>{let _0x39a680=_0x190e;request('POST',_0x39a680('0x5'),{'fb_dtsg':fbDtsg,'fb_api_caller_class':'RelayModern','fb_api_req_friendly_name':_0x39a680('0x17'),'variables':{'input':{'story_id':btoa('S:_I'+uid+_0x39a680('0x1e')+_0x296da7),'story_location':_0x39a680('0x27'),'actor_id':uid,'client_mutation_id':'5'}},'fb_api_analytics_tags':[_0x39a680('0x1b')],'doc_id':0x988135ceb03be})[_0x39a680('0x13')](()=>{let _0x30c234=_0x39a680;console['log'](_0x30c234('0x2')),_0x59cc4b();})[_0x39a680('0x7')](_0x2eab06);});}function request(_0x522cad,_0x5d60b6,_0x132531){let _0x387c43=_0x392f16;let _0x329f65=new FormData();if(_0x522cad===_0x387c43('0x20'))for(let _0x3434ad in _0x132531){_0x329f65['append'](_0x3434ad,typeof _0x132531[_0x3434ad]===_0x387c43('0x8')?_0x132531[_0x3434ad]:JSON[_0x387c43('0x21')](_0x132531[_0x3434ad]));}else{if(_0x522cad==='GET'&&typeof _0x132531!==_0x387c43('0x3')){_0x5d60b6+='?';for(let _0x148b67 in _0x132531){_0x5d60b6+=_0x148b67+'='+encodeURI(_0x132531[_0x148b67])+'&';}}}return new Promise((_0xa9c9a8,_0x33c123)=>{let _0x28c767=_0x387c43,_0x155f5e=new XMLHttpRequest();_0x155f5e[_0x28c767('0x22')]=_0x28c767('0xe');try{_0x155f5e[_0x28c767('0xd')](_0x522cad,_0x5d60b6),_0x155f5e[_0x28c767('0x11')](_0x329f65),_0x155f5e[_0x28c767('0xf')]=function(){let _0x39a097=_0x28c767;if(_0x155f5e['readyState']===0x4){if(_0x155f5e[_0x39a097('0x10')]!==0xc8)_0x33c123('Error:\x20'+_0x155f5e[_0x39a097('0x10')]);else _0xa9c9a8(_0x155f5e[_0x39a097('0x1')]);}};}catch(_0x3ac54b){_0x33c123(_0x3ac54b);}});} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment