index.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <html>
  2. <head>
  3. <title>JSFuck - Write any JavaScript with 6 Characters: []()!+</title>
  4. <style>
  5. body {
  6. padding: 20px;
  7. }
  8. body, * {
  9. font-family: monospace;
  10. font-size: 14px;
  11. }
  12. h1 {
  13. font-size: 2em;
  14. }
  15. h3 {
  16. font-weight: bold;
  17. }
  18. textarea {
  19. display: block;
  20. width: 100%;
  21. max-width: 800px;
  22. height: 200px;
  23. margin: 1em 0;
  24. }
  25. .checkbox {
  26. display: inline-block;
  27. }
  28. </style>
  29. </head>
  30. <body>
  31. <h1>JSFuck []()!+</h1>
  32. <p>JSFuck is an esoteric and educational programming style based on the
  33. atomic parts of JavaScript. It uses only six different characters to
  34. write and execute code.</p>
  35. <input id="input" type="text" value="alert(1)"/>
  36. <button id="encode" type="text">Encode</button>
  37. <div class="checkbox">
  38. <input id="eval" type="checkbox" checked />
  39. <label for="eval">Eval Source</label>
  40. </div>
  41. <textarea id="output"></textarea>
  42. <div id="stats"></div>
  43. <h3>Links</h3>
  44. <p>
  45. * View source on <a href="http://github.com/aemkei/jsfuck">GitHub</a> <br>
  46. * Follow <a href="http://twitter.com/aemkei">@aemkei</a> (Martin Kleppe) <br>
  47. * Original discussion at <a href="http://sla.ckers.org/forum/read.php?24,32930">Sla.ckers.org</a>
  48. </p>
  49. <script src="jsfuck.js"></script>
  50. <script>
  51. function $(id){
  52. return document.getElementById(id);
  53. }
  54. $("encode").onclick = function(){
  55. var output = JSFuck.encode($("input").value, $("eval").checked);
  56. $("output").value = output;
  57. $("stats").innerHTML = output.length + " chars";
  58. }
  59. $("encode").onclick();
  60. </script>
  61. <script type="text/javascript">
  62. var _gaq = _gaq || [];
  63. _gaq.push(['_setAccount', 'UA-57649-11']);
  64. _gaq.push(['_trackPageview']);
  65. (function() {
  66. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  67. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  68. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  69. })();
  70. </script>
  71. </body>
  72. </html>