Minor code refactoring

This commit is contained in:
Bernardo Damele
2010-10-20 22:09:03 +00:00
parent 862cc9ac53
commit e73e06069b
6 changed files with 16 additions and 11 deletions

View File

@@ -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