- 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
37 lines
1.2 KiB
Python
37 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_129', methods=['GET'])
|
|
def func_257():
|
|
return func_258()
|
|
|
|
@var_1.route('/route_129', methods=['POST'])
|
|
def func_258():
|
|
var_2 = ''
|
|
var_3 = mod_3.args.getlist('msg00000000000001X')
|
|
var_4 = ''
|
|
if var_3:
|
|
var_4 = var_3[0]
|
|
var_5 = 'msg0000a'
|
|
if var_4:
|
|
var_6 = []
|
|
var_6.append('m008')
|
|
var_6.append(var_4)
|
|
var_6.append('msg00005')
|
|
var_6.pop(0)
|
|
var_5 = var_6[1]
|
|
import random as mod_7
|
|
from helpers.utils import mysession as mod_8
|
|
var_7 = 'msg00000000000001X'[13:]
|
|
var_8 = f'msg0i{var_7}'
|
|
var_9 = f'msg0000000{var_7}'
|
|
var_10 = str(mod_7.getrandbits(32))
|
|
if var_9 in mod_8 and mod_3.cookies.get(var_9) == mod_8[var_9]:
|
|
var_2 += f'msg0007 m00b: {var_8}<br/>'
|
|
else:
|
|
mod_8[var_9] = var_10
|
|
var_2 += f'{var_8} koz m00c msg0000001 m00d msg005: {var_9} msg0c msg0d wz: {mod_8[var_9]}<br/>'
|
|
return var_2
|