CFF Explorer update: scripting arguments

Arguments can now be passed through command line just by making them follow the name of the script. E.g.:

“CFF Explorer.exe” “C:\mydir\script.cff” arg1 arg2 “arg 3”

To access the arguments from the scripting part you can use the global variables argv and argc, which are the same thing as in C. Actually, argv would’ve been sufficient as it is a table and its size can be retrieved with “#”, argc is only present for coherence with the C-style.

Example:

[cc lang=”lua”]x = 0
while x < argc do MsgBox(argv[x]) x = x + 1 end[/cc] I also fixed a bug in the add section code and improved the PE rebuilding.

This entry was posted in Update and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*