Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3501000

Browse files
committed
Some cosmetic changes
1 parent acfe788 commit 3501000

4 files changed

Lines changed: 12 additions & 10 deletions

File tree

extra/shutils/precommit-hook

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ PROJECT_FULLPATH=${SCRIPTPATH%/*}/$PROJECT
1010
SETTINGS_FULLPATH=${SCRIPTPATH%/*}/$SETTINGS
1111
CHECKSUM_FULLPATH=${SCRIPTPATH%/*}/$CHECKSUM
1212

13-
truncate -s 0 "$CHECKSUM_FULLPATH"
14-
cd $PROJECT_FULLPATH && for i in $(find . -name "*.py" -o -name "*.xml" -o -iname "*_" | sort); do git ls-files $i --error-unmatch &>/dev/null && md5sum $i | sed 's/\.\///' >> "$CHECKSUM_FULLPATH"; git add "$CHECKSUM_FULLPATH"; done
15-
1613
if [ -f $SETTINGS_FULLPATH ]
1714
then
1815
LINE=$(grep -o ${SETTINGS_FULLPATH} -e 'VERSION = "[0-9.]*"');
@@ -26,4 +23,8 @@ then
2623
echo "Something went wrong in VERSION increment"
2724
exit 1
2825
fi
26+
git add "$SETTINGS_FULLPATH"
2927
fi;
28+
29+
truncate -s 0 "$CHECKSUM_FULLPATH"
30+
cd $PROJECT_FULLPATH && for i in $(find . -name "*.py" -o -name "*.xml" -o -iname "*_" | sort); do git ls-files $i --error-unmatch &>/dev/null && md5sum $i | sed 's/\.\///' >> "$CHECKSUM_FULLPATH"; git add "$CHECKSUM_FULLPATH"; done

lib/core/settings.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
from lib.core.revision import getRevisionNumber
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.8.1"
22+
VERSION = "1.0.8.8"
2323
REVISION = getRevisionNumber()
24-
STABLE = VERSION.count('.') <= 2
25-
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")
24+
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
25+
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
26+
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[::-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
2627
DESCRIPTION = "automatic SQL injection and database takeover tool"
2728
SITE = "http://sqlmap.org"
2829
ISSUES_PAGE = "https://github.com/sqlmapproject/sqlmap/issues/new"
@@ -35,7 +36,7 @@
3536
|_ -| . | | | .'| . |
3637
|___|_ |_|_|_|_|__,| _|
3738
|_| |_| \033[0m\033[4;37m%s\033[0m\n
38-
""" % ((31 + hash(VERSION) % 6) if not STABLE else 30, VERSION_STRING.split('/')[-1], SITE)
39+
""" % (TYPE_COLORS.get(TYPE, 31), VERSION_STRING.split('/')[-1], SITE)
3940

4041
# Minimum distance of ratio from kb.matchRatio to result in True
4142
DIFF_TOLERANCE = 0.05

lib/parse/cmdline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ def _(self, *args):
938938
args.requestFile, args.updateAll, args.smokeTest, args.liveTest, args.wizard, args.dependencies, \
939939
args.purgeOutput, args.pickledOptions, args.sitemapUrl)):
940940
errMsg = "missing a mandatory option (-d, -u, -l, -m, -r, -g, -c, -x, --wizard, --update, --purge-output or --dependencies), "
941-
errMsg += "use -h for basic or -hh for advanced help"
941+
errMsg += "use -h for basic or -hh for advanced help\n"
942942
parser.error(errMsg)
943943

944944
return args

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ e60456db5380840a586654344003d4e6 lib/core/readlineng.py
4545
5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
4646
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
4747
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
48-
7818f4d503649d92e5239be5f6790501 lib/core/settings.py
48+
e9ab1f38b3653ca51519b62929b52492 lib/core/settings.py
4949
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
5050
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
5151
0bc2fae1dec18cdd11954b22358293f2 lib/core/target.py
@@ -57,7 +57,7 @@ e60456db5380840a586654344003d4e6 lib/core/readlineng.py
5757
354ecc0c6d3e0ac9c06ed897c4d52edf lib/core/xmldump.py
5858
cc9c82cfffd8ee9b25ba3af6284f057e lib/__init__.py
5959
c1288bc4ce5651dbdd82d4a9435fdc03 lib/parse/banner.py
60-
bf7fbfb04d6150d19ecfd9b25ee5618a lib/parse/cmdline.py
60+
daea32290b63c43f7d1c0e14c66d4826 lib/parse/cmdline.py
6161
8ec4d4f02634834701f8258726f2e511 lib/parse/configfile.py
6262
fe4e2152292587928edb94c9a4d311ff lib/parse/handler.py
6363
8e6bfb13e5a34b2610f3ff23467a34cf lib/parse/headers.py

0 commit comments

Comments
 (0)