Exemplo n.º 1
0
def hide_strings_split(obj):
    for i in xrange(len(obj)):
	v = ex.extract_string(obj[i])
	aux = obj[i].strip()
	if len(aux)>0 and aux[0]!="#" and not "RegExp" in aux:
	    for j in xrange(len(v)):
		if len(v[j])>2:
		    obj[i] = obj[i].replace('"'+v[j]+'"',StringModifiers.split_string(v[j]))
		    obj[i] = obj[i].replace("'"+v[j]+"'",StringModifiers.split_string(v[j]))
    return obj
Exemplo n.º 2
0
def hide_strings_flip_two(obj):
    for i in xrange(len(obj)):
	v = ex.extract_string(obj[i])
	aux = obj[i].strip()
	if len(aux)>0 and aux[0]!="#" and not "RegExp" in aux:
	    for j in xrange(len(v)):
		if len(v[j])>2:
		    obj[i] = obj[i].replace('"'+v[j]+'"',Globals.string_flip_two_function+'("'+StringModifiers.flip_two_modifier(v[j])+'") ')
		    obj[i] = obj[i].replace("'"+v[j]+"'",Globals.string_flip_two_function+"('"+StringModifiers.flip_two_modifier(v[j])+"') ")
    return obj
Exemplo n.º 3
0
def hide_strings_hexify(obj):
    for i in xrange(len(obj)):
	v = ex.extract_string(obj[i])
	aux = obj[i].strip()
	if len(aux)>0 and aux[0]!="#" and not "RegExp" in aux:
	    for j in xrange(len(v)):
		if len(v[j])>0:
		    obj[i] = obj[i].replace('"'+v[j]+'"','BinaryToString("'+StringModifiers.hexify_string(v[j])+'") ')
		    obj[i] = obj[i].replace("'"+v[j]+"'","BinaryToString('"+StringModifiers.hexify_string(v[j])+"') ")
    return obj
Exemplo n.º 4
0
def hide_strings_split(obj):
    for i in xrange(len(obj)):
        v = ex.extract_string(obj[i])
        aux = obj[i].strip()
        if len(aux) > 0 and aux[0] != "#" and not "RegExp" in aux:
            for j in xrange(len(v)):
                if len(v[j]) > 2:
                    obj[i] = obj[i].replace('"' + v[j] + '"',
                                            StringModifiers.split_string(v[j]))
                    obj[i] = obj[i].replace("'" + v[j] + "'",
                                            StringModifiers.split_string(v[j]))
    return obj
Exemplo n.º 5
0
def hide_strings_flip_two(obj):
    for i in xrange(len(obj)):
        v = ex.extract_string(obj[i])
        aux = obj[i].strip()
        if len(aux) > 0 and aux[0] != "#" and not "RegExp" in aux:
            for j in xrange(len(v)):
                if len(v[j]) > 2:
                    obj[i] = obj[i].replace(
                        '"' + v[j] + '"', Globals.string_flip_two_function +
                        '("' + StringModifiers.flip_two_modifier(v[j]) + '") ')
                    obj[i] = obj[i].replace(
                        "'" + v[j] + "'", Globals.string_flip_two_function +
                        "('" + StringModifiers.flip_two_modifier(v[j]) + "') ")
    return obj
Exemplo n.º 6
0
def hide_strings_hexify(obj):
    for i in xrange(len(obj)):
        v = ex.extract_string(obj[i])
        aux = obj[i].strip()
        if len(aux) > 0 and aux[0] != "#" and not "RegExp" in aux:
            for j in xrange(len(v)):
                if len(v[j]) > 0:
                    obj[i] = obj[i].replace(
                        '"' + v[j] + '"', 'BinaryToString("' +
                        StringModifiers.hexify_string(v[j]) + '") ')
                    obj[i] = obj[i].replace(
                        "'" + v[j] + "'", "BinaryToString('" +
                        StringModifiers.hexify_string(v[j]) + "') ")
    return obj
Exemplo n.º 7
0
def hide_strings_definition_shuffle(obj):
    for i in xrange(len(obj)):
	v = ex.extract_string(obj[i])
	aux = obj[i].strip()
	if len(aux)>0 and aux[0]!="#" and not "RegExp" in aux:
	    for j in xrange(len(v)):
		if len(v[j])>0:
		    shuffled = StringModifiers.shuffle_string(v[j])
		    obj[i] = obj[i].replace('"'+v[j]+'"',Globals.string_shuffle_function+'("'+shuffled[0]+'","'+shuffled[1]+'") ')
		    obj[i] = obj[i].replace("'"+v[j]+"'",Globals.string_shuffle_function+"('"+shuffled[0]+"','"+shuffled[1]+"') ")
    return obj
Exemplo n.º 8
0
def hide_strings_rotate(obj):
    for i in xrange(len(obj)):
	v = ex.extract_string(obj[i])
	aux = obj[i].strip()
	if len(aux)>0 and aux[0]!="#" and not "RegExp" in aux:
	    for j in xrange(len(v)):
		if len(v[j])>2:
		    params = StringModifiers.rotate_string(v[j])
		    obj[i] = obj[i].replace('"'+v[j]+'"',Globals.string_rotate_function+'("'+params[0]+'",'+str(params[1])+') ')
		    obj[i] = obj[i].replace("'"+v[j]+"'",Globals.string_rotate_function+"('"+params[0]+"',"+str(params[1])+") ")
    return obj
Exemplo n.º 9
0
def hide_strings_rotate(obj):
    for i in xrange(len(obj)):
        v = ex.extract_string(obj[i])
        aux = obj[i].strip()
        if len(aux) > 0 and aux[0] != "#" and not "RegExp" in aux:
            for j in xrange(len(v)):
                if len(v[j]) > 2:
                    params = StringModifiers.rotate_string(v[j])
                    obj[i] = obj[i].replace(
                        '"' + v[j] + '"', Globals.string_rotate_function +
                        '("' + params[0] + '",' + str(params[1]) + ') ')
                    obj[i] = obj[i].replace(
                        "'" + v[j] + "'", Globals.string_rotate_function +
                        "('" + params[0] + "'," + str(params[1]) + ") ")
    return obj
Exemplo n.º 10
0
def hide_strings_definition_shuffle(obj):
    for i in xrange(len(obj)):
        v = ex.extract_string(obj[i])
        aux = obj[i].strip()
        if len(aux) > 0 and aux[0] != "#" and not "RegExp" in aux:
            for j in xrange(len(v)):
                if len(v[j]) > 0:
                    shuffled = StringModifiers.shuffle_string(v[j])
                    obj[i] = obj[i].replace(
                        '"' + v[j] + '"', Globals.string_shuffle_function +
                        '("' + shuffled[0] + '","' + shuffled[1] + '") ')
                    obj[i] = obj[i].replace(
                        "'" + v[j] + "'", Globals.string_shuffle_function +
                        "('" + shuffled[0] + "','" + shuffled[1] + "') ")
    return obj
Exemplo n.º 11
0
def hide_strings_split(obj):
    for i in xrange(len(obj)):
        v = ex.extract_string(obj[i])
        aux = obj[i].strip()
        if len(aux) > 0 and aux[0] != "#" and not "RegExp" in aux:
            for j in xrange(len(v)):
                v[j] = v[j][
                    1:-1]  # !Comillas! -> puede bugear esto, probar a dejarlas
                if len(v[j]) > 2:
                    obj[i] = obj[i].replace('"' + v[j] + '"',
                                            StringModifiers.split_string(v[j]))
                    #obj[i] = obj[i].replace("'"+v[j]+"'",StringModifiers.split_string(v[j]))
                #print v[j]
                #print StringModifiers.split_string(v[j])
                #raw_input()
                #obj[i] = obj[i].replace('"'+v[j]+'"',StringModifiers.split_string(v[j]))
                #obj[i] = obj[i].replace("'"+v[j]+"'",Globals.string_flip_two_function+'("'+StringModifiers.flip_two_modifier(v[j])+'") ') #
    return obj