Skip to content

Instantly share code, notes, and snippets.

@EgeBalci
Last active May 28, 2021 13:33
Show Gist options
  • Save EgeBalci/d59133aac8a6783bfe0f31f44ab1b8f7 to your computer and use it in GitHub Desktop.
Save EgeBalci/d59133aac8a6783bfe0f31f44ab1b8f7 to your computer and use it in GitHub Desktop.
Create CSV formatted IOC
#!/bin/bash
if [ $# -eq 0 ]
then
echo "[*] Usage: $0 [FILE]"
exit
fi
echo "SHA256,SHA1,MD5,FILENAME"
for file in "$@"
do
if [ ! -f $file ]; then
continue
fi
sha256="`sha256sum $file|cut -d " " -f 1`"
sha1="`sha1sum $file|cut -d " " -f 1`"
md5="`md5sum $file|cut -d " " -f 1`"
echo "$sha256,$sha1,$md5,$1"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment