Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


error_reporting(0);
//   trim(fgets(STDIN));
date_default_timezone_set("Asia/Jakarta");
$res="\033[7m";
$hitam="\033[0;30m";
$abu2="\033[1;30m";
$putih="\033[0;37m";
$putih2="\033[1;37m";
$red="\033[0;31m";
$red2="\033[1;31m";
$green="\033[0;32m";
$green2="\033[1;32m";
$yellow="\033[0;33m";
$yellow2="\033[1;33m";
$blue="\033[0;34m";
$blue2="\033[1;34m";
$purple="\033[0;35m";
$purple2="\033[1;35m";
$lblue="\033[0;36m";
$lblue2="\033[1;36m";
$end = "\033[0m";
$blockabu = "\033[100m";
$blockmerah = "\033[101m";
$blockstabilo = "\033[102m";
$blockkuning = "\033[103m";
$blockbiru = "\033[104m";
$blockpink = "\033[105m";
$blockcyan = "\033[106m";
$blockputih = "\033[107m";
system("rm key");
system('clear');
$d=date("D");
switch ($d) {
  case 'Sun':
    $password="P!U4We6#i%*8Du";
    break;
  case 'Mon':
    $password="oNmMwR@&KZ4m8M";
    break;
  case 'Tue':
    $password="qAv*hGx2dXoLac";
    break;
  case 'Wed':
    $password="uy6ok5VUpwyi@F";
    break;
  case 'Thu':
    $password="qr&Wtj&h2nhJcq";
    break;
  case 'Fri':
    $password="nWyy8MVe3Bp@@B";
    break;
  case 'Sat':
    $password="*QQ6tFZkxziPBE";
    break;
  default:
        $password="y*$4K@9ZpYA2t6";
    break;
}
$d=date("D");
switch ($d) {
  case 'Sun':
    $linkpassword="https://cutt.ly/2w0exkUw";
    break;
  case 'Mon':
    $linkpassword="https://cutt.ly/mw0ezuS2";
    break;
  case 'Tue':
    $linkpassword="https://cutt.ly/7w0ezzxy";
    break;
  case 'Wed':
    $linkpassword="https://cutt.ly/Mw0ezUpp";
    break;
  case 'Thu':
    $linkpassword="https://cutt.ly/Aw0ezL53";
    break;
  case 'Fri':
    $linkpassword="https://cutt.ly/jw0ez3h8";
    break;
  case 'Sat':
    $linkpassword="https://cutt.ly/0w0extvR";
    break;
  default:
    $linkpassword="https://cutt.ly/0w0exRst";
    break;
}
if(!file_exists("key")){
  ulang:
  system("clear");
  echo "LInk password ".$linkpassword."\n";
  $key=readline("input : ");
  if($password === $key){
//  echo "password true\n";
  sleep(3);
  $file=fopen("key","w");
  fwrite($file,$key);
  fclose($file);
  }else{
    exit("worng password");
  }
}else{
  if($password !== file_get_contents("key")){
//    echo "sesi password habis\n";
    sleep(2);
    system("rm key");
    goto ulang;
  }
}
system("clear");
echo"\n\n";
$white = "\e[97m";
$resest = "\e[0m";
$red = "\e[91m";
$end = "\e[0m";
$green = "\e[92m";  
$yellow = "\033[1;33m";
$purple = "\033[1;35m";
$lightBlue ="\033[1;36m";
error_reporting(0);
$banner = "{$green}
▀█▀ █▀▀ █▀▀ █░█   █▀▄▀█ █ █▄░█ █▀▀   █▀█ █▄▀  
░█░ ██▄ █▄▄ █▀█   █░▀░█ █ █░▀█ ██▄   █▀▀ █░█  
{$reset}{$yellow}
Telegram Channel {$lightBlue}: {$yellow}https://t.me/Tech_mine_pk
Youtube Channel  {$lightBlue}: {$yellow}https://youtube.com/@Tech_Mine_Pk
Warning     ⚠️      {$lightBlue}: {$red} USE AT YOUR OWN RISK 
\n";

