コード例 #1
0
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)
コード例 #2
0
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)
コード例 #3
0
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
コード例 #4
0
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)
コード例 #5
0
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)