Rizin
unix-like reverse engineering framework and cli tools
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
b
d
e
h
i
k
n
p
r
s
w
Properties
Events
Related Functions
Files
File List
File Members
All
$
.
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
.
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Events
Friends
Macros
Modules
Pages
ios-syscalls.py
Go to the documentation of this file.
1
import
json
2
3
import
rzpipe
4
5
6
def
chk
(x):
7
if
x[1][
"opcode"
] ==
"svc 0x80"
:
8
name = x[0][
"flags"
][0][8:]
9
sysnum =
int
(x[0][
"opcode"
].split(
" "
)[2], 16)
10
print(
"%d\t%s"
% (sysnum, name))
11
12
13
dev_pid =
"23f88587e12c30376f8ab0b05236798fdfa4e853/4903"
14
15
rz = rzpipe.open(
"frida://"
+ dev_pid)
16
print(
"Importing symbols from libSystem..."
)
17
rz.cmd(
".=!i*"
)
18
rz.cmd(
".=!ie* libSystem.B.dylib"
)
19
print(
"Finding syscalls..."
)
20
funcs = rz.cmd(
"pdj 2 @@f:sym.fun.*"
)
21
22
for
doc
in
funcs.split(
"\n"
):
23
if
len
(doc) > 1:
24
chk
(json.loads(doc))
25
rz.quit()
26
print(
"Thanks for waiting"
)
len
size_t len
Definition:
6502dis.c:15
ios-syscalls.chk
def chk(x)
Definition:
ios-syscalls.py:6
int
static int
Definition:
sfsocketcall.h:114
librz
include
sflib
darwin-arm-64
ios-syscalls.py
Generated by
1.9.1