Skip to content

Instantly share code, notes, and snippets.

@ioseb
Created February 21, 2009 23:07
Show Gist options
  • Save ioseb/68221 to your computer and use it in GitHub Desktop.
Save ioseb/68221 to your computer and use it in GitHub Desktop.
JavaScript code to execute Dean Edwards packer script with Rhyno from ANT
/**
* code by Ioseb Dzmanashvili http://www.code.ge
* MIT License
*/
output = java.io.FileWriter(arguments[1]); //obtain FileWriter object
output.write(
pack( //invoke Dean Edward's packer function
readFile( //read input file: http://www.mozilla.org/rhino/shell.html
arguments[0] //input file path
),
62, //base62 encode
0 //shrink variable names?
)
);
output.close();
print('completed...');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment