I'm finishing an Nmap script that needs to create a file as part of the output (an image) which doesn't make sense to print or embed in the standard Nmap output. Currently I'm naming the output
image.jpg, but I'd like use the input of the
-oA/-oN/-oX/-oS/-oG flag to make the name of the output file less likely to conflict with anything in the current directory.
I've done some digging but I haven't found any way to access the flags passed to Nmap.
Is it possible to access these flags from inside an NSE, and if so, how?