-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathxss.cheat
More file actions
9 lines (6 loc) · 688 Bytes
/
Copy pathxss.cheat
File metadata and controls
9 lines (6 loc) · 688 Bytes
1
2
3
4
5
6
7
8
9
% XSS cheat sheets
$ js_file: find . -type f -name '*.js' 2>/dev/null | sort -u
# hack the box cheat: XSS javascript dangerous functions
(echo 'innerHTML and outerHTML must be DOM objects'; grep -E '\.innerHTML|\.outerHTML|document\.write\(\)|document\.writeln\(\)|document\.domain' <js_file>)
# hack the box cheat: XSS javascript dangerous jQuery functions
nix shell --impure -I nixpkgs=channel:nixos-unstable --expr 'with import (builtins.findFile builtins.nixPath "nixpkgs") { config.allowUnfree = true; }; [ gnugrep ]' -c grep -E 'html\(\)|parseHTML\(\)|add\(\)|append\(\)|prepend\(\)|after\(\)|insertAfter\(\)|before\(\)|insertBefore\(\)|replaceAll\(\)|replaceWith\(\)' <js_file>