-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathChildDetails.go
54 lines (43 loc) · 1.17 KB
/
ChildDetails.go
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
48
49
50
51
52
53
54
package frida_go
import (
"github.com/a97077088/frida-go/cfrida"
"unsafe"
)
type ChildDetails struct {
CObj
}
func (c *ChildDetails) Pid() uint {
return cfrida.Frida_child_get_pid(c.instance)
}
func (c *ChildDetails) ParentPid() uint {
return cfrida.Frida_child_get_parent_pid(c.instance)
}
func (c *ChildDetails) Origin() int {
return cfrida.Frida_child_get_origin(c.instance)
}
func (c *ChildDetails) Identifier() string {
return cfrida.Frida_child_get_identifier(c.instance)
}
func (c *ChildDetails) Path() string {
return cfrida.Frida_child_get_path(c.instance)
}
func (c *ChildDetails) Argv() []string {
return cfrida.Frida_child_get_argv(c.instance)
}
func (c *ChildDetails) Envp() map[string]interface{} {
return cfrida.Frida_child_get_envp(c.instance)
}
func (c *ChildDetails) Free() {
cfrida.G_object_unref(c.instance)
}
// ChildDetailsFromInst
// 新建一个对象来自已经存在的对象实例指针。
//
// Create a new object from an existing object instance pointer.
func ChildDetailsFromInst(inst uintptr) *ChildDetails {
dl:=new(ChildDetails)
dl.instance=inst
dl.ptr= unsafe.Pointer(dl.instance)
setFinalizer(dl, (*ChildDetails).Free)
return dl
}