daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest Mar 21st, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. date_default_timezone_set("Asia/Baghdad");
  3. if (!file_exists('madeline.php')) {
  4.     copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
  5. }
  6. if (!file_exists('blockde.txt')) {
  7.   file_put_contents('blockde.txt','');
  8.   }
  9.   if (!file_exists('list.txt')) {
  10.     file_put_contents('list.txt','');
  11.     }
  12.     if (!file_exists('info.json')) {
  13.       $info = [
  14.         'status' => false,
  15.         'placed' => "ch"
  16.         ];
  17.       file_put_contents('info.json',json_encode($info));
  18.       }
  19.       function curlGet($url) {
  20.         $ch = curl_init();
  21.         curl_setopt($ch,CURLOPT_URL,$url);
  22.         curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
  23.         curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
  24.         $res = curl_exec($ch);
  25.         return $res;
  26.         }
  27. include 'madeline.php';
  28. $settings['app_info']['api_id'] = 203088;  
  29. $settings['app_info']['api_hash'] = 'f360233d3627586775bd7298ee775bd1';  
  30. $MadelineProto = new \danog\MadelineProto\API('sus.madeline', $settings);
  31.  
  32. $Admin = "@SsUsS";
  33. $MadelineProto->start();
  34. function Check($user){
  35.   global $MadelineProto;
  36.   try{
  37.   $MadelineProto->messages->getPeerDialogs(['peers'=> [$user]]);
  38.    return "Bad";
  39.   }catch(Exception $e){
  40.   return "Good";
  41.   }
  42.   }
  43. $offset = 0;
  44. $MadelineProto->messages->sendMessage(['peer'=>$Admin,'message'=>"🔘¦Checker Has Been Launched .!
  45. - /orders -> show Orders"]);
  46. if($info['placed'] == "ch"){
  47. $channelsssso = $MadelineProto->channels->createChannel(['broadcast' => true, 'megagroup' => false, 'title' => "m", 'about' => "m" ]);
  48. }
  49. $i=0;
  50. $start = time();
  51. $date_start = date("m/d h:i:s");
  52. while (true) {
  53.  
  54.  
  55.  
  56.     if(file_exists('info.json')){
  57. $info = json_decode(file_get_contents('info.json'),true);
  58. if($info['status']){
  59.  
  60. $users = explode("\n",file_get_contents('list.txt'));
  61. foreach($users as $user){
  62.   $user = str_replace([" ","\r","\n"], '', $user);
  63.   $blockde = explode("\n", file_get_contents('blockde.txt'));
  64.   if(!in_array($user, $blockde)){
  65. $Check = Check($user);
  66. if($Check == "Good"){
  67.   try {
  68. $MadelineProto->account->checkUsername(['username' => $user ]);
  69. if($info['placed'] == "ch"){
  70. $MadelineProto->channels->updateUsername(['channel' => $channelsssso['updates'][1], 'username' => $user ]);
  71. $pp = "Channel";
  72. }else{
  73. $MadelineProto->account->updateUsername(['username' => $user]);
  74. $pp = "Account";
  75. }
  76. $date_end = date("m/d h:i:s");
  77. $textsend = "📣 ¦Report Checker
  78. ———————————
  79. ◾¦For User Name : [ @$user ]
  80. ◽¦Number of Clicks : [ $i ]
  81. ◾¦Was Moved To : [ $pp ]
  82.  
  83. ⏰¦Date Start : [ $date_start ]
  84. ⏱¦Date End : [ $date_end ]
  85. ———————————
  86. 🔱¦Admin Checker ".'{'." $Admin ".'}'."
  87. -";
  88. $MadelineProto->messages->sendMessage(['peer'=>$Admin,'message'=>$textsend]);
  89. if($info['placed'] == "ch"){
  90. $channelsssso = $MadelineProto->channels->createChannel(['broadcast' => true, 'megagroup' => false, 'title' => "Checker By : $Admin", 'about' => "- Checker By  $Admin" ]);
  91. }else{
  92. break;
  93. }
  94. }catch(Exception $e){
  95.       if($e->getMessage() == "The provided username is not valid" or $e->getMessage() == "USERNAME_OCCUPIED"){
  96.       file_put_contents("blockde.txt", file_get_contents("blockde.txt")."$user\n");
  97.       }else{
  98.       $textsend = '@' . $user . ':'.$e->getMessage();
  99.       $MadelineProto->messages->sendMessage(['peer'=>$Admin,'message'=>$textsend]);
  100.   }
  101.       }
  102. }
  103. $i++;
  104. }
  105. }
  106.  
  107.  
  108.      
  109.     }
  110.     }
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.     $updates = $MadelineProto->get_updates(['offset' => $offset, 'limit' => 50, 'timeout' => 0]);
  118.    if($updates != null) \danog\MadelineProto\Logger::log($updates);
  119.     foreach ($updates as $update) {
  120.         $offset = $update['update_id'] + 1;
  121.         switch ($update['update']['_']) {
  122.             case 'updateNewMessage':
  123.             case 'updateNewChannelMessage':
  124.                 if (isset($update['update']['message']['out']) && $update['update']['message']['out']) {
  125.                     continue;
  126.                 }
  127.                 $res = json_encode($update, JSON_PRETTY_PRINT);
  128.                 if ($res == '') {
  129.                     $res = var_export($update, true);
  130.                 }try {
  131.                   if(isset($update['update']['message']['message'])){
  132.                      //------------------------------------------
  133.  
  134. $text = $update['update']['message']['message'];
  135.  
  136. $from_id = isset($update['update']['message']['from_id']) ? $update['update']['message']['from_id'] : null;
  137.  
  138. if($from_id == 583881427){
  139.  
  140. if($text == '/stop'){
  141. $info = json_decode(file_get_contents('info.json'),true);
  142.                           $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "- Checker Was Done Stopped.!", 'reply_to_msg_id' => $update['update']['message']['id']]);
  143.                           $info['status'] = false;
  144.                           file_put_contents('info.json',json_encode($info));
  145. }
  146.  
  147. if($text == '/list'){
  148.                           $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => file_get_contents("list.txt"), 'reply_to_msg_id' => $update['update']['message']['id']]);
  149. }
  150. if($text == '/run'){
  151.  
  152. $info = json_decode(file_get_contents('info.json'),true);
  153.                           $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "- Checker Was Done Running.!", 'reply_to_msg_id' => $update['update']['message']['id']]);
  154.                           $info['status'] = true;
  155.                           file_put_contents('info.json',json_encode($info));
  156. }
  157.  
  158.                           if(preg_match('/\/list .*/', $text)){
  159.                               $text = str_replace('/list ', '', $text);
  160.                               $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => '- The List Was Done placed.!', 'reply_to_msg_id' => $update['update']['message']['id']]);
  161.                               $list = str_replace("<br>","\n",$text);
  162.                               file_put_contents('list.txt',$list);
  163.                           }  
  164. if($text == '/clear'){
  165.                             $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "- The List Was Deleted.!", 'reply_to_msg_id' => $update['update']['message']['id']]);
  166.                             file_put_contents('list.txt','');
  167. }
  168.                           if(preg_match('/\/adduser .*/', $text)){
  169.                             $text = str_replace('/adduser ', '', $text);
  170.                             $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => '- Done Added To List.!', 'reply_to_msg_id' => $update['update']['message']['id']]);
  171.                             file_put_contents("list.txt", file_get_contents("list.txt")."$text\n");
  172.  
  173. }  
  174.                           if(preg_match('/\/set .*/', $text)){
  175.                             $text = str_replace('/set ', '', $text);
  176.                             $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => '- Done Change Update placed .', 'reply_to_msg_id' => $update['update']['message']['id']]);
  177.                             $info['placed'] = $text;
  178.                             file_put_contents('info.json',json_encode($info));
  179.  
  180. }  
  181.  
  182. if($text == '/orders'){
  183.                             $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "- Orders .! -> @SsUsS
  184. - /run -> For Run The Checker.!
  185. - /stop -> For Stop The Checker.!
  186. - /info -> Get Information.!
  187. - /clear -> Deleted List.!
  188. - /list -> View List.!
  189. - /set ch -> Set Channel.!
  190. - /set ac -> Set Account.!
  191. - /adduser -> Add Users.!
  192. - /list Users -> Set to List.!
  193. - /loops -> View Loops.!", 'reply_to_msg_id' => $update['update']['message']['id']]);
  194. }
  195.                      
  196. if($text == '/loops'){
  197.                             $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "- the loops -> $i", 'reply_to_msg_id' => $update['update']['message']['id']]);
  198. }
  199. $end = time() - $start;
  200.  
  201. if($text == '/info'){
  202. $info = json_decode(file_get_contents('info.json'),true);
  203.  
  204. $statusg = $info['status'];
  205.                               if($statusg){
  206.                                 $status = "ON";
  207.  
  208. }else{
  209.                                 $status = "OFF";
  210. }
  211.                             $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "- Information of Checker :-
  212.  
  213. - Status Checker -> $status .
  214. - Type of Checker -> List .
  215. ", 'reply_to_msg_id' => $update['update']['message']['id']]);
  216.                           }
  217.                       }
  218.                       //------------------------------------------
  219.                   }
  220.               } catch (\danog\MadelineProto\RPCErrorException $e) {
  221.                   $MadelineProto->messages->sendMessage(['peer' => $Admin, 'message' => $e->getCode().': '.$e->getMessage().PHP_EOL.$e->getTraceAsString()]);
  222.               }
  223.       }
  224.   }
  225. }
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