Patch for --update progress

This commit is contained in:
Miroslav Stampar 2019-01-29 14:59:31 +01:00
parent b3777995b2
commit dddff45adb
4 changed files with 10 additions and 7 deletions

View File

@ -884,8 +884,11 @@ def setColor(message, color=None, bold=False):
retVal = colored(message, color=color, on_color=None, attrs=("bold",) if bold else None)
elif level:
level = getattr(logging, level, None) if isinstance(level, basestring) else level
retVal = LOGGER_HANDLER.colorize(message, level)
kb.stickyLevel = level if message and message[-1] != "\n" and message != '.' else None
if message != '.':
retVal = LOGGER_HANDLER.colorize(message, level)
kb.stickyLevel = level if message and message[-1] != "\n" else None
else:
kb.stickyLevel = None
return retVal

View File

@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.1.78"
VERSION = "1.3.1.79"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
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)

View File

@ -103,7 +103,7 @@ def update():
debugMsg = "sqlmap will try to update itself using 'git' command"
logger.debug(debugMsg)
dataToStdout("\r[%s] [INFO] update in progress " % time.strftime("%X"))
dataToStdout("\r[%s] [INFO] update in progress" % time.strftime("%X"))
try:
process = subprocess.Popen("git checkout . && git pull %s HEAD" % GIT_REPOSITORY, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=paths.SQLMAP_ROOT_PATH.encode(sys.getfilesystemencoding() or UNICODE_ENCODING))

View File

@ -30,7 +30,7 @@ c1da277517c7ec4c23e953a51b51e203 lib/controller/handler.py
fb6be55d21a70765e35549af2484f762 lib/controller/__init__.py
ed7874be0d2d3802f3d20184f2b280d5 lib/core/agent.py
a932126e7d80e545c5d44af178d0bc0c lib/core/bigarray.py
20e2ae9aaa173586d49f9e4c0baa5fb6 lib/core/common.py
f97e6dc62b453cc787ef7f801ee1af5b lib/core/common.py
de8d27ae6241163ff9e97aa9e7c51a18 lib/core/convert.py
abcb1121eb56d3401839d14e8ed06b6e lib/core/data.py
db60c6ebb63b72ed119e304b359fc1a6 lib/core/datatype.py
@ -50,14 +50,14 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
7d8a22c582ad201f65b73225e4456170 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
67ddffec8291af66e1eb0c10cc1161bf lib/core/settings.py
22d863656bbd0c35477126043a0110f3 lib/core/settings.py
4483b4a5b601d8f1c4281071dff21ecc lib/core/shell.py
10fd19b0716ed261e6d04f311f6f527c lib/core/subprocessng.py
9c7b5c6397fb3da33e7a4d7876d159c6 lib/core/target.py
7857b24b7865ccb4a05283faa596974d lib/core/testing.py
e9788d2992f842cf91ab67389bf4372a lib/core/threads.py
2c263c8610667fdc593c50a35ab20f57 lib/core/unescaper.py
ff45c74515fecc95277f7b9ad945f17c lib/core/update.py
54e9cd1968adea11283d44631f0ca400 lib/core/update.py
5b3f08208be0579356f78ce5805d37b2 lib/core/wordlist.py
fb6be55d21a70765e35549af2484f762 lib/__init__.py
4881480d0c1778053908904e04570dc3 lib/parse/banner.py