GitBook: [master] one page modified

This commit is contained in:
CPol 2021-10-06 15:45:31 +00:00 committed by gitbook-bot
parent 2017181bc5
commit 6e24e80658
No known key found for this signature in database
GPG key ID: 07D2180C7B12D0FF

View file

@ -771,7 +771,9 @@ In the following example we are going to take all the data needed to recreate th
```python ```python
fc = get_flag.__code__ fc = get_flag.__code__
# In a real situation the values like fc.co_argcount are the ones you need to leak
code_obj = code_type(fc.co_argcount, fc.co_kwonlyargcount, fc.co_nlocals, fc.co_stacksize, fc.co_flags, fc.co_code, fc.co_consts, fc.co_names, fc.co_varnames, fc.co_filename, fc.co_name, fc.co_firstlineno, fc.co_lnotab, cellvars=fc.co_cellvars, freevars=fc.co_freevars) code_obj = code_type(fc.co_argcount, fc.co_kwonlyargcount, fc.co_nlocals, fc.co_stacksize, fc.co_flags, fc.co_code, fc.co_consts, fc.co_names, fc.co_varnames, fc.co_filename, fc.co_name, fc.co_firstlineno, fc.co_lnotab, cellvars=fc.co_cellvars, freevars=fc.co_freevars)
mydict = {} mydict = {}
mydict['__builtins__'] = __builtins__ mydict['__builtins__'] = __builtins__
function_type(code_obj, mydict, None, None, None)("secretcode") function_type(code_obj, mydict, None, None, None)("secretcode")