problem
Traceback (most recent call last):
File "ot.py", line 16, in <module>
sys_addr=d.lookup('system','libc')
File "/usr/local/lib/python3.8/dist-packages/pwnlib/dynelf.py", line 582, in lookup
result = e.symbols[symb]
KeyError: b'system'
This is a problem that python3 is incompatible with dynelf modules. The biggest difference between python3 and python2 (PWN) is that the bytes and STR types are not common. Therefore, for scripts that can run in python2, the problem of type conversion must be considered in python3. This is also the reason for the error reporting in dynelf
Solution:
vim /usr/local/lib/python3.8/dist-packages/pwnlib/dynelf.py
Find the dynelf.py file, find the error line, and modify the source code
result = e.symbols[symb]
by
result = e.symbols[symb.decode()]
Fixed
Read More:
- [Solved] Keras Error: KeyError: ‘accuracy‘, KeyError: ‘val_acc‘, KeyError: ‘acc‘
- [Solved] vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in render: “TypeError: Cannot read property ‘length‘
- [Solved] os.py“, line 725, in __getitem__ raise KeyError(key) from None KeyError: ‘PATH‘
- [Solved] kubeflow pipeline visualization component Error: WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager…
- Win10 System migrate and restart error 0xc000000e [How to Solve]
- Failed to remove multipath map 320b508ca45022b80 [How to Solve]
- [Solved] Nginx Certificate Fill Path Error: SSL: error:0200107B:system library:fopen:Unknown error:fopen
- [Solved] Leetcode Error: AddressSanitizer: SEGV on unknown address 0x55eb765425b8 (pc 0x55eb76542b86 bp 0x7ffd1bd2
- [Solved] Error: error C2601: ‘b‘ : local function definitions are illegal error C2063: ‘b‘ : not a function
- [Solved] C++ Error: Undefined symbols for architecture x86_64:
- Clickhouse error: XXXX.XXXX_local20211009 (8fdb18e9-bb4c-42d8-8fdb-18e9bb4c02d8): auto…
- QSP License error: Submit failed! Message: ERROR -Locator 304511e2e493 is already associated to another license
- How to Fix KeyError: ‘plotly_domain’
- [Solved] QT error: //usr/local/lib/libvtkCommonCore-9.1.so.1: error adding symbols: DSO missing from command
- Preprocessor Symbols setting error: error: redefinition of enumerator
- android remount of /system failed: Read-only file system [How to Solve]
- Mybatis Error: Result Maps collection already contains value
- [Solved] PYNQ load bit error: KeyError: ‘interrupts‘
- error LNK2019: Unresolvable external symbols “__declspec(dllimport) public: int __thiscall QString::toWCharArray(wchar_t
- Python3: Str.format Keyerror Solution for incoming parameter error