Skip to content

Commit abc165d

Browse files
committed
added LICENSE and README files
1 parent 88a3499 commit abc165d

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2016 Carnegie Mellon University
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Installing
2+
BAP python bindings
3+
4+
And if you're interested in python bindings, then you can install them using pip:
5+
6+
```bash
7+
$ pip install git+git://github.com/BinaryAnalysisPlatform/bap-python.git
8+
```
9+
10+
11+
# Using
12+
13+
After BAP and python bindings are properly installed, you can start to
14+
use it:
15+
16+
```python
17+
>>> import bap
18+
>>> print '\n'.join(insn.asm for insn in bap.disasm("\x48\x83\xec\x08"))
19+
decl %eax
20+
subl $0x8, %esp
21+
```
22+
23+
A more complex example:
24+
25+
```python
26+
>>> img = bap.image('coreutils_O0_ls')
27+
>>> sym = img.get_symbol('main')
28+
>>> print '\n'.join(insn.asm for insn in bap.disasm(sym))
29+
push {r11, lr}
30+
add r11, sp, #0x4
31+
sub sp, sp, #0xc8
32+
... <snip> ...
33+
```
34+
35+
For more information, read builtin documentation, for example with
36+
`ipython`:
37+
38+
```python
39+
>>> bap?
40+
```
41+
42+
Currently, only disassembler and lifter are exposed via python interface.

0 commit comments

Comments
 (0)