SnaffledLogs is a simple python script which, using some magic, allows to parse output generated by Snaffler into a readable and business xslx file.
git clone https://github.com/marb08/SnaffledLogs.git
cd SnaffledLogs/
pip install -r requirements.txt
python3 SnaffledLogs.py
__ _ _
(_ ._ _. _|_ _|_ | _ _| | _ _ _
__) | | (_| | | | (/_ (_| |_ (_) (_| _>
_|
usage: SnaffledLogs_beta.py [-h] (-l LOG_FILE | -j JSON_FILE | -d DIRECTORY) [-x FILE_EXTENSION] [-o OUTPUT_FILE]
Parse Snaffler log file(s) and save data to CSV/XLSX.
optional arguments:
-h, --help show this help message and exit
-l LOG_FILE, --log_file LOG_FILE
Path to the log file containing the Snaffler logs
-j JSON_FILE, --json_file JSON_FILE
Process the json file containing the Snaffler logs
-d DIRECTORY, --directory DIRECTORY
Process all files containing the Snaffler logs with the specified extension in the current
directory
-x FILE_EXTENSION, --file_extension FILE_EXTENSION
File extension to filter files when using -d option
-o OUTPUT_FILE, --output_file OUTPUT_FILE
Output file name
# Process the logs contained in snaffle_logs.log file
python3 SnaffledLogs.py -l snaffler_logs.log -o output.xlsx
# Process the logs contained inside a json file
python3 SnaffledLogs.py -j snaffler_logs.json -o output.csv
# Process only the files with .log extension in the /home/user/snaffler/logs/ directory
python3 SnaffledLogs.py -d /home/user/snaffler/logs/ -x log -o output.xlsx
Pull requests are welcome.
This script is licensed under the GNU General Public License v3.0. For more information, please refer to the license text at: https://www.gnu.org/licenses/gpl-3.0.txt