how to decode and encode like this

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • shushant
    replied
    use mcrypt

    Leave a comment:


  • Rksk
    replied
    Sometime it can't be encode-decode. They may use a databse to get url from hash.

    Leave a comment:


  • Ghost
    replied
    there is the byterun decoder but i dont know too much about it.
    php $_F=__FILE__;$_X= Byterun Decoder

    and of course base64.
    Base64 Decode and Encode - Online

    but i dont know of too many others. i would prefere to create my own from scratch
    as there is less chance of you being hacked/ripped for awhile at least. as everyone knows
    of these other decode/encoders but your own special one would be new to them.
    not saying it would never be cracked. but im guessing you have better odds than the others using base64
    etc.

    i creared an example decode / encoder here not long ago

    Leave a comment:


  • mansi
    replied
    Originally posted by Ghost View Post
    i suppose if you really wanted to have something simular to md5 you would have to create your own
    encoding/decoding function.

    example would be:
    Encode

    PHP Code:
    function Encode($Data)
    {
    $Encode_From = array('A''B''C');
    $Encode_To = array('9E''R4''D1');
    for(
    $m 0$m<count($Encode_From); $m++) 
    {
    $Data str_replace($Encode_From[$m], rtrim($Encode_To[$m]), $Data);

    Return 
    $Data;
    }
    //
    //
    // 
    then you would to the same for a decoding function.
    but just putting the array from and array to into reverse.

    ie: array from would become array to.
    and array to becomes array from.

    this isnt tested, i just put it together as an example.

    updated

    i should of also mentioned to use it you could do it a number of ways.

    to display result directly you can do:
    PHP Code:
    echo Encode('ABC');
    //
    //
    // 
    to gather the data you can do just
    PHP Code:
    Encode('ABC');
    //
    // 
    or
    PHP Code:
    $Gather_to_var Encode('ABC');
    //
    // 
    etc etc.

    this has now been tested and works for me.
    result for ABC = 9ER4D1

    you would also want to prob put your own upper/lowercase checking in also.
    as right now this only looks for uppercase chars, as i put them all in as uppercase in the array.

    anyway this should help you make your own version anyhow.
    Really very good and detail reply,, and thanku for your help but i mainly want to know which encoding is used in this example as i tried md5() also but it is not md5,, may there are any good decoding technique other than base64... as i saw the same encoding pattern in many sites,,,it compress the size of url too ,, in 29-32 length string only

    Leave a comment:


  • Ghost
    replied
    i suppose if you really wanted to have something simular to md5 you would have to create your own
    encoding/decoding function.

    example would be:
    Encode

    PHP Code:
    function Encode($Data)
    {
    $Encode_From = array('A''B''C');
    $Encode_To = array('9E''R4''D1');
    for(
    $m 0$m<count($Encode_From); $m++) 
    {
    $Data str_replace($Encode_From[$m], rtrim($Encode_To[$m]), $Data);

    Return 
    $Data;
    }
    //
    //
    // 
    then you would to the same for a decoding function.
    but just putting the array from and array to into reverse.

    ie: array from would become array to.
    and array to becomes array from.

    this isnt tested, i just put it together as an example.

    updated

    i should of also mentioned to use it you could do it a number of ways.

    to display result directly you can do:
    PHP Code:
    echo Encode('ABC');
    //
    //
    // 
    to gather the data you can do just
    PHP Code:
    Encode('ABC');
    //
    // 
    or
    PHP Code:
    $Gather_to_var Encode('ABC');
    //
    // 
    etc etc.

    this has now been tested and works for me.
    result for ABC = 9ER4D1

    you would also want to prob put your own upper/lowercase checking in also.
    as right now this only looks for uppercase chars, as i put them all in as uppercase in the array.

    anyway this should help you make your own version anyhow.
    Last edited by Ghost; 19.09.12, 14:08.

    Leave a comment:


  • metulj
    replied
    Originally posted by mansi View Post
    hmmm,, no it is possible ,,,
    i show you an example



    this url encoded in => 956ed3152e12e9354a061646ab0c5ff4

    but i dont find which encoding/decoding is used in this
    encoding is possible...
    decoding isn't...
    this has been said about 10 million times before...
    md5 hash is one way street...
    not reversable...
    yet it can be cracked... but thats not the same

    Leave a comment:


  • mansi
    replied
    hmmm,, no it is possible ,,,
    i show you an example



    this url encoded in => 956ed3152e12e9354a061646ab0c5ff4

    but i dont find which encoding/decoding is used in this

    Leave a comment:


  • metulj
    replied
    Originally posted by mansi View Post
    i want to decode urls in this format => 956ed3152e12e9354a061646ab0c5ff4
    and encode urls too like this,,
    i saw many websites using this format ...
    how to ?
    you cant...
    as arnage said... md5 hash

    Leave a comment:


  • arnage
    replied
    This 956ed3152e12e9354a061646ab0c5ff4 looks more like some sort of md5 hash which can't be decoded.

    Leave a comment:


  • ajit55u
    replied
    PHP Code:
    $str 'This is an encoded string';
    echo 
    base64_encode($str); 
    output will show like

    VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw

    Leave a comment:


  • mansi
    started a topic how to decode and encode like this

    how to decode and encode like this

    i want to decode urls in this format => 956ed3152e12e9354a061646ab0c5ff4
    and encode urls too like this,,
    i saw many websites using this format ...
Working...
X