Files
Joren e12e932767 Add obfuscator v2 with semantic-preserving obfuscated dataset
- Rename functions, variables, parameters and imports with scope-aware AST passes
- Generalise Flask route and template paths to unique /route_N and tpl_N names
- Replace descriptive strings with length-preserving, word-consistent msg tokens
- Strip docstrings and comments
- Add verification for parse validity and leaked benchmark identifiers
- Include SAST prompt and expected labels
2026-11-10 02:48:03 +01:00

32 lines
1.2 KiB
Python

from flask import redirect as mod_1, url_for as mod_2, request as mod_3, make_response as mod_4, render_template as mod_5
from helpers.utils import escape_for_html as mod_6
def init(var_1):
@var_1.route('/route_114', methods=['GET'])
def func_227():
return func_228()
@var_1.route('/route_114', methods=['POST'])
def func_228():
var_2 = ''
var_3 = mod_3.args.get('msg00000000000001I')
if not var_3:
var_3 = ''
import helpers.ThingFactory
var_4 = helpers.ThingFactory.createThing()
var_5 = var_4.doSomething(var_3)
import elementpath as mod_7
import xml.etree.ElementTree as mod_8
import helpers.utils
try:
var_6 = mod_8.parse(f'{helpers.utils.RES_DIR}/employees.xml')
var_7 = mod_7.select(var_6, f"""/Employees/Employee[@emplid='{var_5.replace("'", ''')}']""")
var_8 = []
for var_9 in var_7:
var_8.append(' '.join([var_10.text for var_10 in var_9]))
var_2 += f"m007 msg06 msg07 msg0005 ojg: <aj>[ {', '.join(var_8)} ]"
except:
var_2 += f"msg08 msg0006 msg09 msg0a: '{mod_6(var_11)}'"
return var_2