frida 16.7.13 → 16.7.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -10
- package/build/BSDmakefile +6 -0
- package/build/Makefile +10 -0
- package/build/src/frida.d.ts +364 -0
- package/build/src/frida.js +962 -0
- package/build/src/frida_binding.d.ts +938 -0
- package/meson.build +34 -67
- package/package.json +30 -20
- package/scripts/fetch-abi-bits.py +15 -65
- package/scripts/install.js +5 -4
- package/src/addon.def +3 -0
- package/src/addon.symbols +2 -1
- package/src/addon.version +4 -0
- package/src/frida_bindgen/__init__.py +0 -0
- package/src/frida_bindgen/__main__.py +4 -0
- package/src/frida_bindgen/__pycache__/__init__.cpython-312.pyc +0 -0
- package/src/frida_bindgen/__pycache__/__main__.cpython-312.pyc +0 -0
- package/src/frida_bindgen/__pycache__/cli.cpython-312.pyc +0 -0
- package/src/frida_bindgen/__pycache__/codegen.cpython-312.pyc +0 -0
- package/src/frida_bindgen/__pycache__/customization.cpython-312.pyc +0 -0
- package/src/frida_bindgen/__pycache__/loader.cpython-312.pyc +0 -0
- package/src/frida_bindgen/__pycache__/model.cpython-312.pyc +0 -0
- package/src/frida_bindgen/assets/codegen_helpers.c +1970 -0
- package/src/frida_bindgen/assets/codegen_helpers.ts +100 -0
- package/src/frida_bindgen/assets/codegen_prototypes.h +78 -0
- package/src/frida_bindgen/assets/codegen_types.h +57 -0
- package/src/frida_bindgen/assets/customization_facade.exports +13 -0
- package/src/frida_bindgen/assets/customization_facade.ts +157 -0
- package/src/frida_bindgen/assets/customization_helpers.imports +2 -0
- package/src/frida_bindgen/assets/customization_helpers.ts +396 -0
- package/src/frida_bindgen/cli.py +96 -0
- package/src/frida_bindgen/codegen.py +2233 -0
- package/src/frida_bindgen/customization.py +924 -0
- package/src/frida_bindgen/loader.py +60 -0
- package/src/frida_bindgen/model.py +1357 -0
- package/src/meson.build +92 -27
- package/{lib/build.py → src/tsc.py} +12 -12
- package/src/win_delay_load_hook.c +56 -0
- package/subprojects/frida-core.wrap +1 -1
- package/test/data/index.ts +2 -2
- package/test/device.ts +1 -2
- package/test/device_manager.ts +1 -2
- package/test/labrat.ts +2 -2
- package/test/script.ts +12 -12
- package/test/session.ts +3 -3
- package/tsconfig.json +6 -11
- package/dist/application.d.ts +0 -81
- package/dist/application.js +0 -2
- package/dist/authentication.d.ts +0 -3
- package/dist/authentication.js +0 -2
- package/dist/bus.d.ts +0 -16
- package/dist/bus.js +0 -23
- package/dist/cancellable.d.ts +0 -15
- package/dist/cancellable.js +0 -41
- package/dist/child.d.ts +0 -16
- package/dist/child.js +0 -9
- package/dist/crash.d.ts +0 -10
- package/dist/crash.js +0 -2
- package/dist/device.d.ts +0 -156
- package/dist/device.js +0 -188
- package/dist/device_manager.d.ts +0 -25
- package/dist/device_manager.js +0 -42
- package/dist/endpoint_parameters.d.ts +0 -26
- package/dist/endpoint_parameters.js +0 -24
- package/dist/icon.d.ts +0 -14
- package/dist/icon.js +0 -2
- package/dist/index.d.ts +0 -161
- package/dist/index.js +0 -170
- package/dist/iostream.d.ts +0 -13
- package/dist/iostream.js +0 -73
- package/dist/native.d.ts +0 -1
- package/dist/native.js +0 -11
- package/dist/portal_membership.d.ts +0 -6
- package/dist/portal_membership.js +0 -12
- package/dist/portal_service.d.ts +0 -48
- package/dist/portal_service.js +0 -52
- package/dist/process.d.ts +0 -47
- package/dist/process.js +0 -2
- package/dist/relay.d.ts +0 -22
- package/dist/relay.js +0 -32
- package/dist/script.d.ts +0 -70
- package/dist/script.js +0 -266
- package/dist/service.d.ts +0 -16
- package/dist/service.js +0 -26
- package/dist/session.d.ts +0 -45
- package/dist/session.js +0 -73
- package/dist/signals.d.ts +0 -20
- package/dist/signals.js +0 -40
- package/dist/socket_address.d.ts +0 -25
- package/dist/socket_address.js +0 -2
- package/dist/spawn.d.ts +0 -4
- package/dist/spawn.js +0 -2
- package/dist/system_parameters.d.ts +0 -84
- package/dist/system_parameters.js +0 -2
- package/lib/application.ts +0 -98
- package/lib/authentication.ts +0 -3
- package/lib/bus.ts +0 -30
- package/lib/cancellable.ts +0 -48
- package/lib/child.ts +0 -15
- package/lib/crash.ts +0 -11
- package/lib/device.ts +0 -331
- package/lib/device_manager.ts +0 -69
- package/lib/endpoint_parameters.ts +0 -56
- package/lib/icon.ts +0 -15
- package/lib/index.ts +0 -316
- package/lib/iostream.ts +0 -78
- package/lib/meson.build +0 -53
- package/lib/native.ts +0 -9
- package/lib/portal_membership.ts +0 -10
- package/lib/portal_service.ts +0 -105
- package/lib/process.ts +0 -57
- package/lib/relay.ts +0 -44
- package/lib/script.ts +0 -361
- package/lib/service.ts +0 -34
- package/lib/session.ts +0 -113
- package/lib/signals.ts +0 -45
- package/lib/socket_address.ts +0 -35
- package/lib/spawn.ts +0 -4
- package/lib/system_parameters.ts +0 -103
- package/meson.options +0 -11
- package/src/addon.cc +0 -78
- package/src/application.cc +0 -148
- package/src/application.h +0 -31
- package/src/authentication.cc +0 -174
- package/src/authentication.h +0 -24
- package/src/bus.cc +0 -167
- package/src/bus.h +0 -33
- package/src/cancellable.cc +0 -117
- package/src/cancellable.h +0 -31
- package/src/child.cc +0 -150
- package/src/child.h +0 -32
- package/src/crash.cc +0 -122
- package/src/crash.h +0 -30
- package/src/device.cc +0 -1350
- package/src/device.h +0 -56
- package/src/device_manager.cc +0 -362
- package/src/device_manager.h +0 -35
- package/src/endpoint_parameters.cc +0 -171
- package/src/endpoint_parameters.h +0 -28
- package/src/glib_context.cc +0 -62
- package/src/glib_context.h +0 -29
- package/src/glib_object.cc +0 -25
- package/src/glib_object.h +0 -37
- package/src/iostream.cc +0 -243
- package/src/iostream.h +0 -30
- package/src/operation.h +0 -94
- package/src/portal_membership.cc +0 -100
- package/src/portal_membership.h +0 -26
- package/src/portal_service.cc +0 -401
- package/src/portal_service.h +0 -40
- package/src/process.cc +0 -135
- package/src/process.h +0 -30
- package/src/relay.cc +0 -139
- package/src/relay.h +0 -31
- package/src/runtime.cc +0 -568
- package/src/runtime.h +0 -69
- package/src/script.cc +0 -301
- package/src/script.h +0 -36
- package/src/service.cc +0 -224
- package/src/service.h +0 -36
- package/src/session.cc +0 -860
- package/src/session.h +0 -42
- package/src/signals.cc +0 -334
- package/src/signals.h +0 -47
- package/src/spawn.cc +0 -95
- package/src/spawn.h +0 -27
- package/src/usage_monitor.h +0 -117
- package/src/uv_context.cc +0 -118
- package/src/uv_context.h +0 -40
- package/src/win_delay_load_hook.cc +0 -63
- package/subprojects/nan.wrap +0 -9
- package/subprojects/packagefiles/nan.patch +0 -13
package/src/relay.cc
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
#include "relay.h"
|
|
2
|
-
|
|
3
|
-
#define RELAY_DATA_TEMPLATE "relay:tpl"
|
|
4
|
-
|
|
5
|
-
using v8::DEFAULT;
|
|
6
|
-
using v8::Function;
|
|
7
|
-
using v8::FunctionTemplate;
|
|
8
|
-
using v8::Isolate;
|
|
9
|
-
using v8::Local;
|
|
10
|
-
using v8::Object;
|
|
11
|
-
using v8::Persistent;
|
|
12
|
-
using v8::ReadOnly;
|
|
13
|
-
using v8::Value;
|
|
14
|
-
|
|
15
|
-
namespace frida {
|
|
16
|
-
|
|
17
|
-
Relay::Relay(FridaRelay* handle, Runtime* runtime)
|
|
18
|
-
: GLibObject(handle, runtime) {
|
|
19
|
-
g_object_ref(handle_);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
Relay::~Relay() {
|
|
23
|
-
g_object_unref(handle_);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
void Relay::Init(Local<Object> exports, Runtime* runtime) {
|
|
27
|
-
auto isolate = Isolate::GetCurrent();
|
|
28
|
-
|
|
29
|
-
auto name = Nan::New("Relay").ToLocalChecked();
|
|
30
|
-
auto tpl = CreateTemplate(name, Relay::New, runtime);
|
|
31
|
-
|
|
32
|
-
auto instance_tpl = tpl->InstanceTemplate();
|
|
33
|
-
auto data = Local<Value>();
|
|
34
|
-
Nan::SetAccessor(instance_tpl, Nan::New("kind").ToLocalChecked(),
|
|
35
|
-
GetKind, 0, data, DEFAULT, ReadOnly);
|
|
36
|
-
Nan::SetAccessor(instance_tpl, Nan::New("password").ToLocalChecked(),
|
|
37
|
-
GetPassword, 0, data, DEFAULT, ReadOnly);
|
|
38
|
-
Nan::SetAccessor(instance_tpl, Nan::New("username").ToLocalChecked(),
|
|
39
|
-
GetUsername, 0, data, DEFAULT, ReadOnly);
|
|
40
|
-
Nan::SetAccessor(instance_tpl, Nan::New("address").ToLocalChecked(),
|
|
41
|
-
GetAddress, 0, data, DEFAULT, ReadOnly);
|
|
42
|
-
|
|
43
|
-
auto ctor = Nan::GetFunction(tpl).ToLocalChecked();
|
|
44
|
-
Nan::Set(exports, name, ctor);
|
|
45
|
-
runtime->SetDataPointer(RELAY_DATA_TEMPLATE,
|
|
46
|
-
new Persistent<FunctionTemplate>(isolate, tpl));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
FridaRelay* Relay::TryParse(Local<Value> value, Runtime* runtime) {
|
|
50
|
-
if (!value->IsObject())
|
|
51
|
-
return NULL;
|
|
52
|
-
|
|
53
|
-
auto impl = Nan::Get(value.As<Object>(), Nan::New("impl").ToLocalChecked())
|
|
54
|
-
.ToLocalChecked();
|
|
55
|
-
if (!HasInstance(impl, runtime))
|
|
56
|
-
return NULL;
|
|
57
|
-
|
|
58
|
-
return ObjectWrap::Unwrap<Relay>(impl.As<Object>())->GetHandle<FridaRelay>();
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
bool Relay::HasInstance(Local<Value> value, Runtime* runtime) {
|
|
62
|
-
auto tpl = Nan::New<FunctionTemplate>(
|
|
63
|
-
*static_cast<Persistent<FunctionTemplate>*>(
|
|
64
|
-
runtime->GetDataPointer(RELAY_DATA_TEMPLATE)));
|
|
65
|
-
return tpl->HasInstance(value);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
NAN_METHOD(Relay::New) {
|
|
69
|
-
if (!info.IsConstructCall()) {
|
|
70
|
-
Nan::ThrowError("Use the `new` keyword to create a new instance");
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (info.Length() < 4) {
|
|
75
|
-
Nan::ThrowTypeError("Missing one or more arguments");
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
auto address_value = info[0];
|
|
80
|
-
auto username_value = info[1];
|
|
81
|
-
auto password_value = info[2];
|
|
82
|
-
if (!address_value->IsString() ||
|
|
83
|
-
!username_value->IsString() ||
|
|
84
|
-
!password_value->IsString()) {
|
|
85
|
-
Nan::ThrowTypeError("Bad argument");
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
Nan::Utf8String address(address_value);
|
|
89
|
-
Nan::Utf8String username(username_value);
|
|
90
|
-
Nan::Utf8String password(password_value);
|
|
91
|
-
|
|
92
|
-
FridaRelayKind kind;
|
|
93
|
-
if (!Runtime::ValueToEnum(info[3], FRIDA_TYPE_RELAY_KIND, &kind))
|
|
94
|
-
return;
|
|
95
|
-
|
|
96
|
-
auto runtime = GetRuntimeFromConstructorArgs(info);
|
|
97
|
-
|
|
98
|
-
auto handle = frida_relay_new(*address, *username, *password, kind);
|
|
99
|
-
auto wrapper = new Relay(handle, runtime);
|
|
100
|
-
g_object_unref(handle);
|
|
101
|
-
auto obj = info.This();
|
|
102
|
-
wrapper->Wrap(obj);
|
|
103
|
-
|
|
104
|
-
info.GetReturnValue().Set(obj);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
NAN_PROPERTY_GETTER(Relay::GetAddress) {
|
|
108
|
-
auto handle = ObjectWrap::Unwrap<Relay>(
|
|
109
|
-
info.Holder())->GetHandle<FridaRelay>();
|
|
110
|
-
|
|
111
|
-
info.GetReturnValue().Set(
|
|
112
|
-
Nan::New(frida_relay_get_address(handle)).ToLocalChecked());
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
NAN_PROPERTY_GETTER(Relay::GetUsername) {
|
|
116
|
-
auto handle = ObjectWrap::Unwrap<Relay>(
|
|
117
|
-
info.Holder())->GetHandle<FridaRelay>();
|
|
118
|
-
|
|
119
|
-
info.GetReturnValue().Set(
|
|
120
|
-
Nan::New(frida_relay_get_username(handle)).ToLocalChecked());
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
NAN_PROPERTY_GETTER(Relay::GetPassword) {
|
|
124
|
-
auto handle = ObjectWrap::Unwrap<Relay>(
|
|
125
|
-
info.Holder())->GetHandle<FridaRelay>();
|
|
126
|
-
|
|
127
|
-
info.GetReturnValue().Set(
|
|
128
|
-
Nan::New(frida_relay_get_password(handle)).ToLocalChecked());
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
NAN_PROPERTY_GETTER(Relay::GetKind) {
|
|
132
|
-
auto handle = ObjectWrap::Unwrap<Relay>(
|
|
133
|
-
info.Holder())->GetHandle<FridaRelay>();
|
|
134
|
-
|
|
135
|
-
info.GetReturnValue().Set(Runtime::ValueFromEnum(
|
|
136
|
-
frida_relay_get_kind(handle), FRIDA_TYPE_RELAY_KIND));
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
}
|
package/src/relay.h
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
#ifndef FRIDANODE_RELAY_H
|
|
2
|
-
#define FRIDANODE_RELAY_H
|
|
3
|
-
|
|
4
|
-
#include "glib_object.h"
|
|
5
|
-
|
|
6
|
-
#include <frida-core.h>
|
|
7
|
-
|
|
8
|
-
namespace frida {
|
|
9
|
-
|
|
10
|
-
class Relay : public GLibObject {
|
|
11
|
-
public:
|
|
12
|
-
static void Init(v8::Local<v8::Object> exports, Runtime* runtime);
|
|
13
|
-
|
|
14
|
-
static FridaRelay* TryParse(v8::Local<v8::Value> value, Runtime* runtime);
|
|
15
|
-
static bool HasInstance(v8::Local<v8::Value> value, Runtime* runtime);
|
|
16
|
-
|
|
17
|
-
private:
|
|
18
|
-
explicit Relay(FridaRelay* handle, Runtime* runtime);
|
|
19
|
-
~Relay();
|
|
20
|
-
|
|
21
|
-
static NAN_METHOD(New);
|
|
22
|
-
|
|
23
|
-
static NAN_PROPERTY_GETTER(GetAddress);
|
|
24
|
-
static NAN_PROPERTY_GETTER(GetUsername);
|
|
25
|
-
static NAN_PROPERTY_GETTER(GetPassword);
|
|
26
|
-
static NAN_PROPERTY_GETTER(GetKind);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
#endif
|