diff --git a/lib/core/common.py b/lib/core/common.py index fdb189823..19abdf9d3 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -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) diff --git a/lib/core/revision.py b/lib/core/revision.py index 5d23c77b5..8738e9e9e 100644 --- a/lib/core/revision.py +++ b/lib/core/revision.py @@ -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 diff --git a/lib/core/settings.py b/lib/core/settings.py index dfc818b41..fdb5bfa59 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -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"