Skip to content

Instantly share code, notes, and snippets.

@JavaScript-Packer
Created May 1, 2015 00:01
Show Gist options
  • Save JavaScript-Packer/665ae34bb67c069d8ba5 to your computer and use it in GitHub Desktop.
Save JavaScript-Packer/665ae34bb67c069d8ba5 to your computer and use it in GitHub Desktop.
Crazy ways to obfuscate JavaScript functions/commands
// I still can't get over how I can obfuscate alert(69) to
\u0061\u006c\u0065\u0072\u0074(69)
// and it will still work (in JavaScript)
@JavaScript-Packer
Copy link
Author

// I still can't get over how I can obfuscate eval('alert(69);') to
\u0065\u0076\u0061\u006c('alert(69);')
// and it will still work (in JavaScript)

@JavaScript-Packer
Copy link
Author

Oh yeah, you can encode between the brackets in more ways (hex,octal and unicode)

\u0065\u0076\u0061\u006c('\x61\x6c\x65\x72\x74\x28\x36\x39\x29\x3b')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment