mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Patch for Windows banner display
This commit is contained in:
parent
9dd5cd8eb6
commit
ad612bf9e4
4 changed files with 17 additions and 10 deletions
|
|
@ -151,6 +151,7 @@ from lib.core.threads import getCurrentThreadData
|
|||
from lib.utils.sqlalchemy import _sqlalchemy
|
||||
from thirdparty.clientform.clientform import ParseResponse
|
||||
from thirdparty.clientform.clientform import ParseError
|
||||
from thirdparty.colorama.initialise import init as coloramainit
|
||||
from thirdparty.magic import magic
|
||||
from thirdparty.odict.odict import OrderedDict
|
||||
from thirdparty.termcolor.termcolor import colored
|
||||
|
|
@ -1068,11 +1069,14 @@ def banner():
|
|||
This function prints sqlmap banner with its version
|
||||
"""
|
||||
|
||||
|
||||
if not any(_ in sys.argv for _ in ("--version", "--pickled-options")):
|
||||
_ = BANNER
|
||||
if not getattr(LOGGER_HANDLER, "is_tty", False):
|
||||
|
||||
if not getattr(LOGGER_HANDLER, "is_tty", False) or "--disable-coloring" in sys.argv:
|
||||
_ = re.sub("\033.+?m", "", _)
|
||||
elif IS_WIN:
|
||||
coloramainit()
|
||||
|
||||
dataToStdout(_, forceOutput=True)
|
||||
|
||||
def parsePasswordHash(password):
|
||||
|
|
|
|||
|
|
@ -151,7 +151,6 @@ from lib.utils.crawler import crawl
|
|||
from lib.utils.deps import checkDependencies
|
||||
from lib.utils.search import search
|
||||
from lib.utils.purge import purge
|
||||
from thirdparty.colorama.initialise import init as coloramainit
|
||||
from thirdparty.keepalive import keepalive
|
||||
from thirdparty.oset.pyoset import oset
|
||||
from thirdparty.socks import socks
|
||||
|
|
@ -2532,9 +2531,6 @@ def _resolveCrossReferences():
|
|||
lib.controller.checks.setVerbosity = setVerbosity
|
||||
|
||||
def initOptions(inputOptions=AttribDict(), overrideOptions=False):
|
||||
if IS_WIN:
|
||||
coloramainit()
|
||||
|
||||
_setConfAttributes()
|
||||
_setKnowledgeBaseAttributes()
|
||||
_mergeOptions(inputOptions, overrideOptions)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from lib.core.enums import OS
|
|||
from lib.core.revision import getRevisionNumber
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.0.4.22"
|
||||
VERSION = "1.0.4.23"
|
||||
REVISION = getRevisionNumber()
|
||||
STABLE = VERSION.count('.') <= 2
|
||||
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue