- 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
36 lines
1.2 KiB
Python
36 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_24', methods=['GET'])
|
|
def func_47():
|
|
return func_48()
|
|
|
|
@var_1.route('/route_24', methods=['POST'])
|
|
def func_48():
|
|
var_2 = ''
|
|
var_3 = mod_3.form.get('msg00000000000000n')
|
|
if not var_3:
|
|
var_3 = ''
|
|
var_4 = ''
|
|
if var_3:
|
|
var_5 = []
|
|
var_5.append('m008')
|
|
var_5.append(var_3)
|
|
var_5.append('msg00005')
|
|
var_5.pop(0)
|
|
var_4 = var_5[0]
|
|
import random as mod_7
|
|
from helpers.utils import mysession as mod_8
|
|
var_6 = 'msg00000000000000n'[13:]
|
|
var_7 = f'msg00000001{var_6}'
|
|
var_8 = f'msg0000000{var_6}'
|
|
var_9 = str(mod_7.SystemRandom().random())[2:]
|
|
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
|