how to decode and encode like this
Collapse
X
-
Sometime it can't be encode-decode. They may use a databse to get url from hash.
Leave a comment:
-
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:
-
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 onlyOriginally posted by Ghost View Posti 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
then you would to the same for a decoding function.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;
}
//
//
//
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:
to gather the data you can do justPHP Code:echo Encode('ABC');
//
//
//
orPHP Code:Encode('ABC');
//
//
etc etc.PHP Code:$Gather_to_var = Encode('ABC');
//
//
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.
Leave a comment:
-
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
then you would to the same for a decoding function.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;
}
//
//
//
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:
to gather the data you can do justPHP Code:echo Encode('ABC');
//
//
//
orPHP Code:Encode('ABC');
//
//
etc etc.PHP Code:$Gather_to_var = Encode('ABC');
//
//
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:
-
encoding is possible...Originally posted by mansi View Posthmmm,, 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
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:
-
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:
-
This 956ed3152e12e9354a061646ab0c5ff4 looks more like some sort of md5 hash which can't be decoded.
Leave a comment:
-
output will show likePHP Code:$str = 'This is an encoded string';
echo base64_encode($str);
VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw
Leave a comment:
-
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 ...Tags: None
Leave a comment: