def hide_variable_names(obj): identifiers = list(ex.extract_defined_variables_from_obj(obj)) # Extraer solo las que se definen en el script # replaces = Utils.mod_names_hash(identifiers) boundary = "\n"+Utils.generate_random_string(20,30)+"\n" obj = boundary.join(obj) for i in xrange(len(identifiers)): if identifiers[i]: obj = sub(r"\$"+identifiers[i][1:]+r"\b","$"+replaces[i]+" ",obj) return obj.split(boundary)
def hide_function_parameters(obj): identifiers = list(ex.extract_parameters_from_obj(obj)) replaces = Utils.mod_names_hash(identifiers) boundary = "\n"+Utils.generate_random_string(20,30)+"\n" obj = boundary.join(obj) for i in xrange(len(identifiers)): try: if identifiers[i]: obj = sub(r"\$"+identifiers[i][1:]+r"\b","$"+replaces[i]+" ",obj) except: continue return obj.split(boundary)
def hide_variable_names(obj): identifiers = list(ex.extract_defined_variables_from_obj( obj)) # Extraer solo las que se definen en el script # replaces = Utils.mod_names_hash(identifiers) for i in xrange(len(obj)): for j in xrange(len(identifiers)): obj[i] = obj[i].replace( identifiers[j], "$" + replaces[j]) if not not identifiers[j] else obj[i] return obj
def hide_variable_names(obj): identifiers = list(ex.extract_defined_variables_from_obj( obj)) # Extraer solo las que se definen en el script # replaces = Utils.mod_names_hash(identifiers) boundary = "\n" + Utils.generate_random_string(20, 30) + "\n" obj = boundary.join(obj) for i in xrange(len(identifiers)): if identifiers[i]: obj = sub(r"\$" + identifiers[i][1:] + r"\b", "$" + replaces[i] + " ", obj) return obj.split(boundary)
def hide_function_parameters(obj): identifiers = list(ex.extract_parameters_from_obj(obj)) replaces = Utils.mod_names_hash(identifiers) boundary = "\n" + Utils.generate_random_string(20, 30) + "\n" obj = boundary.join(obj) for i in xrange(len(identifiers)): try: if identifiers[i]: obj = sub(r"\$" + identifiers[i][1:] + r"\b", "$" + replaces[i] + " ", obj) except: continue return obj.split(boundary)