Adding delayed imports

This commit is contained in:
Miroslav Stampar 2017-11-10 12:34:54 +01:00
parent bc61a6828c
commit 28ee12c4d2
3 changed files with 9 additions and 7 deletions

View File

@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.1.11.14" VERSION = "1.1.11.15"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -36,7 +36,6 @@ warnings.filterwarnings(action="ignore", category=DeprecationWarning)
from lib.core.data import logger from lib.core.data import logger
try: try:
from lib.controller.controller import start
from lib.core.common import banner from lib.core.common import banner
from lib.core.common import checkIntegrity from lib.core.common import checkIntegrity
from lib.core.common import createGithubIssue from lib.core.common import createGithubIssue
@ -58,15 +57,12 @@ try:
from lib.core.exception import SqlmapUserQuitException from lib.core.exception import SqlmapUserQuitException
from lib.core.option import initOptions from lib.core.option import initOptions
from lib.core.option import init from lib.core.option import init
from lib.core.profiling import profile
from lib.core.settings import GIT_PAGE from lib.core.settings import GIT_PAGE
from lib.core.settings import IS_WIN from lib.core.settings import IS_WIN
from lib.core.settings import LEGAL_DISCLAIMER from lib.core.settings import LEGAL_DISCLAIMER
from lib.core.settings import THREAD_FINALIZATION_TIMEOUT from lib.core.settings import THREAD_FINALIZATION_TIMEOUT
from lib.core.settings import UNICODE_ENCODING from lib.core.settings import UNICODE_ENCODING
from lib.core.settings import VERSION from lib.core.settings import VERSION
from lib.core.testing import smokeTest
from lib.core.testing import liveTest
from lib.parse.cmdline import cmdLineParser from lib.parse.cmdline import cmdLineParser
except KeyboardInterrupt: except KeyboardInterrupt:
errMsg = "user aborted" errMsg = "user aborted"
@ -142,6 +138,12 @@ def main():
dataToStdout("[!] legal disclaimer: %s\n\n" % LEGAL_DISCLAIMER, forceOutput=True) dataToStdout("[!] legal disclaimer: %s\n\n" % LEGAL_DISCLAIMER, forceOutput=True)
dataToStdout("[*] starting at %s\n\n" % time.strftime("%X"), forceOutput=True) dataToStdout("[*] starting at %s\n\n" % time.strftime("%X"), forceOutput=True)
# Delayed imports (33% of all imports)
from lib.controller.controller import start
from lib.core.profiling import profile
from lib.core.testing import smokeTest
from lib.core.testing import liveTest
init() init()
if conf.profile: if conf.profile:

View File

@ -46,7 +46,7 @@ ec6a778b0e74749b916caead78ba88b7 lib/core/option.py
760d9df2a27ded29109b390ab202e72d lib/core/replication.py 760d9df2a27ded29109b390ab202e72d lib/core/replication.py
a2466b62e67f8b31736bac4dac590e51 lib/core/revision.py a2466b62e67f8b31736bac4dac590e51 lib/core/revision.py
02d4762140a72fd44668d3dab5eabda9 lib/core/session.py 02d4762140a72fd44668d3dab5eabda9 lib/core/session.py
0c0ffa8d967370235b263b9eca013516 lib/core/settings.py 012bad7ef5ad747bea3edaaee08f5a68 lib/core/settings.py
35bffbad762eb9e03db9e93b1c991103 lib/core/shell.py 35bffbad762eb9e03db9e93b1c991103 lib/core/shell.py
a59ec28371ae067a6fdd8f810edbee3d lib/core/subprocessng.py a59ec28371ae067a6fdd8f810edbee3d lib/core/subprocessng.py
7c9f2af3c0a8dd89223cfe07b0a0b826 lib/core/target.py 7c9f2af3c0a8dd89223cfe07b0a0b826 lib/core/target.py
@ -224,7 +224,7 @@ c3cc8b7727161e64ab59f312c33b541a shell/stager.aspx_
1f7f125f30e0e800beb21e2ebbab18e1 shell/stager.jsp_ 1f7f125f30e0e800beb21e2ebbab18e1 shell/stager.jsp_
01e3505e796edf19aad6a996101c81c9 shell/stager.php_ 01e3505e796edf19aad6a996101c81c9 shell/stager.php_
c737efc0afe782c5dcfec9d27e827515 sqlmapapi.py c737efc0afe782c5dcfec9d27e827515 sqlmapapi.py
9103dbcc93b9d5854e2fd896e720e7b6 sqlmap.py 8f34280b975a35f68d5fba0123786871 sqlmap.py
ba9bb7b0fbfbd408c24bc99b3c8f0fd9 tamper/apostrophemask.py ba9bb7b0fbfbd408c24bc99b3c8f0fd9 tamper/apostrophemask.py
aa046ea026a3c72b714e726a2e775cd4 tamper/apostrophenullencode.py aa046ea026a3c72b714e726a2e775cd4 tamper/apostrophenullencode.py
0418d808878bf7cac4a28350116e64d0 tamper/appendnullbyte.py 0418d808878bf7cac4a28350116e64d0 tamper/appendnullbyte.py