SECFORCE / sparta

Network Infrastructure Penetration Testing Tool
GNU General Public License v3.0
1.62k stars 445 forks source link

Output from tool runs with no [OUTPUT] variable specified #66

Open mcjon3z opened 7 years ago

mcjon3z commented 7 years ago

I've noticed that tools in the config file that output only to screen and have no [OUTPUT] file parameter have their output stored in the database however do not have their output saved as .txt files in the tool output directories. The directories get created but remain empty.

Is this behavior by design? It would be helpful to have output for these tools as well available as standalone files for inclusion in workpapers or supporting documentation, either by export or by creating the files directly.

As a workaround, I've been able to get the output to file by appending a piped tee command and specifying an output file in that manner...

st3r30byt3 commented 7 years ago

Hi! It was by design but we are definitely considering the export option. In fact, we are planning to work on a reporting module in the future. It's all about finding the time :)

mcjon3z commented 7 years ago

If there is anybody else out there that wants a workaround in the meantime, simply modify config file entries to pipe through the tee command. You have to call them through a bash command with the appropriate escape characters:

enum4linux=Run enum4linux, enum4linux [IP], "netbios-ssn,microsoft-ds"

becomes

enum4linux=Run enum4linux, bash -c \"enum4linux [IP] | tee [OUTPUT].txt\", "netbios-ssn,microsoft-ds"

Easy enough to do, just be careful if you are using Kali as your config can get overwritten with repo updates. I keep my own config files in a separate directory and then replace the symlink in /usr/share/%appname%