Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e07c92b

Browse files
committed
Minor change on banner showing up
1 parent 0c5965c commit e07c92b

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

lib/core/common.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,10 +1068,12 @@ def banner():
10681068
This function prints sqlmap banner with its version
10691069
"""
10701070

1071-
_ = BANNER
1072-
if not getattr(LOGGER_HANDLER, "is_tty", False):
1073-
_ = re.sub("\033.+?m", "", _)
1074-
dataToStdout(_, forceOutput=True)
1071+
1072+
if not any(_ in sys.argv for _ in ("--version", "--pickled-options")):
1073+
_ = BANNER
1074+
if not getattr(LOGGER_HANDLER, "is_tty", False):
1075+
_ = re.sub("\033.+?m", "", _)
1076+
dataToStdout(_, forceOutput=True)
10751077

10761078
def parsePasswordHash(password):
10771079
"""

sqlmap.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def main():
8585
raise SystemExit
8686

8787
setPaths()
88+
banner()
8889

8990
# Store original command line options for possible later restoration
9091
cmdLineOptions.update(cmdLineParser().__dict__)
@@ -97,8 +98,6 @@ def main():
9798
sys.stderr = StdDbOut(conf.taskid, messagetype="stderr")
9899
setRestAPILog()
99100

100-
banner()
101-
102101
conf.showTime = True
103102
dataToStdout("[!] legal disclaimer: %s\n\n" % LEGAL_DISCLAIMER, forceOutput=True)
104103
dataToStdout("[*] starting at %s\n\n" % time.strftime("%X"), forceOutput=True)

0 commit comments

Comments
 (0)