mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 21:21:33 +00:00
Minor code refactoring
This commit is contained in:
@@ -404,7 +404,7 @@ def filePathToString(filePath):
|
||||
return strRepl
|
||||
|
||||
def dataToStdout(data, forceOutput=False):
|
||||
if conf.verbose > 0 or forceOutput:
|
||||
if forceOutput or conf.verbose > 0:
|
||||
try:
|
||||
sys.stdout.write(data)
|
||||
sys.stdout.flush()
|
||||
@@ -569,10 +569,12 @@ def banner():
|
||||
This function prints sqlmap banner with its version
|
||||
"""
|
||||
|
||||
print """
|
||||
ban = """
|
||||
%s - %s
|
||||
%s
|
||||
""" % (VERSION_STRING, DESCRIPTION, SITE)
|
||||
%s\n
|
||||
""" % (VERSION_STRING, DESCRIPTION, SITE)
|
||||
|
||||
dataToStdout(ban, forceOutput=True)
|
||||
|
||||
def parsePasswordHash(password):
|
||||
blank = " " * 8
|
||||
|
||||
@@ -24,8 +24,8 @@ from xml.dom.minidom import Document
|
||||
from subprocess import PIPE
|
||||
from subprocess import Popen as execute
|
||||
|
||||
from lib.core.common import getUnicode
|
||||
from lib.core.common import dataToStdout
|
||||
from lib.core.common import getUnicode
|
||||
from lib.core.common import pollProcess
|
||||
from lib.core.common import readInput
|
||||
from lib.core.data import conf
|
||||
@@ -209,7 +209,7 @@ def __updateSqlmap():
|
||||
return
|
||||
|
||||
if action.find('_completed') == -1:
|
||||
print "%s\t%s" % (prefix, event_dict['path'])
|
||||
dataToStdout("%s\t%s\n" % (prefix, event_dict['path']))
|
||||
else:
|
||||
revision = getUnicode(event_dict['revision'])
|
||||
index = revision.find('number ')
|
||||
|
||||
Reference in New Issue
Block a user