Comments (20)
angr tends to be used from within iPython, and the ability to Ctrl-C analyses is pretty critical. If r2 grabs the interrupt and squashes it, the KeyboardInterrupt won't be thrown in Python and we can't interrupt anything.
from cle.
yeah, that's the native radare2 binding, you probably dont ever want to use those ;) r2pipe is much simpler (it just talks to an instance of radare2 over a pipe via json).
r2pipe has the benefit of actually building.
from cle.
I think it'd be awesome, but unfortunately manpower is limited. We'd love a pull request on this :-)
from cle.
@crowell Ancient thread bump, still interested in this? Came to say the same thing.
from cle.
@Manouchehri i've almost finished an implementation. check back in a day or two.
from cle.
That sounds great, looking forward to trying it out! =D
from cle.
Hey @crowell, could you make sure that the r2 integration doesn't mask SIGINT? In the early days of angr, we used both r2 and IDA to load binaries, and the SIGINT trap really screwed us up...
from cle.
Does angr send sigint to people?
I can see about not catching the signal
On May 18, 2016 4:48 PM, "Yan" [email protected] wrote:
Hey @crowell https://github.com/crowell, could you make sure that the
r2 integration doesn't mask SIGINT? In the early days of angr, we used both
r2 and IDA to load binaries, and the SIGINT trap really screwed us up...—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1 (comment)
from cle.
No, python uses sigint to interrupt operations. The expectation is that whenever ^C happens, a KeyboardInterrupt exception is raised in the python interpreter, propagating all the way up to the user.
It's very disorienting when you press ^C in a python process and nothing happens.
from cle.
(jinks @rhelmot!)
from cle.
It probably makes sense to disable the catching of sigint from all r2pipe
usage tbh as well
On May 18, 2016 4:59 PM, "Yan" [email protected] wrote:
angr tends to be used from within iPython, and the ability to Ctrl-C
analyses is pretty critical. If r2 grabs the interrupt and squashes it, the
KeyboardInterrupt won't be thrown in Python and we can't interrupt anything.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1 (comment)
from cle.
In [2]: import r2pipe
In [3]: s = r2pipe.open('/bin/ls')
In [4]: s.cmd('aaa')
^C---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-4-05dfe4795bad> in <module>()
----> 1 s.cmd('aaa')
/home/jeff/cle/lib/python2.7/site-packages/r2pipe/__init__.pyc in cmd(self, cmd)
213 Returns an string with the results of the command
214 """
--> 215 return self._cmd(cmd)
216
217 def cmdj(self, cmd):
/home/jeff/cle/lib/python2.7/site-packages/r2pipe/__init__.pyc in _cmd_process(self, cmd)
147 out = b''
148 while True:
--> 149 foo = self.process.stdout.read(1)
150 if foo == b'\x00':
151 break
KeyboardInterrupt:
Interrupted
KeyboardInterrupt
In [5]:
anal doesn't capture signint any more it seems.
looks good to you?
from cle.
Looks great :-)
Was there a different set of bindings before? IIRC, we weren't using r2pipe, but somehow using radare directly?
from cle.
Blast from the past, for educational purposes. This is how we were using r2 before, when binary loading was still in angr proper just about two years ago: https://github.com/angr/angr/blob/f8b2e2af0bc7ce62e32a814abf4400d4c252003a/binary.py
from cle.
And here's the change when rhelmot got fed up with SIGINT not working and tracked it down: angr/angr@612003c
from cle.
https://github.com/angr/angr/blob/f8b2e2af0bc7ce62e32a814abf4400d4c252003a/binary.py
That's ancient code...
from cle.
Yeah, it took me a while to even find it :-)
from cle.
any update on this?
from cle.
@trufae As far as I'm aware, the radare2 backend is not in our plan.
from cle.
This issue has been marked as stale
because it has no recent activity. Please comment or add the pinned
tag to prevent this issue from being closed.
from cle.
Related Issues (20)
- Many remote file mappings in elfcore is a pain
- Upgrade the pinned pyxbe version
- No module named 'packaging' on Windows and macOS
- Could not find a version that satisfies the requirement pyvex==9.2.7.dev0 (from cle) HOT 7
- Key Error: 160 when loading ELF binary compiled with gcc 12.1 HOT 14
- ELFCore is not pickle-able HOT 3
- Issues when loading a blob with `load_debug_info=True` HOT 1
- CLE fails to load Android apps if classes referenced in the manifest are not part of the classes.dex HOT 1
- [Request] lazy backend memory reader HOT 19
- `Region.__repr__` throws error if any of the field values are `None`
- wrong offsets for elftools.elf.elffile.GNUNeedVerSection
- Refactor relocation loading to allow loading relocations from external sources HOT 3
- AttributeError when loading a UEFI image
- Fails to load PE binaries with non-utf-8 decodable bytes in section name HOT 8
- Loading a bundle file fails HOT 3
- Loading DWARF fails
- Some ARM-HF PLT stubs identified at wrong address
- CompilationUnit only supports contiguous
- Exception when loading Linux Kernel Module
- R_MIPS_HI16 and R_MIPS_LO16 are wrong HOT 2
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 cle.