Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. <?php
  2. ini_set('max_execution_time', 9000);
  3. ini_set('memory_limit','960M');
  4. $admin = "583881427";
  5. function bot($method,$datas=[]){
  6. $url = "https://api.telegram.org/bot889558409:AAFBvct-BGzFI7ftmZ-9JxbY7WtpZkIqUlI/".$method;
  7. $ch = curl_init();
  8. curl_setopt($ch,CURLOPT_URL,$url);
  9. curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
  10. curl_setopt($ch,CURLOPT_POSTFIELDS,$datas);
  11. $res = curl_exec($ch);
  12. if(curl_error($ch)){
  13. var_dump(curl_error($ch));
  14. }else{
  15. return json_decode($res);
  16. }
  17. }
  18. if (!file_exists('madeline.php')) {
  19. copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
  20. }
  21. include 'madeline.php';
  22. $settings['app_info']['api_id'] = 203088;
  23. $settings['app_info']['api_hash'] = 'f360233d3627586775bd7298ee775bd1';
  24. $MadelineProto = new \danog\MadelineProto\API('lll.madeline', $settings);
  25. $MadelineProto->start();
  26. $i = 0;
  27. $x = 0;
  28. $u = explode("<br>",file_get_contents("users"));
  29. $b = explode("\n",file_get_contents("block"));
  30. while(true){
  31. ob_start();
  32. if($i > count($u)-2){
  33. $i = 0;
  34. $u = explode("<br>",file_get_contents("users"));
  35. $b = explode("\n",file_get_contents("block"));
  36. }
  37. if(!in_array($u[$i], $b)){
  38. try{
  39. $MadelineProto->messages->getPeerDialogs(['peers'=> [$u[$i]]]);
  40. echo "No:".$u[$i]." - ".$x." Bad in:".date("s")."\n";
  41. $x++;
  42. }catch(Exception $e){
  43. try{
  44. $MadelineProto->account->checkUsername(['username' => $u[$i]]);
  45. }catch(Exception $e) {
  46. file_put_contents("block", $u[$i]."\n",FILE_APPEND);
  47. }
  48. $b = explode("\n",file_get_contents("block"));
  49. if(!in_array($u[$i], $b)){
  50. $p = file_get_contents("where");
  51. if(!preg_match("/bot/",$u[$i])){
  52. if($p == "c"){
  53. $updates = $MadelineProto->channels->createChannel(['broadcast' => true, 'megagroup' => false, 'title' => "m", 'about' => "m", ]);
  54. $MadelineProto->channels->updateUsername(['channel' => $updates['updates'][1], 'username' => $u[$i]]);
  55. $MadelineProto->messages->sendMessage(['peer' => $updates['updates'][1], 'message' => "m"]);
  56. $puted = "Channel";
  57. }
  58. }else{
  59. $MadelineProto->messages->sendMessage(['peer' => "@botfather", 'message' => "/newbot"]);
  60. $MadelineProto->messages->sendMessage(['peer' => "@botfather", 'message' => "m"]);
  61. $MadelineProto->messages->sendMessage(['peer' => "@botfather", 'message' => $u[$i]]);
  62. $puted = "BotFather";
  63. }
  64. bot('sendmessage',[
  65. 'chat_id'=>$admin,
  66. 'text'=>"*New Update* ✅
  67. ———————
  68. *UserName Taken :-* [ @".$u[$i]." ]
  69. *Number of Clicks :-* [ $x ]
  70. *Was Fucked To :-* [ $puted ]
  71. ———————
  72. - @SsUsS",
  73. 'parse_mode'=>"MarkDown",
  74. ]);
  75. echo "- UserName Taken :- [ ".$u[$i]." ]\n";
  76. if($p != "c" and !preg_match("/bot/",$u[$i]));
  77. }
  78. }
  79. }
  80. $i++;
  81. ob_end_flush();
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement