Skip to content

Commit 10152db

Browse files
committed
Minor patch for PIP --smoke
1 parent 3d15023 commit 10152db

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

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

sqlmapapi.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,30 @@
1313

1414
import logging
1515
import optparse
16+
import os
1617
import warnings
1718

1819
warnings.filterwarnings(action="ignore", message=".*was already imported", category=UserWarning)
1920
warnings.filterwarnings(action="ignore", category=DeprecationWarning)
2021

21-
from sqlmap import modulePath
22+
from lib.core.common import getUnicode
2223
from lib.core.common import setPaths
2324
from lib.core.data import logger
2425
from lib.core.patch import dirtyPatches
2526
from lib.core.patch import resolveCrossReferences
2627
from lib.core.settings import RESTAPI_DEFAULT_ADAPTER
2728
from lib.core.settings import RESTAPI_DEFAULT_ADDRESS
2829
from lib.core.settings import RESTAPI_DEFAULT_PORT
30+
from lib.core.settings import UNICODE_ENCODING
2931
from lib.utils.api import client
3032
from lib.utils.api import server
3133

34+
try:
35+
from sqlmap import modulePath
36+
except ImportError:
37+
def modulePath():
38+
return getUnicode(os.path.dirname(os.path.realpath(__file__)), encoding=sys.getfilesystemencoding() or UNICODE_ENCODING)
39+
3240
def main():
3341
"""
3442
REST-JSON API main function

0 commit comments

Comments
 (0)