- 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
38 lines
1.3 KiB
Python
38 lines
1.3 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_108', methods=['GET'])
|
|
def func_215():
|
|
return func_216()
|
|
|
|
@var_1.route('/route_108', methods=['POST'])
|
|
def func_216():
|
|
var_2 = ''
|
|
import helpers.utils
|
|
var_3 = ''
|
|
for var_4 in mod_3.headers.keys():
|
|
if var_4.lower() in helpers.utils.commonHeaderNames:
|
|
continue
|
|
if mod_3.headers.get_all(var_4):
|
|
var_3 = var_4
|
|
break
|
|
var_5 = 86
|
|
if 7 * 42 - var_5 > 200:
|
|
var_6 = 'm000_msg000_msg00b_msg001'
|
|
else:
|
|
var_6 = var_3
|
|
import secrets as mod_7
|
|
from helpers.utils import mysession as mod_8
|
|
var_5 = 'msg00000000000001E'[13:]
|
|
var_7 = f'msg0000004{var_5}'
|
|
var_8 = f'msg0000000{var_5}'
|
|
var_9 = str(mod_7.randbelow(2 ** 32))
|
|
if var_8 in mod_8 and mod_3.cookies.get(var_8) == mod_8[var_8]:
|
|
var_2 += f'msg0007 m00b: {var_7}<br/>'
|
|
else:
|
|
mod_8[var_8] = var_9
|
|
var_2 += f'{var_7} koz m00c msg0000001 m00d msg005:{var_8} msg0c msg0d wz: {mod_8[var_8]}<br/>'
|
|
return var_2
|