mirror of https://github.com/geohot/qira
bugfixes to cython qiradb
This commit is contained in:
parent
a93145f9e6
commit
924f243ccc
|
@ -28,11 +28,11 @@ cdef class PyTrace:
|
|||
ret = {}
|
||||
pagemap = self.t.GetPages()
|
||||
for address,ttype in pagemap:
|
||||
if ttype == PAGE_INSTRUCTION:
|
||||
if ttype & PAGE_INSTRUCTION:
|
||||
ret[address] = "instruction"
|
||||
elif ttype == PAGE_WRITE:
|
||||
elif ttype & PAGE_WRITE:
|
||||
ret[address] = "memory"
|
||||
elif ttype == PAGE_READ:
|
||||
elif ttype & PAGE_READ:
|
||||
ret[address] = "romemory"
|
||||
return ret
|
||||
|
||||
|
@ -47,12 +47,14 @@ cdef class PyTrace:
|
|||
|
||||
def fetch_changes_by_clnum(self, clnum, limit):
|
||||
ret = []
|
||||
if limit == -1:
|
||||
limit = 0
|
||||
its = self.t.FetchChangesByClnum(clnum, limit)
|
||||
for it in its:
|
||||
tl = {"address": it.address,
|
||||
"data": it.data,
|
||||
"clnum": it.clnum,
|
||||
"type": self.t.get_type_from_flags(it.flags),
|
||||
"type": chr(self.t.get_type_from_flags(it.flags)),
|
||||
"size": it.flags & SIZE_MASK}
|
||||
ret.append(tl)
|
||||
return ret
|
||||
|
|
|
@ -2,6 +2,7 @@ capstone==4.0.1
|
|||
certifi==2019.3.9
|
||||
chardet==3.0.4
|
||||
Click==7.0
|
||||
Cython==0.29.6
|
||||
Flask==1.0.2
|
||||
Flask-SocketIO==3.3.2
|
||||
gevent==1.4.0
|
||||
|
|
Loading…
Reference in New Issue