File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8080from lib .core .exception import SqlmapUserQuitException
8181from lib .core .log import LOGGER_HANDLER
8282from lib .core .optiondict import optDict
83+ from lib .core .settings import BANNER
8384from lib .core .settings import BOLD_PATTERNS
8485from lib .core .settings import BRUTE_DOC_ROOT_PREFIXES
8586from lib .core .settings import BRUTE_DOC_ROOT_SUFFIXES
@@ -986,7 +987,9 @@ def banner():
986987 This function prints sqlmap banner with its version
987988 """
988989
989- _ = """\n %s - %s\n %s\n \n """ % (VERSION_STRING , DESCRIPTION , SITE )
990+ _ = BANNER
991+ if not getattr (LOGGER_HANDLER , "is_tty" , False ):
992+ _ = re .sub ("\033 .+?m" , "" , _ )
990993 dataToStdout (_ , forceOutput = True )
991994
992995def parsePasswordHash (password ):
Original file line number Diff line number Diff line change 1919# sqlmap version and site
2020VERSION = "1.0-dev"
2121REVISION = getRevisionNumber ()
22- VERSION_STRING = "sqlmap/%s%s" % (VERSION , "-%s" % REVISION if REVISION else "" )
22+ VERSION_STRING = "sqlmap/%s%s" % (VERSION , "-%s" % REVISION if REVISION else "-nongit " )
2323DESCRIPTION = "automatic SQL injection and database takeover tool"
2424SITE = "http://sqlmap.org"
2525ISSUES_PAGE = "https://github.com/sqlmapproject/sqlmap/issues/new"
2626GIT_REPOSITORY = "git://github.com/sqlmapproject/sqlmap.git"
27272828
29+ # colorful banner
30+ BANNER = """\033 [01;33m _
31+ ___ ___| |_____ ___ ___ \033 [01;37m{\033 [01;%dm%s\033 [01;37m}\033 [01;33m
32+ |_ -| . | | | .'| . |
33+ |___|_ |_|_|_|_|__,| _|
34+ |_| |_| \033 [0m\033 [4m%s\033 [0m\n
35+ """ % ((31 + hash (REVISION ) % 6 ) if REVISION else 30 , VERSION_STRING .split ('/' )[- 1 ], SITE )
36+
2937# Minimum distance of ratio from kb.matchRatio to result in True
3038DIFF_TOLERANCE = 0.05
3139CONSTANT_RATIO = 0.9
You can’t perform that action at this time.
0 commit comments