This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
"""
|
||||
@file transformers/rename.py
|
||||
@brief Identifier renaming and string literal encryption transformer.
|
||||
@details Performs scoped variable/function renaming, consistent class/method/attribute
|
||||
remapping, and in-place string encryption producing runtime decryption code.
|
||||
"""
|
||||
|
||||
import ast
|
||||
from utils.encryption import StringEncryptor
|
||||
from utils.name_gen import NameGenerator
|
||||
@@ -8,6 +15,11 @@ logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger("RenameTransformer")
|
||||
|
||||
class RenameTransformer(ast.NodeTransformer):
|
||||
"""
|
||||
@brief AST transformer for renaming and string encryption.
|
||||
@details Maintains scope stacks, global mappings, class method/attribute maps, and
|
||||
collects key-setup code for runtime decryption. Can emit debug telemetry.
|
||||
"""
|
||||
def __init__(self, name_generator, global_var_renames, class_attr_mapping,
|
||||
primary_key, secondary_key, salt, debug_mode=False):
|
||||
self.name_generator = name_generator
|
||||
|
||||
Reference in New Issue
Block a user