$ python
>>> import urllib
>>> s = '%33%76%31%4C%20%6A%73%63%72%69%70%74%21'
>>> urllib.unquote(s)
'3v1L jscript!'
Sunday, January 23, 2011
Javascript decoding using Python Interpreter
I keep forgetting the module to decode % encoded javascript obfuscation using python, so here it is:
Remove html tags: two sed one liners
1. Quick and easy one liner to remove any html tags from file blah:
2. Remove html tags and format jscript just enough to read file blah:
note that these only work if the html tag is not broken onto two lines.
cat blah | sed 's/<[^>]*>//g'
2. Remove html tags and format jscript just enough to read file blah:
cat blah | sed 's/<[^>]*>//g' | sed 's/;[^\n]/;\n/g' | sed 's/{/{\n/g'| sed 's/{\s*[^\n]/\n{/g'
note that these only work if the html tag is not broken onto two lines.
Subscribe to:
Posts (Atom)