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

Skip to content

Commit 28ee12c

Browse files
committed
Adding delayed imports
1 parent bc61a68 commit 28ee12c

3 files changed

Lines changed: 9 additions & 7 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.1.11.14"
22+
VERSION = "1.1.11.15"
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)

sqlmap.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
from lib.core.data import logger
3737

3838
try:
39-
from lib.controller.controller import start
4039
from lib.core.common import banner
4140
from lib.core.common import checkIntegrity
4241
from lib.core.common import createGithubIssue
@@ -58,15 +57,12 @@
5857
from lib.core.exception import SqlmapUserQuitException
5958
from lib.core.option import initOptions
6059
from lib.core.option import init
61-
from lib.core.profiling import profile
6260
from lib.core.settings import GIT_PAGE
6361
from lib.core.settings import IS_WIN
6462
from lib.core.settings import LEGAL_DISCLAIMER
6563
from lib.core.settings import THREAD_FINALIZATION_TIMEOUT
6664
from lib.core.settings import UNICODE_ENCODING
6765
from lib.core.settings import VERSION
68-
from lib.core.testing import smokeTest
69-
from lib.core.testing import liveTest
7066
from lib.parse.cmdline import cmdLineParser
7167
except KeyboardInterrupt:
7268
errMsg = "user aborted"
@@ -142,6 +138,12 @@ def main():
142138
dataToStdout("[!] legal disclaimer: %s\n\n" % LEGAL_DISCLAIMER, forceOutput=True)
143139
dataToStdout("[*] starting at %s\n\n" % time.strftime("%X"), forceOutput=True)
144140

141+
# Delayed imports (33% of all imports)
142+
from lib.controller.controller import start
143+
from lib.core.profiling import profile
144+
from lib.core.testing import smokeTest
145+
from lib.core.testing import liveTest
146+
145147
init()
146148

147149
if conf.profile:

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ec6a778b0e74749b916caead78ba88b7 lib/core/option.py
4646
760d9df2a27ded29109b390ab202e72d lib/core/replication.py
4747
a2466b62e67f8b31736bac4dac590e51 lib/core/revision.py
4848
02d4762140a72fd44668d3dab5eabda9 lib/core/session.py
49-
0c0ffa8d967370235b263b9eca013516 lib/core/settings.py
49+
012bad7ef5ad747bea3edaaee08f5a68 lib/core/settings.py
5050
35bffbad762eb9e03db9e93b1c991103 lib/core/shell.py
5151
a59ec28371ae067a6fdd8f810edbee3d lib/core/subprocessng.py
5252
7c9f2af3c0a8dd89223cfe07b0a0b826 lib/core/target.py
@@ -224,7 +224,7 @@ c3cc8b7727161e64ab59f312c33b541a shell/stager.aspx_
224224
1f7f125f30e0e800beb21e2ebbab18e1 shell/stager.jsp_
225225
01e3505e796edf19aad6a996101c81c9 shell/stager.php_
226226
c737efc0afe782c5dcfec9d27e827515 sqlmapapi.py
227-
9103dbcc93b9d5854e2fd896e720e7b6 sqlmap.py
227+
8f34280b975a35f68d5fba0123786871 sqlmap.py
228228
ba9bb7b0fbfbd408c24bc99b3c8f0fd9 tamper/apostrophemask.py
229229
aa046ea026a3c72b714e726a2e775cd4 tamper/apostrophenullencode.py
230230
0418d808878bf7cac4a28350116e64d0 tamper/appendnullbyte.py

0 commit comments

Comments
 (0)