Skip to content

Instantly share code, notes, and snippets.

@poizan42
Created July 29, 2012 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poizan42/3201591 to your computer and use it in GitHub Desktop.
Save poizan42/3201591 to your computer and use it in GitHub Desktop.
javascript quine-bomb
a1="function a() { p='a1=\"'+a1.replace(/\\\\/g,'\\\\\\\\').replace(/\"/g,'\\\\\"')+'\"; a2=\"'+a2+'\";'+a1+a2;";
a2="document.write('<script>' + p + '</'+'script>');document.write('<script>' + p + '</'+'script>')}a()";
function a() {
p='a1="'+a1.replace(/\\/g,'\\\\').replace(/"/g,'\\"')+'"; a2="'+a2+'";'+a1+a2;
document.write('<script>' + p + '</'+'script>');
document.write('<script>' + p + '</'+'script>')
}a()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment