@memoized
def check_badchars(data, chars=None):
 if (to_int(data) is None):
  to_search = data
 else:
  data = to_hex(to_int(data))[2:]
  if ((len(data) % 2) != 0):
   data = ('0' + data)
  to_search = codecs.decode(data, 'hex')
 if (not chars):
  chars = config.Option.get('badchars')
 if chars:
  for c in chars:
   if (c in to_search):
    return True
 return False

@ memoized def check_badchars ( data , chars = None ) : if ( to_int ( data ) is None ) : to_search = data else : data = to_hex ( to_int ( data ) ) [ 2 : ] if ( ( len ( data ) % 2 ) != 0 ) : data = ( '0' + data ) to_search = codecs . decode ( data , 'hex' ) if ( not chars ) : chars = config . Option . get ( 'badchars' ) if chars : for c in chars : if ( c in to_search ) : return True return False
check an address or a value if it contains badchars .