Skip to content

Commit acfe788

Browse files
committed
Preparing for sqlmapproject#1250
1 parent 5ccb73a commit acfe788

6 files changed

Lines changed: 14 additions & 17 deletions

File tree

lib/core/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,11 +1180,13 @@ def cleanQuery(query):
11801180

11811181
return retVal
11821182

1183-
def setPaths():
1183+
def setPaths(rootPath):
11841184
"""
11851185
Sets absolute paths for project directories and files
11861186
"""
11871187

1188+
paths.SQLMAP_ROOT_PATH = rootPath
1189+
11881190
# sqlmap paths
11891191
paths.SQLMAP_EXTRAS_PATH = os.path.join(paths.SQLMAP_ROOT_PATH, "extra")
11901192
paths.SQLMAP_PROCS_PATH = os.path.join(paths.SQLMAP_ROOT_PATH, "procs")

lib/core/option.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1731,7 +1731,7 @@ def _cleanupOptions():
17311731

17321732
if conf.outputDir:
17331733
paths.SQLMAP_OUTPUT_PATH = os.path.realpath(os.path.expanduser(conf.outputDir))
1734-
setPaths()
1734+
setPaths(paths.SQLMAP_ROOT_PATH)
17351735

17361736
if conf.string:
17371737
try:

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.7.43"
22+
VERSION = "1.0.8.1"
2323
REVISION = getRevisionNumber()
2424
STABLE = VERSION.count('.') <= 2
2525
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

sqlmap.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
from lib.core.data import cmdLineOptions
4646
from lib.core.data import conf
4747
from lib.core.data import kb
48-
from lib.core.data import paths
4948
from lib.core.common import unhandledExceptionMessage
5049
from lib.core.common import MKSTEMP_PREFIX
5150
from lib.core.exception import SqlmapBaseException
@@ -86,10 +85,8 @@ def modulePath():
8685
return getUnicode(os.path.dirname(os.path.realpath(_)), encoding=sys.getfilesystemencoding() or UNICODE_ENCODING)
8786

8887
def checkEnvironment():
89-
paths.SQLMAP_ROOT_PATH = modulePath()
90-
9188
try:
92-
os.path.isdir(paths.SQLMAP_ROOT_PATH)
89+
os.path.isdir(modulePath())
9390
except UnicodeEncodeError:
9491
errMsg = "your system does not properly handle non-ASCII paths. "
9592
errMsg += "Please move the sqlmap's directory to the other location"
@@ -112,7 +109,7 @@ def main():
112109
try:
113110
checkEnvironment()
114111

115-
setPaths()
112+
setPaths(modulePath())
116113
banner()
117114

118115
# Store original command line options for possible later restoration

sqlmapapi.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
from sqlmap import modulePath
1717
from lib.core.common import setPaths
18-
from lib.core.data import paths
1918
from lib.core.data import logger
2019
from lib.core.settings import RESTAPI_DEFAULT_ADAPTER
2120
from lib.core.settings import RESTAPI_DEFAULT_ADDRESS
@@ -31,9 +30,8 @@ def main():
3130
# Set default logging level to debug
3231
logger.setLevel(logging.DEBUG)
3332

34-
# Initialize path variable
35-
paths.SQLMAP_ROOT_PATH = modulePath()
36-
setPaths()
33+
# Initialize paths
34+
setPaths(modulePath())
3735

3836
# Parse command line options
3937
apiparser = optparse.OptionParser()

txt/checksum.md5

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ d1451b43f3ac80bfbea8657e288865f8 lib/controller/checks.py
2626
cc9c82cfffd8ee9b25ba3af6284f057e lib/controller/__init__.py
2727
2689f320908964b2c88a3eb8265fd2dd lib/core/agent.py
2828
eb0bd28b0bd9fbf67dcc3119116df377 lib/core/bigarray.py
29-
0b4ddb7846b9b5469eaa4a51755d1ae0 lib/core/common.py
29+
1dd298ac06c961037bb76a675bb4b322 lib/core/common.py
3030
5680d0c446a3bed5c0f2a0402d031557 lib/core/convert.py
3131
e77cca1cb063016f71f6e6bdebf4ec73 lib/core/data.py
3232
1d042f0bc0557d3fd564ea5a46deb77e lib/core/datatype.py
@@ -39,13 +39,13 @@ e4aec2b11c1ad6039d0c3dbbfbc5eb1a lib/core/exception.py
3939
cc9c82cfffd8ee9b25ba3af6284f057e lib/core/__init__.py
4040
91c514013daa796e2cdd940389354eac lib/core/log.py
4141
b9779615206791e6ebbaa84947842b49 lib/core/optiondict.py
42-
987f82b5e004fb47a1ae76d763b3c57f lib/core/option.py
42+
85b144015724e1961e6c9ea1a42b329a lib/core/option.py
4343
1e8948dddbd12def5c2af52530738059 lib/core/profiling.py
4444
e60456db5380840a586654344003d4e6 lib/core/readlineng.py
4545
5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
4646
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
4747
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
48-
302ae9311a57db18ea8552c55eb339ba lib/core/settings.py
48+
7818f4d503649d92e5239be5f6790501 lib/core/settings.py
4949
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
5050
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
5151
0bc2fae1dec18cdd11954b22358293f2 lib/core/target.py
@@ -217,8 +217,8 @@ ff90cb0366f7cefbdd6e573e27e6238c shell/runcmd.exe_
217217
c3cc8b7727161e64ab59f312c33b541a shell/stager.aspx_
218218
1f7f125f30e0e800beb21e2ebbab18e1 shell/stager.jsp_
219219
01e3505e796edf19aad6a996101c81c9 shell/stager.php_
220-
99cb675e2c353f03a23e0f7a97f1a8ef sqlmapapi.py
221-
28ff1c7f8b7da2f3c236ac0f8a21d545 sqlmap.py
220+
56702e95555adee718b6a11ee7098fd4 sqlmapapi.py
221+
7e80fcefc56426ed780c48556b70a1f0 sqlmap.py
222222
1316deb997418507e76221c84ec99946 tamper/apostrophemask.py
223223
a6efe8f914c769c52afec703bd73609f tamper/apostrophenullencode.py
224224
b1c56983919b69f4f6f0e7929c881e7a tamper/appendnullbyte.py

0 commit comments

Comments
 (0)