Skip to content

Commit

Permalink
Adding support for sha256sum of source files
Browse files Browse the repository at this point in the history
  • Loading branch information
stamparm committed Mar 1, 2024
1 parent 76a2e65 commit 626b310
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions extra/shutils/precommit-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ chmod +x .git/hooks/pre-commit

PROJECT="../../"
SETTINGS="../../lib/core/settings.py"
DIGEST="../../sha256sums.txt"

declare -x SCRIPTPATH="${0}"

PROJECT_FULLPATH=${SCRIPTPATH%/*}/$PROJECT
SETTINGS_FULLPATH=${SCRIPTPATH%/*}/$SETTINGS
DIGEST_FULLPATH=${SCRIPTPATH%/*}/$DIGEST

git diff $SETTINGS_FULLPATH | grep "VERSION =" > /dev/null && exit 0

Expand All @@ -35,3 +37,5 @@ then
fi
git add "$SETTINGS_FULLPATH"
fi

cd $PROJECT_FULLPATH && git ls-files | sort | uniq | grep -v sha256 | xargs sha256sum > $DIGEST_FULLPATH
2 changes: 1 addition & 1 deletion lib/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from thirdparty.six import unichr as _unichr

# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.8.2.1"
VERSION = "1.8.3.0"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
Expand Down

0 comments on commit 626b310

Please sign in to comment.