Restyling output for Issue #52

This commit is contained in:
Miroslav Stampar 2012-07-03 13:06:52 +02:00
parent 6b419067b7
commit 481b46a004
3 changed files with 4 additions and 4 deletions

View File

@ -2489,7 +2489,7 @@ def unhandledExceptionMessage():
errMsg += "and any information required to reproduce the bug. The "
errMsg += "developers will try to reproduce the bug, fix it accordingly "
errMsg += "and get back to you.\n"
errMsg += "sqlmap version: %s%s\n" % (VERSION, " (%s)" % REVISION if REVISION else "")
errMsg += "sqlmap version: %s%s\n" % (VERSION, "-%s" % REVISION if REVISION else "")
errMsg += "Python version: %s\n" % PYVERSION
errMsg += "Operating system: %s\n" % PLATFORM
errMsg += "Command line: %s\n" % " ".join(sys.argv)

View File

@ -13,7 +13,7 @@ from subprocess import Popen as execute
def getRevisionNumber():
"""
Returns revision number in a GitHub style
Returns abbreviated commit hash number as retrieved with "git rev-parse --short HEAD"
"""
retVal = None
@ -41,4 +41,4 @@ def getRevisionNumber():
match = re.search(r"(?i)[0-9a-f]{32}", stdout or "")
retVal = match.group(0) if match else None
return retVal[:10] if retVal else None
return retVal[:7] if retVal else None

View File

@ -20,7 +20,7 @@ from lib.core.revision import getRevisionNumber
# sqlmap version and site
VERSION = "1.0-dev"
REVISION = getRevisionNumber()
VERSION_STRING = "sqlmap/%s%s" % (VERSION, " (%s)" % REVISION if REVISION else "")
VERSION_STRING = "sqlmap/%s%s" % (VERSION, "-%s" % REVISION if REVISION else "")
DESCRIPTION = "automatic SQL injection and database takeover tool"
SITE = "http://www.sqlmap.org"
ML = "sqlmap-users@lists.sourceforge.net"