mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-28 20:43:49 +03:00
Adding new shutils file
This commit is contained in:
parent
fcf9998010
commit
73f1155847
22
extra/shutils/precommit-hook
Normal file
22
extra/shutils/precommit-hook
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SETTINGS="../../lib/core/settings.py"
|
||||||
|
|
||||||
|
declare -x SCRIPTPATH="${0}"
|
||||||
|
|
||||||
|
FULLPATH=${SCRIPTPATH%/*}/$SETTINGS
|
||||||
|
|
||||||
|
if [ -f $FULLPATH ]
|
||||||
|
then
|
||||||
|
LINE=$(grep -o ${FULLPATH} -e 'VERSION = "[0-9.]*"');
|
||||||
|
declare -a LINE;
|
||||||
|
INCREMENTED=$(python -c "import re, sys; version = re.search('\"([0-9.]*)\"', sys.argv[1]).group(1); _ = version.split('.'); _.append(0) if len(_) < 3 else _; _[-1] = str(int(_[-1]) + 1); print sys.argv[1].replace(version, '.'.join(_))" "$LINE")
|
||||||
|
if [ -n "$INCREMENTED" ]
|
||||||
|
then
|
||||||
|
sed "s/${LINE}/${INCREMENTED}/" $FULLPATH > $FULLPATH.tmp && mv $FULLPATH.tmp $FULLPATH
|
||||||
|
echo "Updated ${INCREMENTED} in ${FULLPATH}";
|
||||||
|
else
|
||||||
|
echo "Something went wrong in VERSION increment"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi;
|
|
@ -20,9 +20,10 @@ from lib.core.enums import OS
|
||||||
from lib.core.revision import getRevisionNumber
|
from lib.core.revision import getRevisionNumber
|
||||||
|
|
||||||
# sqlmap version and site
|
# sqlmap version and site
|
||||||
VERSION = "1.0-stable"
|
VERSION = "1.0.0"
|
||||||
REVISION = getRevisionNumber()
|
REVISION = getRevisionNumber()
|
||||||
VERSION_STRING = "sqlmap/%s" % VERSION
|
COMMIT_AUTOINCREMENT = 2
|
||||||
|
VERSION_STRING = "sqlmap/%s.%d" % (VERSION, COMMIT_AUTOINCREMENT)
|
||||||
DESCRIPTION = "automatic SQL injection and database takeover tool"
|
DESCRIPTION = "automatic SQL injection and database takeover tool"
|
||||||
SITE = "http://sqlmap.org"
|
SITE = "http://sqlmap.org"
|
||||||
ISSUES_PAGE = "https://github.com/sqlmapproject/sqlmap/issues/new"
|
ISSUES_PAGE = "https://github.com/sqlmapproject/sqlmap/issues/new"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user