This makes the code much simpler. Assumes that the cache file is in
~/.msf4/store/modules_metadata.json or
/opt/metasploit/db/modules_metadata_base/json
If neither of these exist, it will fail
The cache is now populated by the script on the first run. This means
that the user doesn't have to manually create the cache.
Additionally, the cache is also updated if the file was modified more
than a week ago
Lastly, it will now store the cache file in XDG_CACHE_HOME if set,
falling back to ~/.cache which is the default.
Payload completion.
On first run it will ask the user to create and populate a cache file
that will be used in the future for completions
Format completion
There was a mis-type of the name of one of the functions
More predictable than /dev/stdin, which is usually a symlink to
/proc/self/fd/0 or /dev/fd/0, but the feature is not guaranteed to be
present.
This isn't *terribly* useful, but it can be. -x is recommended, but it
doesn't allow for ERB directives. This is mostly for hax.