Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $code = '';
- if (isset($_POST['original']))
- {
- $code = $_POST['original'];
- while (strstr(substr($code,0,10), '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">
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment