|
62 | 62 | from lib.core.settings import DESCRIPTION |
63 | 63 | from lib.core.settings import IS_WIN |
64 | 64 | from lib.core.settings import PLATFORM |
| 65 | +from lib.core.settings import PYVERSION |
| 66 | +from lib.core.settings import VERSION |
| 67 | +from lib.core.settings import REVISION |
| 68 | +from lib.core.settings import VERSION_STRING |
65 | 69 | from lib.core.settings import SITE |
66 | 70 | from lib.core.settings import ERROR_PARSING_REGEXES |
67 | 71 | from lib.core.settings import NON_CONTROL_CHAR_REGEX |
68 | 72 | from lib.core.settings import SQL_STATEMENTS |
69 | 73 | from lib.core.settings import SUPPORTED_DBMS |
70 | 74 | from lib.core.settings import UNKNOWN_DBMS_VERSION |
71 | | -from lib.core.settings import VERSION_STRING |
72 | 75 | from lib.core.settings import DUMP_NEWLINE_MARKER |
73 | 76 | from lib.core.settings import DUMP_CR_MARKER |
74 | 77 | from lib.core.settings import DUMP_DEL_MARKER |
@@ -2273,3 +2276,18 @@ def decodeIntToUnicode(value): |
2273 | 2276 | return struct.pack('B' if value<256 else '>H', value).decode(kb.pageEncoding) |
2274 | 2277 | except: |
2275 | 2278 | return INFERENCE_UNKNOWN_CHAR |
| 2279 | + |
| 2280 | +def unhandledExceptionMessage(): |
| 2281 | + errMsg = "unhandled exception in %s, retry your " % VERSION_STRING |
| 2282 | + errMsg += "run with the latest development version from the Subversion " |
| 2283 | + errMsg += "repository. If the exception persists, please send by e-mail " |
| 2284 | + errMsg += "to [email protected] the command line, the " |
| 2285 | + errMsg += "following text and any information needed to reproduce the " |
| 2286 | + errMsg += "bug. The developers will try to reproduce the bug, fix it " |
| 2287 | + errMsg += "accordingly and get back to you.\n" |
| 2288 | + errMsg += "sqlmap version: %s%s\n" % (VERSION, " (r%d)" % REVISION if REVISION else "") |
| 2289 | + errMsg += "Python version: %s\n" % PYVERSION |
| 2290 | + errMsg += "Operating system: %s\n" % PLATFORM |
| 2291 | + errMsg += "Technique: %s\n" % (enumValueToNameLookup(PAYLOAD.TECHNIQUE, kb.technique) if kb.technique else None) |
| 2292 | + errMsg += "Back-end DBMS: %s" % kb.dbms |
| 2293 | + return errMsg |
0 commit comments