ClaudiuGeorgiu/Obfuscapk

class_rename incorrectly replaced the command

Haoxiqiang opened this issue · 0 comments

I found an incorrectly replaced sample.
If a smali file line has a defined const-string and the string length is 1.
class_rename will replace all chars class_rename/class_rename.py#L196

line = line.replace(
    string_match.group("string_value"),
    dot_rename_transformations[
        string_match.group("string_value")
    ],
)

line_before:
const-string v1, "r"
line_after:
const-stp4b43b0aeing v1, "p4b43b0ae"