Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    HG3
    HG3 is offline
    New Coder
    Join Date
    Sep 2011
    Location
    BRAZIL
    Posts
    23
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Post Help with orientation of objects

    I'm new to PHP and wanted help to improve this code which incidentally is not mine.
    PHP Code:
    <?php

    echo "<h2>Decode Eval</h2>";
    echo 
    "<form action='' method='post'>";
    echo 
    "<b>C&oacute;digo</b>: <p><textarea name=cod cols=100 rows=20></textarea></p>";
    echo 
    "<input type='submit' value=' Decode '>";
    echo 
    "<hr><br />";

    //Kodlama By s4l1h


    if($_POST['cod']){
    $ac=$_POST['cod'];
    $ac=preg_replace("/<\?php|\?>/"""$ac);
    $ac=preg_replace("/<\?|\?>/"""$ac);

    $desen="|eval\((.*)\((.*)\(\'(.*)\'\)\)\)\;|siU"// eval(gzinflate(base64_decode('FZ3HjuvQlUV...')));
    $desen2="|eval\((.*)\((.*)\((.*)\(\'(.*)\'\)\)\)\)\;|siU"//eval(gzinflate(str_rot13(base64_decode('FZ3HjuvQlUV...'))));
    $desen3="|eval\((.*)\(\'(.*)\'\)\)\;|siU"// eval(base64_decode('aWYoJGF...'));

    $x=1;

    while(
    preg_match($desen,$ac,$cik) OR (preg_match($desen2,$ac,$cik)) OR (preg_match($desen3,$ac,$cik))){
    eval(
    str_replace('eval','$ac=',$ac));
    $x++;
    }
    echo 
    "<font color='red'>$x Desencryptografado(s)</font><br>";
    $sonuc=('<?php

    '
    .
    $ac
    .'');
    }
    echo 
    "<h1>Resultado</h1>";
    echo 
    "<textarea cols=100 rows=20>$sonuc</textarea><br>";
    echo 
    "<h1>C&oacute;digo</h1>";
    highlight_string($sonuc);

    it does not decode using METHOD POSTas above.

    more if I do it yes, it works
    PHP Code:
    $ac=@file_get_contents("script/coded.txt"
    can anyone help me?

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    First and foremost, you'll need to use htmlspecialchars if you want to be able to see the results within a text area. Having the <?php tags instantly turns this into an HTML tag where depending on what's in the body string wise determines if you'll ever see anything in the text area or not.
    This also has nothing to do with objects. At all.
    On a side note, something sure feels unsavoury about this as well.

  • #3
    HG3
    HG3 is offline
    New Coder
    Join Date
    Sep 2011
    Location
    BRAZIL
    Posts
    23
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    First and foremost, you'll need to use htmlspecialchars if you want to be able to see the results within a text area. Having the <?php tags instantly turns this into an HTML tag where depending on what's in the body string wise determines if you'll ever see anything in the text area or not.
    This also has nothing to do with objects. At all.
    On a side note, something sure feels unsavoury about this as well.
    infelismento not know how to make do you said, if have someone who can help me I am very grateful


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •