mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-21 12:13:17 +00:00
GitBook: [master] one page modified
This commit is contained in:
parent
2017181bc5
commit
6e24e80658
1 changed files with 2 additions and 0 deletions
|
@ -771,7 +771,9 @@ In the following example we are going to take all the data needed to recreate th
|
|||
|
||||
```python
|
||||
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)
|
||||
|
||||
mydict = {}
|
||||
mydict['__builtins__'] = __builtins__
|
||||
function_type(code_obj, mydict, None, None, None)("secretcode")
|
||||
|
|
Loading…
Reference in a new issue