php eval function issue

Discussion in 'PHP' started by jayantamukherjee, Mar 20, 2011.

  1. #1
    I am using a free wordpress template. I wanted to remove the default side bar but I haven't found any clue from widget or sidebar.php about the default section in order to remove it, but then I noticed a function in my sidebar <?php eval("?>".gzinflate(base64_decode,........) and when I am removing that function my default side bar is also getting disappeared but structure is getting messed up, please help me to get rid of this problem and also I read from the internet that the function I have removed from my side bar is a hacking code.
    Following is the function I have removed:
    <?php eval("?>".gzinflate(base64_decode(gzinflate(base64_decode(gzinflate(base64_decode('BcHJgkMwAADQD3JIS7Qc5pDatyhR1A2ZamuoWEJ9/bx3qW23aYMVIT3SJacpbeuOYDdjk92wTodzJlqsTBVQ7fktoK9ewrMIE2PagNwYkiBC7lYP42lRUSxVZ+Rmy6Yv1RNXSjor1QPdG6LGh68p8EK7JzTRwprmjxlGHbC9zouPOw8sQkrghmo5eKms7fnWGhEhTy9lwjXUVLk5bAV5j224LBWvh+DDopE7vyYSdIWhjLIB58qNfYtmA8np45MGQXtSl6vq15U8ZydYCe/4SvaBAZHyHbcupL0gsSybMEkNjOv7jJqBO1KRiocBm+ftSHbb6r9Km+8lAtC4VONi96rfrY+4WEOz1OKxqKPoMluvFXcx+ONwM4koCQAFP/8='))))))); ?>

    Looking forward to see the resolutions
    Regards
    Jayanta
     
    jayantamukherjee, Mar 20, 2011 IP
  2. vediovis

    vediovis Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    eval is dangerous. Don't give the system instructions you don't totally understand and sanitize your parameters.
     
    vediovis, Mar 22, 2011 IP
  3. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #3
    Man all is there already, replace first word 'eval' with 'print' and you can get the code, ok here is your code btw, replace the whole junk between <?php and ?> with following code:

    
    echo '     
    <h3>Meta</h3>
    <ul>
    	'.wp_register().'
    	<li>'.wp_loginout().'</li>
    	
    
      <li><a href="http://www.thybiletbul.com" title="thy">thy</a></li><li><a href="http://www.plasticsurgeryvoyage.com/" title="plastic surgery">plastic surgery</a></li><li><a href="http://www.greecetravelzone.com/greek/greece-holidays" title="greece holidays">greece holidays</a></li>  
    
    
    	'.wp_meta().'
    </ul>
    </div>
    
    </div>';
    
    Code (markup):

    And then make the modifications that you like. ethically it is not good to remove something forcefully but purchase even if it is very poorly encrypted, as this one.

    regards
     
    Vooler, Mar 23, 2011 IP