Last active
May 28, 2021 13:33
-
-
Save EgeBalci/d59133aac8a6783bfe0f31f44ab1b8f7 to your computer and use it in GitHub Desktop.
Create CSV formatted IOC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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