define("banner",$banner);
function curl($link, $method = "GET", $header = [], $request = "", $follow = 1) { 
    $ch = curl_init(); 
    curl_setopt($ch, CURLOPT_URL, $link); 
    if ($method == 'POST') { 
        curl_setopt($ch, CURLOPT_POST, 1); 
        curl_setopt($ch, CURLOPT_POSTFIELDS, $request); 
    } 
    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $follow);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_COOKIEJAR, getcwd()."/cookie.txt");
    curl_setopt($ch, CURLOPT_COOKIEFILE, getcwd()."/cookie.txt");
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);    
    $response = curl_exec($ch);  
    curl_close($ch);    
    return $response; 
}
function valueFile($key, $action = "false", $value = false, $file = 'config.json'){
    $fileData = file_exists($file) ? json_decode(file_get_contents($file), true) : [];
    switch($action){
        case 'write':
            if (isset($fileData[$key])){               return $fileData[$key];
            }
            else{
                $inputData = readline("Input $key: ");                
                $fileData[$key] = $inputData;
                $jsonData = json_encode($fileData, JSON_PRETTY_PRINT);                
                file_put_contents($file, $jsonData);
                return $inputData;            
            }
            break;
        case 'remove':            
            if(isset($fileData[$key])) {
                unset($fileData[$key]);
                $jsonData = json_encode($fileData, JSON_PRETTY_PRINT);                
                file_put_contents($file, $jsonData);           
            }
            break;
        case 'update':
            if(isset($fileData[$key]) && isset($value)) {                
                $fileData[$key] = $value;
                $jsonData = json_encode($fileData, JSON_PRETTY_PRINT);                
                file_put_contents($file, $jsonData);
            return $value;            
            }
        else{
            return null;                            
        }
        break;
        case "false":
        if(isset($fileData[$key])){
            return $fileData[$key];
        }
        break;
        default:            
        return null;
        break;   
    }
}

function explodeString($string, $start, $end, $index = 1){
    $str = explode($start, $string);   
    if (!isset($str[$index])) {
        return false;
    }
    return explode($end, $str[$index])[0];
}

function search($ocean, $needle) {
    if (strpos($ocean, $needle) !== false) {
        return true;
    }
    else {
        return false;
    }
}

function startTimer($totalSeconds, $message = 'Wait For') {
    // Start counting down
    for ($i = $totalSeconds; $i >= 0; $i--) {
        echo "\r$message " . str_pad($i, 2, '0', STR_PAD_LEFT) . " seconds";
        usleep(1000000);
    }
    echo "\r                                                            \r";
}

function clear() {
    $os = strtolower(PHP_OS);
    switch ($os) {
        case 'linux':
        case 'unix':
        case 'darwin':
            system('clear');
            break;
        case 'winnt':
            shell_exec('cmd /c cls');
            break;
    }
}

$header = [
"content-type: application/x-www-form-urlencoded; charset=UTF-8",
"accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,**",
"x-requested-with:XMLHttpRequest",
"content-type: application/json",
"user-agent:".valueFile('useragent','write'),
"cookie: ".valueFile('cookie','write')
];

 
@define('host',"https://cointube.co/"); 
clear();
echo banner;
dashboard:
$data = curl(host."user/dashboard","GET",$header); 
$userInfo = explode('<h2 class="text-white m-0 font-weight-bold fs-4">',$data);
$totalBalance = explode('</h2>',$userInfo[1])[0];
$activityBalance = explode('</h2>',$userInfo[2])[0];
$refferalBalance = explode('</h2>',$userInfo[3])[0];
$indirectRefferalBalance = explode('</h2>',$userInfo[4])[0];

echo "\n{$yellow}Total Balance             {$lightBlue}: {$yellow}{$totalBalance}";
echo "\n{$yellow}Activity Balance          {$lightBlue}: {$yellow}{$activityBalance}";
echo "\n{$yellow}Refferal Balance          {$lightBlue}: {$yellow}{$refferalBalance}";
echo "\n{$yellow}Inderect refferal Balance {$lightBlue}: {$yellow}{$indirectRefferalBalance}\n";


lisOfVideo:
$data = curl(host."watch-videos", 'GET', $header);
$videoId = explode('"',explodeString($data,'<a href="/watch-videos/','"
class="d-block">'))[0];


watchVideo:
while($videoId >= 0){
    $data = json_decode(curl(host."watch-videos/{$videoId}",'POST', $headers, $request = ''), true);
    if(@$data['success'] == false && $data['message'] == 'Something Went Wrong'){}
    else{
        echo "{$yellow}Video Id  {$lightBlue}: {$yellow}{$videoId}\n";
        if(@$data['status'] == false && isset($data['status'])){
            echo "{$yellow}Message {$lightBlue}: {$yellow}$data[text]\n";
        }
        else if(isset($data['message'])){
            startTimer(10, 'Watching Ad');
            echo "{$yellow}Message {$lightBlue}: {$yellow}$data[message]\n";
        }
        echo "{$green}--------------------------------------------------------------------------------\n";
    }
    $videoId -= 1;
}
echo "{$red}Ops.... no more video to view, comeback tommorow\n";



© 2023 Quttera Ltd. All rights reserved.