how to decode and encode like this

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

    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 ...

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

    VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw
    They Make Rules & I Break Them

    Comment


      #3
      This 956ed3152e12e9354a061646ab0c5ff4 looks more like some sort of md5 hash which can't be decoded.
      <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

      Comment


        #4
        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
        It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
        ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
        ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
        キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

        Comment


          #5
          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

          Comment


            #6
            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
            It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
            ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
            ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
            キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

            Comment


              #7
              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.
              <?php
              include ('Ghost');
              if ($Post == true) {
              echo '

              sigpic
              alt='coding-talk.com!!' />';
              echo 'Sharing Is Caring!';
              } else {
              echo '

              alt='the username GHOST has been comprimised!' />';
              echo 'OMG SOMEBODY HELP ME!!';
              }
              ?>

              Comment


                #8
                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

                Comment


                  #9
                  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
                  <?php
                  include ('Ghost');
                  if ($Post == true) {
                  echo '

                  sigpic
                  alt='coding-talk.com!!' />';
                  echo 'Sharing Is Caring!';
                  } else {
                  echo '

                  alt='the username GHOST has been comprimised!' />';
                  echo 'OMG SOMEBODY HELP ME!!';
                  }
                  ?>

                  Comment


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

                    Comment


                      #11
                      use mcrypt

                      Comment

                      Working...
                      X