From 626b310e7e11519cceb1596293aa350512ae96ee Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 1 Mar 2024 11:22:19 +0100 Subject: [PATCH] Adding support for sha256sum of source files --- extra/shutils/precommit-hook.sh | 4 ++++ lib/core/settings.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/extra/shutils/precommit-hook.sh b/extra/shutils/precommit-hook.sh index 9a25d123b..d30d21e8f 100755 --- a/extra/shutils/precommit-hook.sh +++ b/extra/shutils/precommit-hook.sh @@ -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 @@ -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 diff --git a/lib/core/settings.py b/lib/core/settings.py index c9d2eac66..22e132b04 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from thirdparty import six from thirdparty.six import unichr as _unichr # sqlmap version (...) -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)