juanlao7/codeclose

Obfuscation fails when importing entire submodules

Closed this issue · 0 comments

Source code:

import http.client
print(http.client)

With --name-obfuscation randomKeywords, the following code is generated:

import http.client as TimeoutError_delattr
print(http.client)

Problem: the obfuscator fails to replace references to the submodule.

With --name-obfuscation light, the following code is generated:

import http.client as http.client_15849
print(http.client)

Problem: the same problem as above, and also the new alias for the submodule has an invalid format (it includes a dot).

This bug was originally discovered here by @LaurentEsingle