MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / unhandledExceptionMessage

Function unhandledExceptionMessage

lib/core/common.py:3882–3913  ·  view source on GitHub ↗

Returns detailed message about occurred unhandled exception >>> all(_ in unhandledExceptionMessage() for _ in ("unhandled exception occurred", "Operating system", "Command line")) True

()

Source from the content-addressed store, hash-verified

3880 return int(time.time() - os.path.getmtime(paths.SQLMAP_SETTINGS_PATH)) // (3600 * 24)
3881
3882def unhandledExceptionMessage():
3883 """
3884 Returns detailed message about occurred unhandled exception
3885
3886 >>> all(_ in unhandledExceptionMessage() for _ in ("unhandled exception occurred", "Operating system", "Command line"))
3887 True
3888 """
3889
3890 errMsg = "unhandled exception occurred in %s. It is recommended to retry your " % VERSION_STRING
3891 errMsg += "run with the latest development version from official GitHub "
3892 errMsg += "repository at '%s'. If the exception persists, please open a new issue " % GIT_PAGE
3893 errMsg += "at '%s' " % ISSUES_PAGE
3894 errMsg += "with the following text and any other information required to "
3895 errMsg += "reproduce the bug. Developers will try to reproduce the bug, fix it accordingly "
3896 errMsg += "and get back to you\n"
3897 errMsg += "Running version: %s\n" % VERSION_STRING[VERSION_STRING.find('/') + 1:]
3898 errMsg += "Python version: %s\n" % PYVERSION
3899 errMsg += "Operating system: %s\n" % platform.platform()
3900 errMsg += "Command line: %s\n" % re.sub(r".+?\bsqlmap\.py\b", "sqlmap.py", getUnicode(" ".join(sys.argv), encoding=getattr(sys.stdin, "encoding", None)))
3901 errMsg += "Technique: %s\n" % (enumValueToNameLookup(PAYLOAD.TECHNIQUE, getTechnique()) if getTechnique() is not None else ("DIRECT" if conf.get("direct") else None))
3902 errMsg += "Back-end DBMS:"
3903
3904 if Backend.getDbms() is not None:
3905 errMsg += " %s (fingerprinted)" % Backend.getDbms()
3906
3907 if Backend.getIdentifiedDbms() is not None and (Backend.getDbms() is None or Backend.getIdentifiedDbms() != Backend.getDbms()):
3908 errMsg += " %s (identified)" % Backend.getIdentifiedDbms()
3909
3910 if not errMsg.endswith(')'):
3911 errMsg += " None"
3912
3913 return errMsg
3914
3915def getLatestRevision():
3916 """

Callers 2

mainFunction · 0.90
runThreadsFunction · 0.90

Calls 7

getUnicodeFunction · 0.90
enumValueToNameLookupFunction · 0.85
getTechniqueFunction · 0.85
findMethod · 0.80
getIdentifiedDbmsMethod · 0.80
getMethod · 0.45
getDbmsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…