Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- date_default_timezone_set("Asia/Baghdad");
- if (!file_exists('madeline.php')) {
- copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
- }
- if (!file_exists('blockde.txt')) {
- file_put_contents('blockde.txt','');
- }
- if (!file_exists('list.txt')) {
- file_put_contents('list.txt','');
- }
- if (!file_exists('info.json')) {
- $info = [
- 'status' => false,
- 'type' => "m"
- ];
- file_put_contents('info.json',json_encode($info));
- }
- function curlGet($url) {
- $ch = curl_init();
- curl_setopt($ch,CURLOPT_URL,$url);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
- curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
- $res = curl_exec($ch);
- return $res;
- }
- function random(){
- $out = "";
- $rand = substr(str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0,1);
- $randomf = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','_',1,2,3,4,5,6,7,8,9);
- $randomx = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
- $out="";
- for ($i = 0; $i < count($randomx); $i++) {
- $two = $rand;
- $one = $randomx[$i];
- $out = $out . $one.$two.$two.$two.$two.$two."\n";
- }
- for ($i = 0; $i < count($randomf); $i++) {
- $two = $rand;
- $one = $randomf[$i];
- $out = $out . $two.$two.$one.$two.$two.$two."\n";
- $out = $out . $two.$one.$two.$two.$two.$two."\n";
- $out = $out . $two.$two.$two.$one.$two.$two."\n";
- if($one != "_"){
- $out = $out . $two.$two.$two.$two.$two.$one."\n";
- }
- }
- $j = "bot";
- $ke = "_";
- for ($k = 0; $k < count($randomf); $k++) {
- $two = $rand;
- $one = $randomf[$k];
- $out = $out . $two.$two.$one.$j."\n";
- $out = $out . $two.$one.$two.$j."\n";
- $out = $out . $two.$ke.$one.$j."\n";
- $out = $out . $two.$one.$one.$j."\n";
- $out = $out . $two.$two.$ke.$j."\n";
- }
- return $out;
- }
- function Check($user){
- $get = curlGet('http://t.me/'.$user);
- if(!strpos($get,"tgme_page_extra")){
- return "Good";
- }else {
- return "Bad";
- }
- }
- include 'madeline.php';
- $MadelineProto = new \danog\MadelineProto\API('me.madeline');
- $Admin = "@QWWVW";
- $MadelineProto->start();
- $offset = 0;
- $MadelineProto->messages->sendMessage(['peer'=>$Admin,'message'=>'đ Checker was turned on
- â ī¸ Command:
- đ stop the Checker : /stop
- đ Run the Checker : /run
- âšī¸ informations : /info
- đ For List or a make : /set l or /set m
- đ Set to List : /list Text
- đ Clear for List : /clean
- ==============
- đ Admin : '.$Admin.'
- -']);
- $channelsssso = $MadelineProto->channels->createChannel(['broadcast' => true, 'megagroup' => false, 'title' => "m", 'about' => "m" ]);
- $i=0;
- $date_start = date("m/d h:i:s a");
- while (true) {
- if(file_exists('info.json')){
- $info = json_decode(file_get_contents('info.json'),true);
- if($info['status']){
- if($info['type'] == "l"){
- $users = explode("\n",file_get_contents('list.txt'));
- }else{
- $users = explode("\n",random() );
- }
- foreach($users as $user){
- $user = str_replace([" ","\r","\n"], '', $user);
- $blockde = explode("\n", file_get_contents('blockde.txt'));
- if(!in_array($user, $blockde)){
- $Check = Check($user);
- if($Check == "Good"){
- try {
- $MadelineProto->account->checkUsername(['username' => $user ]);
- $MadelineProto->channels->updateUsername(['channel' => $channelsssso['updates'][1], 'username' => $user ]);
- $date_end = date("m/d h:i:s a");
- $textsend = "âââââââââââ
- â |UserName: [ @$user ].!
- â |The LooPs: [ $i ].!
- â |Date Start: [ $date_start ].!
- â |Date End: [ $date_end ].!";
- $MadelineProto->messages->sendMessage(['peer'=>$Admin,'message'=>$textsend]);
- $channelsssso = $MadelineProto->channels->createChannel(['broadcast' => true, 'megagroup' => false, 'title' => "m", 'about' => "m" ]);
- }catch(Exception $e){
- if($e->getMessage() == "The provided username is not valid" or $e->getMessage() == "USERNAME_OCCUPIED"){
- file_put_contents("blockde.txt", file_get_contents("blockde.txt")."$user\n");
- }else{
- $textsend = '@' . $user . ':'.$e->getMessage();
- $MadelineProto->messages->sendMessage(['peer'=>$Admin,'message'=>$textsend]);
- }
- }
- }
- $i++;
- usleep(250000);
- }
- }
- }
- }
- $updates = $MadelineProto->get_updates(['offset' => $offset, 'limit' => 50, 'timeout' => 0]);
- if($updates != null) \danog\MadelineProto\Logger::log($updates);
- foreach ($updates as $update) {
- $offset = $update['update_id'] + 1;
- switch ($update['update']['_']) {
- case 'updateNewMessage':
- case 'updateNewChannelMessage':
- if (isset($update['update']['message']['out']) && $update['update']['message']['out']) {
- continue;
- }
- $res = json_encode($update, JSON_PRETTY_PRINT);
- if ($res == '') {
- $res = var_export($update, true);
- }try {
- if(isset($update['update']['message']['message'])){
- //------------------------------------------
- $text = $update['update']['message']['message'];
- $from_id = isset($update['update']['message']['from_id']) ? $update['update']['message']['from_id'] : null;
- if($from_id == 799598143){
- if($text == '/stop'){
- $info = json_decode(file_get_contents('info.json'),true);
- $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "Checker has been successfully stopped â ", 'reply_to_msg_id' => $update['update']['message']['id']]);
- $info['status'] = false;
- file_put_contents('info.json',json_encode($info));
- }
- if($text == '/run'){
- $info = json_decode(file_get_contents('info.json'),true);
- $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "Checker was turned on successfully â ", 'reply_to_msg_id' => $update['update']['message']['id']]);
- $info['status'] = true;
- file_put_contents('info.json',json_encode($info));
- }
- if(preg_match('/\/set .*/', $text)){
- $info = json_decode(file_get_contents('info.json'),true);
- $text = str_replace('/set ', '', $text);
- if($text == 'l') $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => 'The List was successfully selected â ', 'reply_to_msg_id' => $update['update']['message']['id']]);
- if($text == 'm') $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => 'The Make was successfully selected â ', 'reply_to_msg_id' => $update['update']['message']['id']]);
- $info['type'] = "$text";
- file_put_contents('info.json',json_encode($info));
- }
- if(preg_match('/\/list .*/', $text)){
- $text = str_replace('/list ', '', $text);
- $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => 'The List was successfully placed â ', 'reply_to_msg_id' => $update['update']['message']['id']]);
- $list = str_replace("<br>","\n",$text);
- file_put_contents('list.txt',$list);
- }
- if($text == '/clear'){
- $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "The List was successfully deleted â ", 'reply_to_msg_id' => $update['update']['message']['id']]);
- file_put_contents('list.txt','');
- }
- if($text == '/info'){
- $info = json_decode(file_get_contents('info.json'),true);
- $statusg = $info['status'];
- $typeg = $info['type'];
- if($statusg){
- $status = "ON â ";
- }else{
- $status = "OFF đ";
- }
- if($typeg == "l"){
- $type = "List đ";
- }else{
- $type = "Make đĻ";
- }
- $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "âšī¸ Information of Checker:-
- Status Checker : $status
- Type of Checker : $type
- -", 'reply_to_msg_id' => $update['update']['message']['id']]);
- }
- }
- //------------------------------------------
- }
- } catch (\danog\MadelineProto\RPCErrorException $e) {
- $MadelineProto->messages->sendMessage(['peer' => $Admin, 'message' => $e->getCode().': '.$e->getMessage().PHP_EOL.$e->getTraceAsString()]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement