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,
- 'placed' => "ch"
- ];
- 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;
- }
- include 'madeline.php';
- $settings['app_info']['api_id'] = 203088;
- $settings['app_info']['api_hash'] = 'f360233d3627586775bd7298ee775bd1';
- $MadelineProto = new \danog\MadelineProto\API('sus.madeline', $settings);
- $Admin = "@SsUsS";
- $MadelineProto->start();
- function Check($user){
- global $MadelineProto;
- try{
- $MadelineProto->messages->getPeerDialogs(['peers'=> [$user]]);
- return "Bad";
- }catch(Exception $e){
- return "Good";
- }
- }
- $offset = 0;
- $MadelineProto->messages->sendMessage(['peer'=>$Admin,'message'=>"🔘¦Checker Has Been Launched .!
- - /orders -> show Orders"]);
- if($info['placed'] == "ch"){
- $channelsssso = $MadelineProto->channels->createChannel(['broadcast' => true, 'megagroup' => false, 'title' => "m", 'about' => "m" ]);
- }
- $i=0;
- $start = time();
- $date_start = date("m/d h:i:s");
- while (true) {
- if(file_exists('info.json')){
- $info = json_decode(file_get_contents('info.json'),true);
- if($info['status']){
- $users = explode("\n",file_get_contents('list.txt'));
- 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 ]);
- if($info['placed'] == "ch"){
- $MadelineProto->channels->updateUsername(['channel' => $channelsssso['updates'][1], 'username' => $user ]);
- $pp = "Channel";
- }else{
- $MadelineProto->account->updateUsername(['username' => $user]);
- $pp = "Account";
- }
- $date_end = date("m/d h:i:s");
- $textsend = "📣 ¦Report Checker
- ———————————
- ◾¦For User Name : [ @$user ]
- ◽¦Number of Clicks : [ $i ]
- ◾¦Was Moved To : [ $pp ]
- ⏰¦Date Start : [ $date_start ]
- ⏱¦Date End : [ $date_end ]
- ———————————
- 🔱¦Admin Checker ".'{'." $Admin ".'}'."
- -";
- $MadelineProto->messages->sendMessage(['peer'=>$Admin,'message'=>$textsend]);
- if($info['placed'] == "ch"){
- $channelsssso = $MadelineProto->channels->createChannel(['broadcast' => true, 'megagroup' => false, 'title' => "Checker By : $Admin", 'about' => "- Checker By $Admin" ]);
- }else{
- break;
- }
- }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++;
- }
- }
- }
- }
- $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 == 583881427){
- if($text == '/stop'){
- $info = json_decode(file_get_contents('info.json'),true);
- $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "- Checker Was Done Stopped.!", 'reply_to_msg_id' => $update['update']['message']['id']]);
- $info['status'] = false;
- file_put_contents('info.json',json_encode($info));
- }
- if($text == '/list'){
- $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => file_get_contents("list.txt"), 'reply_to_msg_id' => $update['update']['message']['id']]);
- }
- if($text == '/run'){
- $info = json_decode(file_get_contents('info.json'),true);
- $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "- Checker Was Done Running.!", 'reply_to_msg_id' => $update['update']['message']['id']]);
- $info['status'] = true;
- 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 Done 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 Deleted.!", 'reply_to_msg_id' => $update['update']['message']['id']]);
- file_put_contents('list.txt','');
- }
- if(preg_match('/\/adduser .*/', $text)){
- $text = str_replace('/adduser ', '', $text);
- $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => '- Done Added To List.!', 'reply_to_msg_id' => $update['update']['message']['id']]);
- file_put_contents("list.txt", file_get_contents("list.txt")."$text\n");
- }
- if(preg_match('/\/set .*/', $text)){
- $text = str_replace('/set ', '', $text);
- $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => '- Done Change Update placed .', 'reply_to_msg_id' => $update['update']['message']['id']]);
- $info['placed'] = $text;
- file_put_contents('info.json',json_encode($info));
- }
- if($text == '/orders'){
- $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "- Orders .! -> @SsUsS
- - /run -> For Run The Checker.!
- - /stop -> For Stop The Checker.!
- - /info -> Get Information.!
- - /clear -> Deleted List.!
- - /list -> View List.!
- - /set ch -> Set Channel.!
- - /set ac -> Set Account.!
- - /adduser -> Add Users.!
- - /list Users -> Set to List.!
- - /loops -> View Loops.!", 'reply_to_msg_id' => $update['update']['message']['id']]);
- }
- if($text == '/loops'){
- $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "- the loops -> $i", 'reply_to_msg_id' => $update['update']['message']['id']]);
- }
- $end = time() - $start;
- if($text == '/info'){
- $info = json_decode(file_get_contents('info.json'),true);
- $statusg = $info['status'];
- if($statusg){
- $status = "ON";
- }else{
- $status = "OFF";
- }
- $MadelineProto->messages->sendMessage(['peer' => $update['update'], 'message' => "- Information of Checker :-
- - Status Checker -> $status .
- - Type of Checker -> List .
- ", '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