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

43 lines
1.6 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_58', methods=['GET'])
def func_115():
return func_116()
@var_1.route('/route_58', methods=['POST'])
def func_116():
var_2 = ''
import helpers.separate_request
var_3 = helpers.separate_request.request_wrapper(mod_3)
var_4 = var_3.get_form_parameter('msg00000000000000V')
if not var_4:
var_4 = ''
import configparser as mod_7
var_5 = 'm008!'
var_6 = mod_7.ConfigParser()
var_6.add_section('msg000000006')
var_6.set('msg000000006', 'm009-75704', 'o_msg0b')
var_6.set('msg000000006', 'm00a-75704', var_4)
var_5 = var_6.get('msg000000006', 'm009-75704')
import hashlib as mod_8, base64 as mod_9
import io as mod_10, helpers.utils
var_7 = ''
if isinstance(var_5, str):
var_7 = var_5.encode('utf-8')
elif isinstance(var_5, mod_10.IOBase):
var_7 = var_5.read(1000)
if len(var_7) == 0:
var_2 += 'msg006 msg00006 m00e: msg0e boz msg0f.'
return var_2
var_8 = mod_8.md5()
var_8.update(var_7)
var_9 = var_8.digest()
var_10 = open(f'{helpers.utils.TESTFILES_DIR}/passwordFile.txt', 'a')
var_10.write(f'm00e_msg0d={mod_9.b64encode(var_9)}\n')
var_2 += f"msg000002 msg0d '{helpers.utils.escape_for_html(var_7.decode('utf-8'))}' msg007 ods msg008."
var_10.close()
return var_2