issue with the usage of f string when a variable is used more than once in string formating
tksarunachalam opened this issue · comments
for eg if this is our source code:
first="hello"
second="world"
third="from"
fourth="python"
e=f"{first} {second} {third} {fourth} {first} again"
obfuscated code:
O00O000OO00O000O0 ="hello"#line:8
O00OOO00O0000OOOO ="world"#line:9
OOO00O0O0OO00OO00 ="from"#line:10
O000OO0O00O000000 ="python"#line:11
OO0O00O00OO000000 =f"{O00O000OO00O000O0} {O00OOO00O0000OOOO} {OOO00O0O0OO00OO00} {O000OO0O00O000000} {first} again" #line:13
the variable first is used 2 times in a single "f" format and after the first time it is treated as a string not as a variable