index.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. <p>It does not depend on a browser, so you can even run it on Node.js.</p>
  36. <input id="input" type="text" value="alert(1)"/>
  37. <button id="encode" type="text">Encode</button>
  38. <div class="checkbox">
  39. <input id="eval" type="checkbox" checked />
  40. <label for="eval">Eval Source</label>
  41. </div>
  42. <textarea id="output"></textarea>
  43. <div id="stats"></div>
  44. <h3>Links</h3>
  45. <p>
  46. * View source on <a href="http://github.com/aemkei/jsfuck">GitHub</a> <br>
  47. * Follow <a href="http://twitter.com/aemkei">@aemkei</a> (Martin Kleppe) <br>
  48. * Original discussion at <a href="http://sla.ckers.org/forum/read.php?24,32930">Sla.ckers.org</a>
  49. </p>
  50. <script src="jsfuck.js"></script>
  51. <script>
  52. function $(id){
  53. return document.getElementById(id);
  54. }
  55. $("encode").onclick = function(){
  56. var output = JSFuck.encode($("input").value, $("eval").checked);
  57. $("output").value = output;
  58. $("stats").innerHTML = output.length + " chars";
  59. }
  60. $("encode").onclick();
  61. </script>
  62. <script type="text/javascript">
  63. var _gaq = _gaq || [];
  64. _gaq.push(['_setAccount', 'UA-57649-11']);
  65. _gaq.push(['_trackPageview']);
  66. (function() {
  67. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  68. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  69. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  70. })();
  71. </script>
  72. </body>
  73. </html>