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

Skip to content

Commit 921a53e

Browse files
committed
Patch for counter in --smoke-test
1 parent 32dd4a9 commit 921a53e

3 files changed

Lines changed: 13 additions & 12 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.revision import getRevisionNumber
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.9.12"
22+
VERSION = "1.0.9.13"
2323
REVISION = getRevisionNumber()
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}

lib/core/testing.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,17 @@ def smokeTest():
5353
if any(_ in root for _ in ("thirdparty", "extra")):
5454
continue
5555

56-
for ifile in files:
57-
length += 1
56+
for filename in files:
57+
if os.path.splitext(filename)[1].lower() == ".py" and filename != "__init__.py":
58+
length += 1
5859

5960
for root, _, files in os.walk(paths.SQLMAP_ROOT_PATH):
6061
if any(_ in root for _ in ("thirdparty", "extra")):
6162
continue
6263

63-
for ifile in files:
64-
if os.path.splitext(ifile)[1].lower() == ".py" and ifile != "__init__.py":
65-
path = os.path.join(root, os.path.splitext(ifile)[0])
64+
for filename in files:
65+
if os.path.splitext(filename)[1].lower() == ".py" and filename != "__init__.py":
66+
path = os.path.join(root, os.path.splitext(filename)[0])
6667
path = path.replace(paths.SQLMAP_ROOT_PATH, '.')
6768
path = path.replace(os.sep, '.').lstrip('.')
6869
try:
@@ -71,7 +72,7 @@ def smokeTest():
7172
except Exception, msg:
7273
retVal = False
7374
dataToStdout("\r")
74-
errMsg = "smoke test failed at importing module '%s' (%s):\n%s" % (path, os.path.join(root, ifile), msg)
75+
errMsg = "smoke test failed at importing module '%s' (%s):\n%s" % (path, os.path.join(root, filename), msg)
7576
logger.error(errMsg)
7677
else:
7778
# Run doc tests
@@ -80,9 +81,9 @@ def smokeTest():
8081
if failure_count > 0:
8182
retVal = False
8283

83-
count += 1
84-
status = '%d/%d (%d%%) ' % (count, length, round(100.0 * count / length))
85-
dataToStdout("\r[%s] [INFO] complete: %s" % (time.strftime("%X"), status))
84+
count += 1
85+
status = '%d/%d (%d%%) ' % (count, length, round(100.0 * count / length))
86+
dataToStdout("\r[%s] [INFO] complete: %s" % (time.strftime("%X"), status))
8687

8788
clearConsoleLine()
8889
if retVal:

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ e60456db5380840a586654344003d4e6 lib/core/readlineng.py
4545
5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
4646
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
4747
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
48-
9121fd574f559b5401d5529f0b602b04 lib/core/settings.py
48+
7bf39beeda908ad06081385433db8567 lib/core/settings.py
4949
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
5050
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
5151
0bc2fae1dec18cdd11954b22358293f2 lib/core/target.py
52-
21b9aa385c851a4e8faaff9b985e29b8 lib/core/testing.py
52+
3c7478f279ed1b5645b4a75b29d4ac5d lib/core/testing.py
5353
424a6cf9bdfaf7182657ed7929d7df5a lib/core/threads.py
5454
53c15b78e0288274f52410db25406432 lib/core/unescaper.py
5555
6bdc53e2ca152ff8cd35ad671e48a96b lib/core/update.py

0 commit comments

Comments
 (0)