Add helpful errors/output to start.sh
This commit is contained in:
22
start.sh
22
start.sh
@@ -1,15 +1,29 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
#check if folder was mounted under /data
|
||||||
|
if [[ ! -d /data ]] ; then
|
||||||
|
echo "[!] No Folder was mounted to /data"
|
||||||
|
echo "[=] Make sure a folder containig the Windows Logs (evtx) is mounted. Example:"
|
||||||
|
echo "[=]"
|
||||||
|
echo "[>] # docker run -it --rm -v /path/to/logfiles:/data tabledevil/apthunter"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
#check which destination is writeable /data or /output
|
#check which destination is writeable /data or /output
|
||||||
if [[ ! -f /output/notmounted ]] && [[ -w /output ]] ; then
|
if [[ ! -f /output/notmounted ]] && [[ -w /output ]] ; then
|
||||||
echo "output folder was mounted"
|
echo "[!] Output folder was mounted and is writeable"
|
||||||
echo "output can be written"
|
echo "[>] Using /output as destination for report"
|
||||||
output="/output"
|
output="/output"
|
||||||
else
|
else
|
||||||
if [[ -w /data ]] ; then
|
if [[ -w /data ]] ; then
|
||||||
echo "data can be written"
|
echo "[!] Mounted folder /data can be written"
|
||||||
|
echo "[>] Using /data as destination for report"
|
||||||
output="/data"
|
output="/data"
|
||||||
else
|
else
|
||||||
echo "no output folder available"
|
echo "[!] No writeable output folder available"
|
||||||
|
echo "[=] Make sure either the folder mounted under /data is writable ..."
|
||||||
|
echo "[>] # docker run -it --rm -v /path/to/logfiles:/data tabledevil/apthunter"
|
||||||
|
echo "[=] ... or mount a writable folder to /output"
|
||||||
|
echo "[>] # docker run -it --rm -v /path/to/logfiles:/data:ro -v /path/for/report:/output tabledevil/apthunter"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user