Skip to content

Commit

Permalink
f-strings, they already worked!
Browse files Browse the repository at this point in the history
  • Loading branch information
sternmull committed May 1, 2022
1 parent b1f92e4 commit 5e042c7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion pyfuscator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
- Make sure to not use identifiers that are already present.
Actually i am not sure collisions are practically possible right now, maybe it is already safe!
- class arguments
- f-strings
- match
- reuse names from outer scopes as much as possible to make it harder to tell apart different variables (many name collisions until you take scope into account)
- remove code that is not used (private functions/classes that are not used anywhere)
Expand Down
6 changes: 6 additions & 0 deletions test_inputs/fstrings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

def main():
name = 'harry'
print(f'hello {name.upper()}')

main()
4 changes: 4 additions & 0 deletions test_outputs/fstrings.obf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
def main():
_v1 = 'harry'
print(f'hello {_v1.upper()}')
main()

0 comments on commit 5e042c7

Please sign in to comment.