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

Skip to content

Commit 71208e8

Browse files
committed
Update regarding #3258
1 parent 3b36992 commit 71208e8

4 files changed

Lines changed: 40 additions & 35 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.enums import OS
2020

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

lib/utils/versioncheck.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
"""
77

88
import sys
9+
import time
910

1011
PYVERSION = sys.version.split()[0]
1112

1213
if PYVERSION >= "3" or PYVERSION < "2.6":
13-
exit("[CRITICAL] incompatible Python version detected ('%s'). To successfully run sqlmap you'll have to use version 2.6.x or 2.7.x (visit 'https://www.python.org/downloads/')" % PYVERSION)
14+
exit("[%s] [CRITICAL] incompatible Python version detected ('%s'). To successfully run sqlmap you'll have to use version 2.6.x or 2.7.x (visit 'https://www.python.org/downloads/')" % (time.strftime("%X"), PYVERSION))
1415

1516
errors = []
1617
extensions = ("bz2", "gzip", "pyexpat", "ssl", "sqlite3", "zlib")

sqlmap.py

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,37 @@
55
See the file 'LICENSE' for copying permission
66
"""
77

8-
import sys
8+
try:
9+
import sys
910

10-
sys.dont_write_bytecode = True
11+
sys.dont_write_bytecode = True
1112

12-
try:
13-
__import__("lib.utils.versioncheck") # this has to be the first non-standard import
14-
except ImportError:
15-
exit("[!] wrong installation detected (missing modules). Visit 'https://github.com/sqlmapproject/sqlmap/#installation' for further details")
16-
17-
import bdb
18-
import distutils
19-
import glob
20-
import inspect
21-
import json
22-
import logging
23-
import os
24-
import re
25-
import shutil
26-
import sys
27-
import thread
28-
import threading
29-
import time
30-
import traceback
31-
import warnings
32-
33-
warnings.filterwarnings(action="ignore", message=".*was already imported", category=UserWarning)
34-
warnings.filterwarnings(action="ignore", category=DeprecationWarning)
35-
36-
from lib.core.data import logger
13+
try:
14+
__import__("lib.utils.versioncheck") # this has to be the first non-standard import
15+
except ImportError:
16+
exit("[!] wrong installation detected (missing modules). Visit 'https://github.com/sqlmapproject/sqlmap/#installation' for further details")
17+
18+
import bdb
19+
import distutils
20+
import glob
21+
import inspect
22+
import json
23+
import logging
24+
import os
25+
import re
26+
import shutil
27+
import sys
28+
import thread
29+
import threading
30+
import time
31+
import traceback
32+
import warnings
33+
34+
warnings.filterwarnings(action="ignore", message=".*was already imported", category=UserWarning)
35+
warnings.filterwarnings(action="ignore", category=DeprecationWarning)
36+
37+
from lib.core.data import logger
3738

38-
try:
3939
from lib.core.common import banner
4040
from lib.core.common import checkIntegrity
4141
from lib.core.common import createGithubIssue
@@ -67,9 +67,13 @@
6767
from lib.parse.cmdline import cmdLineParser
6868
except KeyboardInterrupt:
6969
errMsg = "user aborted"
70-
logger.error(errMsg)
7170

72-
raise SystemExit
71+
if "logger" in globals():
72+
logger.error(errMsg)
73+
raise SystemExit
74+
else:
75+
import time
76+
exit("\r[%s] [ERROR] %s" % (time.strftime("%X"), errMsg))
7377

7478
def modulePath():
7579
"""

txt/checksum.md5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
5050
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
5151
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
5252
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
53-
495854418b62c5ad47ae1eb0ac891976 lib/core/settings.py
53+
59274b9acea517616aed86e58808e02d lib/core/settings.py
5454
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
5555
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5656
62bc180e3e828949ffb342a8f756c183 lib/core/target.py
@@ -118,7 +118,7 @@ d0f4d56c5d6a09a4635035e233d4a782 lib/utils/hash.py
118118
2c5a655c8e94cbe2664ee497752ac1f2 lib/utils/search.py
119119
571884f530796534f03c49cf3f380a4c lib/utils/sqlalchemy.py
120120
dcc25183c6bd85b172c87cfcbc305ab6 lib/utils/timeout.py
121-
faa7536c4788ee118b19338f3e98e556 lib/utils/versioncheck.py
121+
4703ceeb32131a9a7a6561575644123b lib/utils/versioncheck.py
122122
e9e73cd6bd814dd7823a9da913cea61c lib/utils/xrange.py
123123
b9d2761f47fec3d98b88311a263fd5db plugins/dbms/access/connector.py
124124
3f1c50a1507d1c2f69c20c706230e2e2 plugins/dbms/access/enumeration.py
@@ -228,7 +228,7 @@ ec2ba8c757ac96425dcd2b97970edd3a shell/stagers/stager.asp_
228228
0c48ddb1feb7e38a951ef05a0d48e032 shell/stagers/stager.jsp_
229229
2f9e459a4cf6a58680978cdce5ff7971 shell/stagers/stager.php_
230230
cd90da0474d7b1a67d7b40d208493375 sqlmapapi.py
231-
a35b5b83c12841fdf3925190c9d24299 sqlmap.py
231+
5f30815ebe320e46e5898dc819e629a7 sqlmap.py
232232
523dab9e1093eb59264c6beb366b255a tamper/0x2char.py
233233
3a1697585ae4e7bf315e9dda97d6f321 tamper/apostrophemask.py
234234
d7a119a74be9b385ee3884fb5e6af041 tamper/apostrophenullencode.py

0 commit comments

Comments
 (0)