Commit Graph
30 Commits
Author SHA1 Message Date
pancake 6d0fbec267 Minor fixes to publish r2papi-python 2024-01-10 17:20:33 +01:00
pancake 7f10642007 Move the python CI from travis to GHA
* setup.py fails to install the module because of py3 changes
2022-12-28 21:58:02 +01:00
Quim 6aa55c7ee7 Fix function name test 2020-03-12 20:26:13 +01:00
Quim 7e12bac435 Fix Travis CI 2020-03-03 11:46:43 +01:00
Quim 6ea5e56225 Cleanup 'function' stuff 2020-03-02 09:56:50 +01:00
Quim 963eac590e Add agfw command, create graph images from functions 2020-02-28 17:17:07 +01:00
Quim 44e86697a2 Add debruijn 2020-02-28 15:56:41 +01:00
Quim 84f629f5c2 Fix tests 2020-02-27 11:56:51 +01:00
Quim e26dd37044 Add context manager for R2Api object
As proposed in #14, now it's not necessary to do r.quit() at the end of your
script:

 with R2Api('-') as r:
     r.print.hexdump(5)

First implementation, probably it can be improved.
2018-09-12 20:21:26 +02:00
Quim d2c0d0762c String rep for EsilCPU and fix tests
* Now EsilCPU have proper __str__
* registers method is more consistent
* Adapt tests to the last r2 version
2018-09-06 11:09:47 +02:00
Alex Bender f327bcc332 Refactor tests 2018-07-20 18:41:05 +03:00
Quim c5b1d8ed7f Move writeBytes method to Write object. 2018-06-12 22:07:31 +02:00
Quim b6429a81d1 Makefile for tests with coverage. 2018-06-07 21:35:59 +02:00
Quim d892f09a83 Print bytes as a string/bytes object by default 2018-06-06 15:31:04 +02:00
Quim 8aed6998fc Fixing little bugs and extend tests 2018-05-24 10:38:10 +02:00
Quim 58f0e2fc07 Fix Esil eval bug, and add Esil tests.
Still WIP
2018-05-22 22:56:42 +02:00
Quim b0ace05ac2 First implementation of the flags object.
Usage:

 from r2api import R2Api
 r = R2Api('/bin/ls')

 # Get all flags as a json python object (dict)
 r.flags.all()

 r.flags.at(0x100).new('my_flag_name')
 # OR
 r.flags.new('my_flag_name', offset=0x100)

 r.flags.rename('my_flag_name', 'foo')

 r.flags.at(0x100).delete()
 # OR
 r.flags.delete(name='foo')
 # OR
 r.flags.delete(offset=0x100)
2018-05-19 13:46:52 +02:00
Quim 7d039f06d7 Fix bug in curr_seek_addr (R2Base)
- Add test to check this case in the future
2018-05-17 15:53:09 +02:00
Quim 7aa0a79e9e Bug fixes.
- Python3 error when using iteritems in a dict.
- write was a method and also an object in r2api.
- Make and fix tests for this cases.
2018-05-16 21:08:57 +02:00
Quim 45bb503ccf First implementation of the Write class 2018-05-14 21:11:54 +02:00
Quim d7a4c73504 Return proper values type from config __getitem__
And add tests
2018-05-10 09:51:35 +02:00
Quim 5345cadf9d Fix iomap test 2018-05-04 13:18:08 +02:00
Quim 59f14dc4f0 Add Config object.
Example:
>>> from r2api import R2Api
>>> r = R2Api('-')
>>> r.config.asm.bits = 16
>>> r.config.asm.bits
'16'
2018-05-04 13:16:46 +02:00
Quim ad8c912334 Add disasmBytes to Print object
And tests
2018-04-22 12:26:45 +02:00
Quim 166dcc162e Add hexdump to Print object
* Remove redundant code
* Little improvements
* Write tests for hexdump
2018-04-22 00:04:18 +02:00
Quim 6512de7d63 First implementation of Print object
Example:
    from r2api import R2Api
    r = R2Api('/bin/ls')
    # python3 or python2 with print_function
    r.print.at('entry0').bytes(10)
    r.print.at('entry0').disassemble(2)
    # python2
    r._print.at('entry0').bytes(10)
    r._print.at('entry0').disassemble(2)
2018-04-21 00:46:13 +02:00
Quim 0bf8b3c667 Make the code python3 compatible 2018-04-21 00:46:13 +02:00
Quim f37a30a8d2 Added binary file for the tests 2018-04-21 00:46:13 +02:00
Quim 61abafeac3 File and IOMap tests
Little bug fixes in File.close() and IOMap __getattr__
2018-04-21 00:46:13 +02:00
Quim 5b6f5c7c9a First tests 2018-04-21 00:46:13 +02:00