- 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.4 KiB
Python
37 lines
1.4 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_170', methods=['GET'])
|
|
def func_339():
|
|
return func_340()
|
|
|
|
@var_1.route('/route_170', methods=['POST'])
|
|
def func_340():
|
|
var_2 = ''
|
|
var_3 = mod_3.path.split('/')
|
|
var_4 = var_3[1]
|
|
if not var_4:
|
|
var_4 = ''
|
|
import configparser as mod_7
|
|
var_5 = 'm008!'
|
|
var_6 = mod_7.ConfigParser()
|
|
var_6.add_section('msg00000000f')
|
|
var_6.set('msg00000000f', 'm009-78986', 'o-msg0b')
|
|
var_6.set('msg00000000f', 'm00a-78986', var_4)
|
|
var_5 = var_6.get('msg00000000f', 'm00a-78986')
|
|
import base64 as mod_8
|
|
import secrets as mod_9
|
|
from helpers.utils import mysession as mod_10
|
|
var_7 = 'msg00000000000002x'[13:]
|
|
var_8 = f'msg00004{var_7}'
|
|
var_9 = f'msg0000000{var_7}'
|
|
var_10 = mod_8.b64encode(mod_9.token_bytes(32))
|
|
if var_9 in mod_10 and mod_3.cookies.get(var_9) == mod_10[var_9]:
|
|
var_2 += f'msg0007 m00b: {var_8}<br/>'
|
|
else:
|
|
mod_10[var_9] = var_10
|
|
var_2 += f'{var_8} koz m00c msg0000001 m00d msg005:{var_9} msg0c msg0d wz: {mod_10[var_9]}<br/>'
|
|
return var_2
|