@@ -341,7 +341,7 @@ def _parseBurpLog(content):
341341 content = f .read ()
342342 except (IOError , OSError , MemoryError ), ex :
343343 errMsg = "something went wrong while trying "
344- errMsg += "to read the content of file '%s' ('%s')" % (reqFile , ex )
344+ errMsg += "to read the content of file '%s' ('%s')" % (reqFile , getSafeExString ( ex ) )
345345 raise SqlmapSystemException (errMsg )
346346
347347 if conf .scope :
@@ -386,7 +386,7 @@ def __contains__(self, name):
386386 tree .parse (paths .QUERIES_XML )
387387 except Exception , ex :
388388 errMsg = "something seems to be wrong with "
389- errMsg += "the file '%s' ('%s'). Please make " % (paths .QUERIES_XML , ex )
389+ errMsg += "the file '%s' ('%s'). Please make " % (paths .QUERIES_XML , getSafeExString ( ex ) )
390390 errMsg += "sure that you haven't made any changes to it"
391391 raise SqlmapInstallationException , errMsg
392392
@@ -501,7 +501,7 @@ def _setCrawler():
501501 status = "%d/%d links visited (%d%%)" % (i + 1 , len (targets ), round (100.0 * (i + 1 ) / len (targets )))
502502 dataToStdout ("\r [%s] [INFO] %s" % (time .strftime ("%X" ), status ), True )
503503 except Exception , ex :
504- errMsg = "problem occurred while crawling at '%s' ('%s')" % (target , ex )
504+ errMsg = "problem occurred while crawling at '%s' ('%s')" % (target , getSafeExString ( ex ) )
505505 logger .error (errMsg )
506506
507507def _doSearch ():
@@ -1098,7 +1098,7 @@ def _setHTTPHandlers():
10981098 try :
10991099 _ = urlparse .urlsplit (conf .proxy )
11001100 except Exception , ex :
1101- errMsg = "invalid proxy address '%s' ('%s')" % (conf .proxy , ex )
1101+ errMsg = "invalid proxy address '%s' ('%s')" % (conf .proxy , getSafeExString ( ex ) )
11021102 raise SqlmapSyntaxException , errMsg
11031103
11041104 hostnamePort = _ .netloc .split (":" )
@@ -2059,7 +2059,7 @@ def _saveConfig():
20592059 config .write (confFP )
20602060 except IOError , ex :
20612061 errMsg = "something went wrong while trying "
2062- errMsg += "to write to the configuration file '%s' ('%s')" % (conf .saveConfig , ex )
2062+ errMsg += "to write to the configuration file '%s' ('%s')" % (conf .saveConfig , getSafeExString ( ex ) )
20632063 raise SqlmapSystemException (errMsg )
20642064
20652065 infoMsg = "saved command line options to the configuration file '%s'" % conf .saveConfig
@@ -2368,14 +2368,14 @@ def _basicOptionValidation():
23682368 try :
23692369 re .compile (conf .regexp )
23702370 except re .error , ex :
2371- errMsg = "invalid regular expression '%s' ('%s')" % (conf .regexp , ex )
2371+ errMsg = "invalid regular expression '%s' ('%s')" % (conf .regexp , getSafeExString ( ex ) )
23722372 raise SqlmapSyntaxException (errMsg )
23732373
23742374 if conf .crawlExclude :
23752375 try :
23762376 re .compile (conf .crawlExclude )
23772377 except re .error , ex :
2378- errMsg = "invalid regular expression '%s' ('%s')" % (conf .crawlExclude , ex )
2378+ errMsg = "invalid regular expression '%s' ('%s')" % (conf .crawlExclude , getSafeExString ( ex ) )
23792379 raise SqlmapSyntaxException (errMsg )
23802380
23812381 if conf .dumpTable and conf .dumpAll :
0 commit comments