Last active
August 29, 2015 14:07
-
-
Save khamer/edc464384d60b95a6081 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <title>worst.PHP</title> | |
| <body> | |
| <script language="php"> | |
| isset($_REQUEST[user]) or $_POST[user] = null; | |
| extract($_REQUEST); | |
| if ($user): | |
| eval("goto greeting"); | |
| else: | |
| goto welcome_form; | |
| endif; | |
| greeting: | |
| </script> | |
| <h1>Hello, <%= $user %>!</h1> | |
| <script type="text/javascript"> | |
| alert("<script language="php">print $user;</script>!!") | |
| </script> | |
| <ul> | |
| <script language="php"> | |
| $variables = array_keys($_POST); | |
| while (count($variables)): | |
| $name = array_shift($variables); | |
| %><li><%= $name ?>: <?= $$name %></li><% | |
| endwhile; | |
| </script> | |
| </ul> | |
| <script language="php"> | |
| goto footer; | |
| welcome_form: | |
| </script> | |
| <form method="POST"> | |
| <script language="php"> | |
| foreach ($_POST as $variable_name => $value): | |
| printf('<div>Enter %s: <input type="text" name="%s" value="" /></div>', $variable_name, $variable_name); | |
| endforeach; | |
| </script> | |
| <script type="text/javascript"> | |
| document.write("<button>Save</button>"); | |
| </script> | |
| </form> | |
| <script language="php"> | |
| goto footer; | |
| footer: | |
| </script> | |
| <p class="copyright">Copyright <% print date(Y); %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment