-
Notifications
You must be signed in to change notification settings - Fork 9
/
DeviceSignalConnectCallback.go
79 lines (77 loc) · 2.18 KB
/
DeviceSignalConnectCallback.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package frida_go
import (
"github.com/a97077088/frida-go/cfrida"
)
func device_onSpawnAddedCallBack(o uintptr, rawSpawn uintptr,userdata uintptr) uintptr {
v,ok:=device_onSpawnAddedbackTable.Load(int64(userdata))
if !ok{
return 0
}
h:=v.(DeviceOnSpawnAddedEventFunc)
h(SpawnDetailsFromInst(cfrida.G_object_ref(rawSpawn)))
return 0
}
func device_onSpawnRemovedCallBack(o uintptr, rawSpawn uintptr,userdata uintptr) uintptr {
v,ok:=device_onSpawnRemovedCallbackTable.Load(int64(userdata))
if !ok{
return 0
}
h:=v.(DeviceOnSpawnRemovedEventFunc)
h(SpawnDetailsFromInst(cfrida.G_object_ref(rawSpawn)))
return 0
}
func device_onChildAddedCallBack(o uintptr, rawChild uintptr,userdata uintptr) uintptr {
v,ok:=device_onChildAddedCallbackTable.Load(int64(userdata))
if !ok{
return 0
}
h:=v.(DeviceOnChildAddedEventFunc)
h(ChildDetailsFromInst(cfrida.G_object_ref(rawChild)))
return 0
}
func device_onChildRemovedCallBack(o uintptr, rawChild uintptr,userdata uintptr) uintptr {
v,ok:=deviceManager_onAddedCallbackTable.Load(int64(userdata))
if !ok{
return 0
}
h:=v.(DeviceOnChildRemovedEventFunc)
h(ChildDetailsFromInst(cfrida.G_object_ref(rawChild)))
return 0
}
func device_onProcessCrashedCallBack(o uintptr, rawCrash uintptr,userdata uintptr) uintptr {
v,ok:=device_onProcessCrashedCallbackTable.Load(int64(userdata))
if !ok{
return 0
}
h:=v.(DeviceOnProcessCrashedEventFunc)
h(CrashDetailsFromInst(cfrida.G_object_ref(rawCrash)))
return 0
}
func device_onOutputCallBack(o uintptr,pid uintptr,fd uintptr,rawData uintptr,rawDataSize uintptr,userdata uintptr) uintptr {
v,ok:=device_onOutputCallbackTable.Load(int64(userdata))
if !ok{
return 0
}
h:=v.(DeviceOnOutputEventFunc)
data:=cfrida.CBytesToGoBytes(rawData, int(rawDataSize))
h(data, int(fd), int(pid))
return 0
}
func device_onUninjectedCallBack(o uintptr, id uintptr,userdata uintptr) uintptr {
v,ok:=deviceManager_onAddedCallbackTable.Load(int64(userdata))
if !ok{
return 0
}
h:=v.(DeviceOnUninjectedEventFunc)
h(uint(id))
return 0
}
func device_onLostCallBack(o uintptr,userdata uintptr) uintptr {
v,ok:=device_onLostCallbackTable.Load(int64(userdata))
if !ok{
return 0
}
h:=v.(DeviceOnLostEventFunc)
h()
return 0
}