Skip to content

Alexander-0x80/Smuggler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smuggler

Python module for converting javascript files to glyph like sequences that run in the browser .

Example :

input file:

(function(n){
    console.log(n*n);
})(5);

output file:

eval('('+((!!+[]+"")[+[]])+((!+[]+"")[(+!![])+(+!![])])+((+!![]/+[]+"")[+!![]])+((({})+"")[(+!![])+(+!![])+(+!![])+(+!![])+(+!![])])+((!+[]+"")[+[]])+((+!![]/+[]+"")[(+!![])+(+!![])+(+!![])])+((({})+"")[+!![]])+((+!![]/+[]+"")[+!![]])+'('+((+!![]/+[]+"")[+!![]])+')'+'{'+((({})+"")[(+!![])+(+!![])+(+!![])+(+!![])+(+!![])])+((({})+"")[+!![]])+((+!![]/+[]+"")[+!![]])+((!!+[]+"")[(+!![])+(+!![])+(+!![])])+((({})+"")[+!![]])+((!!+[]+"")[(+!![])+(+!![])])+((!!+[]+"")[(+!![])+(+!![])+(+!![])+(+!![])])+'.'+((!!+[]+"")[(+!![])+(+!![])])+((({})+"")[+!![]])+"\x67"+'('+((+!![]/+[]+"")[+!![]])+'*'+((+!![]/+[]+"")[+!![]])+')'+';'+'}'+')'+'('+((+!![])+(+!![])+(+!![])+(+!![])+(+!![]))+')'+';');

Use :

Requirements:

I am using slimit module to parse javascript input , make sure it is installed pip install slimit

Standalone:

Script expects only 1 argument, File or Directory , in the second case all .js files inside Directory and it's parents will be converted .

As Module:

From python repl:

>>> import smuggler
>>> print smuggler.convert_str('console.log("hi");',True)
eval(((({})+"")[(+!![])+(+!![])+(+!![])+(+!![])+(+!![])])+((({})+"")[+!![]])+((+!![]/+[]+"")[+!![]])+((!!+[]+"")[(+!!
[])+(+!![])+(+!![])])+((({})+"")[+!![]])+((!!+[]+"")[(+!![])+(+!![])])+((!!+[]+"")[(+!![])+(+!![])+(+!![])+(+!![])])+
'.'+((!!+[]+"")[(+!![])+(+!![])])+((({})+"")[+!![]])+"\x67"+'('+'"'+"\x68"+((+!![]/+[]+"")[(+!![])+(+!![])+(+!![])])+
'"'+')'+';');
>>> 

Now paste the following inside your browser console session .

About

Python module for converting javascript files to glyph like sequences that run in the browser .

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages