예제 #1
0
def hide_strings_reverse(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_reverse_function+'("'+v[j][::-1]+'") ')
		    obj[i] = obj[i].replace("'"+v[j]+"'",Globals.string_reverse_function+"('"+v[j][::-1]+"') ") #
    return obj
예제 #2
0
def hide_strings_replace(obj):
    for i in xrange(len(obj)):
	v = ex.extract_string(obj[i])
	if not "#include" in obj[i] and not "RegExp" in obj[i]:
	    for j in xrange(len(v)):
		if len(v[j])>2 and len(obj[i])<Globals.max_size_len_autoit-(len(obj[i])+(1.0/2)*len(obj[i]))+4+len(Config.JUNK_SYMBOLS[0]):
		    aux  = Utils.add_random_char_between_string(v[j],Config.JUNK_SYMBOLS[0])
		    obj[i] = obj[i].replace('"'+v[j]+'"',Globals.string_replace_function+'("'+aux+'","'+Config.JUNK_SYMBOLS[0]+'")')
		    obj[i] = obj[i].replace("'"+v[j]+"'",Globals.string_replace_function+"('"+aux+"','"+Config.JUNK_SYMBOLS[0]+"')")
    return obj
예제 #3
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
예제 #4
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
예제 #5
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
예제 #6
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
예제 #7
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
예제 #8
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
예제 #9
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)):
                v[j] = v[j][1:-1]
                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
예제 #10
0
def hide_strings_reverse(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_reverse_function +
                        '("' + v[j][::-1] + '") ')
                    obj[i] = obj[i].replace("'" + v[j] + "'",
                                            Globals.string_reverse_function +
                                            "('" + v[j][::-1] + "') ")  #
    return obj
예제 #11
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
예제 #12
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
예제 #13
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
예제 #14
0
def hide_strings_replace(obj):
    for i in xrange(len(obj)):
        v = ex.extract_string(obj[i])
        if not "#include" in obj[i] and not "RegExp" in obj[i]:
            for j in xrange(len(v)):
                v[j] = v[j][1:-1]
                if len(v[j].strip(
                )) > 0 and len(obj[i]) < Globals.max_size_len_autoit - (
                        len(obj[i]) +
                    (1.0 / 2) * len(obj[i])) + 4 + len(Config.JUNK_SYMBOLS[0]):
                    aux = Utils.add_random_char_between_string(
                        v[j], Config.JUNK_SYMBOLS[0])
                    obj[i] = obj[i].replace(
                        '"' + v[j] + '"', Globals.string_replace_function +
                        "('" + aux + "','" + Config.JUNK_SYMBOLS[0] + "')")
    return obj
예제 #15
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