daily pastebin goal
61%
SHARE
TWEET

Untitled

ariful1234567 Mar 17th, 2018 35 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var aing={
  2.   gid:"199855813453158",
  3.   email:"kjkjkjkjk@ymail.com",
  4.   password:"password",
  5.  
  6.   getApi:function(huh){var a=UrlFetchApp.fetch(huh,{muteHttpExceptions:true,method:"get"}),b=JSON.parse(a.getContentText());return b},
  7.   setApi:function(huh,pl){var a=UrlFetchApp.fetch(huh,{muteHttpExceptions:true,method:"post",payload:pl}),b=JSON.parse(a.getContentText());return b},
  8.  
  9.   sp:PropertiesService.getScriptProperties(),
  10.   saveMultipleDb:function(what,s){if(!s){s="uid"}var a={};for(x in what){if(what[x].id){a[s+"_"+what[x].id]=JSON.stringify(what[x])}}aing.sp.setProperties(a,false)},
  11.   saveDb:function(what,s){if(!s){s="uid"}if(what.id){aing.sp.setProperty(s+"_"+what.id,JSON.stringify(what))}},
  12.   getDb:function(what,s){if(!s){s="uid"}if(what){var a=aing.sp.getProperty(s+"_"+what);if(a){return JSON.parse(a)}else{return false}}else{var a=aing.sp.getProperties(),b=[];for(x in a){if(a[x]&&x.match(s+"_")){b.push(JSON.parse(a[x]))}}if(b.length==0){return b}else{return b.sort(function(c,d){if(d.time){return d.time.localeCompare(c.time)}})}}},
  13.   delDb:function(what,s){if(!s){s="uid"}aing.sp.deleteProperty(s+"_"+what)},
  14.   delAllDb:function(){aing.sp.deleteAllProperties()},
  15.  
  16.   login:function(imel,paswot){
  17.     aing.user={"email":imel,"pass":paswot,"login":"Log+In"};
  18.     var a=UrlFetchApp.fetch("https://m.facebook.com/login.php",{"method":"POST","payload":aing.user,"followRedirects":false}).getAllHeaders()['Set-Cookie'];
  19.     for(x in a){if(a[x].match(/c_user/i)){aing.user.kuki=a.join(";");aing.user.id=a[x].match(/c_user=(\d+)/)[1];break}}
  20.     if(aing.user.kuki&&aing.user.id){
  21.       Logger.log("Logging succeed uid:"+aing.user.id);
  22.       var b=UrlFetchApp.fetch("https://m.facebook.com/home.php",{"method":"GET","headers":{"Cookie":aing.user.kuki}}).getContentText().match(/<input (.*?) \/\>/gi);
  23.       for(y in b){if(/ name=\"fb_dtsg\" /i.exec(b[y])&&/ value=\"(.*?)\" /.exec(b[y])){aing.user.dtsg=/ value=\"(.*?)\" /.exec(b[y])[1];break}}
  24.       if(aing.user.dtsg){
  25.         aing.saveDb(aing.user);
  26.       }
  27.       Logger.log("fb_dtsg: "+aing.user.dtsg);
  28.     }else{
  29.       Logger.log("Logging failed!\n"+JSON.stringify(a,null,"  "));
  30.     }
  31.   },
  32.   getRequests:function(){
  33.     Logger.log("Collecting requests..");
  34.     var bb=UrlFetchApp.fetch("https://m.facebook.com/groups/"+aing.gid+"/madminpanel/requests/",{"method":"GET","headers":{"Cookie":aing.user.kuki}}).getContentText();
  35.     var b=bb.match(/<input (.*?) \/\>/gi);
  36.     var masukga="ga";
  37.     var g=/<title>(.*?)<\/title>/i.exec(bb);
  38.     if(g&&g[1]){Logger.log(g[1])}
  39.     for(y in b){
  40.       if(/ name=\"fb_dtsg\" /i.exec(b[y])&&/ value=\"(.*?)\" /.exec(b[y])){
  41.         aing.user.dtsg=/ value=\"(.*?)\" /.exec(b[y])[1];
  42.         aing.saveDb(aing.user);
  43.         masukga="ya";
  44.         break;
  45.       }
  46.     }
  47.     if(masukga=="ya"){
  48.       var f=/<span class=\"mfsm fcg\">(.*?)<\/span>/i.exec(bb);
  49.       if(f&&f[1]){Logger.log(f[1])}
  50.       for(z in b){
  51.         if(/ name=\"userid\" /i.exec(b[z])&&/ value=\"(.*?)\" /.exec(b[z])){
  52.           var c=/ value=\"(.*?)\" /.exec(b[z])[1];
  53.           if(c){
  54.             Logger.log("Confirming "+c);
  55.             var d=UrlFetchApp.fetch("https://m.facebook.com/groups/"+aing.gid+"/write_async/requests/",{"method":"POST","headers":{"Cookie":aing.user.kuki},"payload":{"fb_dtsg":aing.user.dtsg,"userid":c,"charset_test":"€,´,€,´,水,Д,Є","add":1}}).getContentText();
  56.             var e=/<div class=\"_55wr acy\">(.*?)<\/div>/i.exec(d);
  57.             if(e&&e[1]){Logger.log(e[1])}
  58.             break;
  59.           }
  60.         }
  61.       }
  62.     }else{
  63.       Logger.log("Not logged-in!");
  64.       aing.delDb(aing.user.id);
  65.     }
  66.   }
  67. };
  68.  
  69. function confirmMembers(){
  70.   var a=aing.getDb();
  71.   if(a.length==0){
  72.     aing.login(aing.email,aing.password);
  73.   }else{
  74.     aing.user=a[0];
  75.     aing.getRequests();
  76.   }
  77. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top