From c106dc829a3560bdacbe80ece1bb9a6acf23f6f4 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 19 Jan 2011 22:08:56 +0000 Subject: [PATCH] more proper way to deal with this because without it warn message is just fast scrolled while leaving users confused (why it doesn't run) --- lib/core/option.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index c609f94fd..cfcac9cb0 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -56,6 +56,7 @@ from lib.core.exception import sqlmapGenericException from lib.core.exception import sqlmapMissingDependence from lib.core.exception import sqlmapMissingMandatoryOptionException from lib.core.exception import sqlmapMissingPrivileges +from lib.core.exception import sqlmapSilentQuitException from lib.core.exception import sqlmapSyntaxException from lib.core.exception import sqlmapUnsupportedDBMSException from lib.core.exception import sqlmapUserQuitException @@ -410,15 +411,11 @@ def __setMetasploit(): if IS_WIN: warnMsg = "some sqlmap takeover functionalities are not yet " warnMsg += "supported on Windows. Please use Linux in a virtual " - warnMsg += "machine for out-of-band features. sqlmap will now " - warnMsg += "carry on ignoring out-of-band switches" - logger.warn(warnMsg) + warnMsg += "machine for out-of-band features." - conf.osPwn = None - conf.osSmb = None - conf.osBof = None + logger.critical(warnMsg) - return + raise sqlmapSilentQuitException if conf.osSmb: isAdmin = runningAsAdmin()