Comments (2)
pypcode doesn't understand executable formats and is choking on input it can't decode. You'll need to have a file with some raw executable code in it, or you can write a script to load an ELF and decode it with pypcode library.
from pypcode.
Aha, I see. Thanks a lot! Could I have one more question about printing?
Everytime I run the "block().vex.pp()" using pcode as IR in anger, I will have error as followed:
import angr
p = angr.Project('./Hash_Function_Shift_Folding_Linked_List_clang', engine=angr.engines.UberEnginePcode)
#p.factory.entry_state().block().vex.pp()
Traceback (most recent call last):
File "angr_test.py", line 4, in <module>
p.factory.entry_state().block().vex.pp()
File "/home/muqi/decompile_tool/angr-dev/angr/angr/sim_state.py", line 598, in block
return self.project.factory.block(*args, backup_state=self, **kwargs)
File "/home/muqi/decompile_tool/angr-dev/angr/angr/factory.py", line 311, in block
cross_insn_opt=cross_insn_opt,
File "/home/muqi/decompile_tool/angr-dev/angr/angr/block.py", line 187, in __init__
buffer, _, offset = self._vex_engine._load_bytes(addr - thumb, size, state=backup_state)
ValueError: not enough values to unpack (expected 3, got 2)
I used the latest version of angr and pypcode:
(angr_latest_offiical) muqi@muqi-desktop:~/decompile_tool/some_open_source_projects/test_C_programming/test_muqi/originalclang$ pip list
Package Version
----------------- ------------
ailment 9.0.9166
angr 9.0.9166
archinfo 9.0.9166
bitstring 3.1.7
cachetools 4.2.2
capstone 4.0.2
cffi 1.14.6
claripy 9.0.9166
cle 9.0.9166
CppHeaderParser 2.7.4
decorator 4.4.2
dpkt 1.9.6
future 0.18.2
gitdb 4.0.7
GitPython 3.1.18
itanium-demangler 1.0
mulpyplexer 0.9
nampa 0.1.1
networkx 2.5.1
pefile 2021.5.24
pip 21.2.1
pkg_resources 0.0.0
plumbum 1.7.0
ply 3.11
progressbar2 3.53.1
protobuf 3.17.3
psutil 5.8.0
pycparser 2.20
pyelftools 0.27
pypcode 1.0.2
PySMT 0.9.1.dev137
python-utils 2.5.6
pyvex 9.0.9166
rpyc 5.0.1
setuptools 57.4.0
six 1.16.0
smmap 4.0.0
sortedcontainers 2.4.0
typing-extensions 3.10.0.0
unicorn 1.0.2rc4
wheel 0.36.2
z3-solver 4.8.12.0
and with same command, the old version(angr 9.0.4885 + pypcode 0.0.2) prints good for me.
from pypcode.
Related Issues (20)
- Common registers? HOT 1
- skipping over data? HOT 1
- Seemingly incorrect const size in fs base calculation (x86-64) HOT 3
- Make setting context variables nicer
- Add doc generation
- Add more comprehensive tests
- Update to 10.2, when it comes out HOT 1
- Handle parsing errors more gracefully
- Add CI lint step
- Ship sleigh binary
- Test macOS arm64 builds HOT 1
- Unable to install PyPcode 1.1.0 HOT 6
- Verify loaded library version
- Raise translation exceptions
- Add language lookup function
- Expose AddrSpace details
- Reduce context dependencies
- Fix multithreading
- FreeBSD support
- Update SLEIGH from Ghidra 10.2.3 release
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pypcode.