FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
src/python/idaapi.py at master · idapython/src · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
This repository was archived by the owner on Dec 24, 2025. It is now read-only.
idapython
/
src
Public archive
Notifications
You must be signed in to change notification settings
Fork
298
Star
1.5k
Code
Issues
6
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
src
/
python
/
idaapi.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
47 lines (38 loc) · 1.52 KB
Breadcrumbs
src
/
python
/
idaapi.py
Copy path
File metadata and controls
47 lines (38 loc) · 1.52 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import
sys
${
IMPORTS
}
# guerilla-patch a few unfortunate overrides
from
ida_funcs
import
set_func_start
from
ida_funcs
import
set_func_end
from
ida_dbg
import
dbg_can_query
class
idaapi_Cvar
(
object
):
def
__init__
(
self
):
# prevent endless recursion
object
.
__setattr__
(
self
,
"modules"
,
"${MODULES}"
.
split
(
","
))
object
.
__setattr__
(
self
,
"cvars_entries"
,
dict
())
def
_get_module_cvar
(
self
,
modname
):
mod
=
sys
.
modules
[
"ida_%s"
%
modname
]
cv
,
entries
=
None
,
None
if
hasattr
(
mod
,
"cvar"
):
cv
=
getattr
(
mod
,
"cvar"
)
entries
=
[]
if
cv
:
if
modname
in
self
.
cvars_entries
.
keys
():
entries
=
self
.
cvars_entries
[
modname
]
else
:
# Parse 'str' version of cvar. Although this is braindeader than
# braindead, I'm not sure there's another way to do it.
entries_s
=
str
(
cv
)
entries
=
entries_s
[
1
:
len
(
entries_s
)
-
1
].
split
(
", "
)
self
.
cvars_entries
[
modname
]
=
entries
return
cv
,
entries
def
__getattr__
(
self
,
attr
):
for
mod
in
self
.
modules
:
cv
,
entries
=
self
.
_get_module_cvar
(
mod
)
if
cv
and
attr
in
entries
:
return
getattr
(
cv
,
attr
)
def
__setattr__
(
self
,
attr
,
value
):
for
mod
in
self
.
modules
:
cv
,
entries
=
self
.
_get_module_cvar
(
mod
)
if
cv
and
attr
in
entries
:
setattr
(
cv
,
attr
,
value
)
cvar
=
idaapi_Cvar
()
Back
|
FazBrowse Home
|
New Git URL