def maskSensitiveData(msg):
 retVal = getUnicode(msg)
 for item in filter(None, map((lambda x: conf.get(x)), SENSITIVE_OPTIONS)):
  regex = (SENSITIVE_DATA_REGEX % re.sub('(\\W)', '\\\\\\1', getUnicode(item)))
  while extractRegexResult(regex, retVal):
   value = extractRegexResult(regex, retVal)
   retVal = retVal.replace(value, ('*' * len(value)))
 if (not conf.get('hostname')):
  match = re.search('(?i)sqlmap.+(-u|--url)(\\s+|=)([^ ]+)', retVal)
  if match:
   retVal = retVal.replace(match.group(3), ('*' * len(match.group(3))))
 if getpass.getuser():
  retVal = re.sub(('(?i)\\b%s\\b' % re.escape(getpass.getuser())), ('*' * len(getpass.getuser())), retVal)
 return retVal

def maskSensitiveData ( msg ) : retVal = getUnicode ( msg ) for item in filter ( None , map ( ( lambda x : conf . get ( x ) ) , SENSITIVE_OPTIONS ) ) : regex = ( SENSITIVE_DATA_REGEX % re . sub ( '(\\W)' , '\\\\\\1' , getUnicode ( item ) ) ) while extractRegexResult ( regex , retVal ) : value = extractRegexResult ( regex , retVal ) retVal = retVal . replace ( value , ( '*' * len ( value ) ) ) if ( not conf . get ( 'hostname' ) ) : match = re . search ( '(?i)sqlmap.+(-u|--url)(\\s+|=)([^ ]+)' , retVal ) if match : retVal = retVal . replace ( match . group ( 3 ) , ( '*' * len ( match . group ( 3 ) ) ) ) if getpass . getuser ( ) : retVal = re . sub ( ( '(?i)\\b%s\\b' % re . escape ( getpass . getuser ( ) ) ) , ( '*' * len ( getpass . getuser ( ) ) ) , retVal ) return retVal
masks sensitive data in the supplied message .