Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $orig = '';
- $unpack = '';
- $code = '';
- if (isset($_POST['original']))
- {
- $orig = $_POST['original'];
- $code = $orig;
- if (strpos($code, 'eval') !== false)
- {
- $code = trim(preg_replace(array('/<\?php/mi','/\?>/m','/^\s*#.*$/m','#^\s*//.*$#m','#/\*.*?\*/#ms' ),'', $code));
- $code = str_replace('eval', 'echo', $code);
- ob_start();
- eval($code);
- $code = ob_get_contents();
- ob_end_clean();
- }
- $code = str_replace(array(' ', "\n"), array(' ', '<br />'), htmlentities($code));
- }
- ?>
- <html>
- <body>
- <form method="post">
- Original:
- <textarea name="original" rows="10" cols="80"><?php echo $code; ?></textarea>
- <br /><br /><input type="submit" value="Unpack">
- <br /><br />Unpacked:
- <div style="width: 800px; height: 300px; overflow: auto; border: 1px solid black; font-family: monospace;"><?php echo $code;?></div>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement