Last active
February 2, 2020 04:50
-
-
Save RetiredQQ/46a7a126c9ef05b4f55edf364d1d8e50 to your computer and use it in GitHub Desktop.
phpencode.org Deobfuscator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.IO.Compression; | |
using System.Text; | |
namespace phpencodeorg_Decrypt | |
{ | |
class Program | |
{ | |
// https://dotnetfiddle.net/xo2fri | |
static void Main(string[] args) | |
{ | |
var code = "<?php /*** PHP Encode v1.0 by zeura.com ***/ $XnNhAWEnhoiqwciqpoHH=file(__FILE__);eval(base64_decode(\"aWYoIWZ1bmN0aW9uX2V4aXN0cygiWWl1bklVWTc2YkJodWhOWUlPOCIpKXtmdW5jdGlvbiBZaXVuSVVZNzZiQmh1aE5ZSU84KCRnLCRiPTApeyRhPWltcGxvZGUoIlxuIiwkZyk7JGQ9YXJyYXkoNjU1LDIzNiw0MCk7aWYoJGI9PTApICRmPXN1YnN0cigkYSwkZFswXSwkZFsxXSk7ZWxzZWlmKCRiPT0xKSAkZj1zdWJzdHIoJGEsJGRbMF0rJGRbMV0sJGRbMl0pO2Vsc2UgJGY9dHJpbShzdWJzdHIoJGEsJGRbMF0rJGRbMV0rJGRbMl0pKTtyZXR1cm4oJGYpO319\"));eval(base64_decode(YiunIUY76bBhuhNYIO8($XnNhAWEnhoiqwciqpoHH)));eval(ZsldkfhGYU87iyihdfsow(YiunIUY76bBhuhNYIO8($XnNhAWEnhoiqwciqpoHH,2),YiunIUY76bBhuhNYIO8($XnNhAWEnhoiqwciqpoHH,1)));__halt_compiler();aWYoIWZ1bmN0aW9uX2V4aXN0cygiWnNsZGtmaEdZVTg3aXlpaGRmc293Iikpe2Z1bmN0aW9uIFpzbGRrZmhHWVU4N2l5aWhkZnNvdygkYSwkaCl7aWYoJGg9PXNoYTEoJGEpKXtyZXR1cm4oZ3ppbmZsYXRlKGJhc2U2NF9kZWNvZGUoJGEpKSk7fWVsc2V7ZWNobygiRXJyb3I6IEZpbGUgTW9kaWZpZWQiKTt9fX0=3a532dad77028c70190e8ff3d0e1b939c9756c2cS03OyFdQ90jNyclXCM8vyklRtwYA"; | |
var decrypt = gzinflate_base64_decode(code.Substring(931)); | |
Console.WriteLine(decrypt); | |
Console.ReadKey(); | |
} | |
static string gzinflate_base64_decode(string input) | |
{ | |
using (var ms1 = new MemoryStream(Convert.FromBase64String(input))) | |
using (var ms2 = new MemoryStream()) | |
using (var stream = new DeflateStream(ms1, CompressionMode.Decompress)) | |
{ | |
byte[] buffer = new byte[1024]; | |
while (true) | |
{ | |
int read = stream.Read(buffer, 0, 1024); | |
if (read == 0) | |
break; | |
ms2.Write(buffer, 0, read); | |
} | |
return Encoding.UTF8.GetString(ms2.ToArray()); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment