frida 17.6.2 → 17.7.1
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/package.json +1 -1
- package/releng/deps.toml +21 -2
- 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 +118 -12
- package/src/frida_bindgen/assets/codegen_prototypes.h +3 -0
- package/subprojects/frida-core.wrap +1 -1
package/package.json
CHANGED
package/releng/deps.toml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[dependencies]
|
|
2
|
-
version = "
|
|
2
|
+
version = "20260208"
|
|
3
3
|
bootstrap_version = "20250801"
|
|
4
4
|
|
|
5
5
|
[ninja]
|
|
@@ -102,6 +102,15 @@ dependencies = [
|
|
|
102
102
|
""" }
|
|
103
103
|
]
|
|
104
104
|
|
|
105
|
+
[elfutils]
|
|
106
|
+
when = "machine.os in {'linux', 'android'}"
|
|
107
|
+
name = "elfutils"
|
|
108
|
+
version = "1284bbc128473aea220337685985d465607fbac8"
|
|
109
|
+
url = "https://github.com/frida/elfutils.git"
|
|
110
|
+
dependencies = [
|
|
111
|
+
"zlib",
|
|
112
|
+
]
|
|
113
|
+
|
|
105
114
|
[libdwarf]
|
|
106
115
|
when = "machine.os in {'linux', 'android', 'freebsd', 'qnx'}"
|
|
107
116
|
name = "libdwarf"
|
|
@@ -111,6 +120,16 @@ options = [
|
|
|
111
120
|
"-Ddecompression=false",
|
|
112
121
|
]
|
|
113
122
|
|
|
123
|
+
[libbpf]
|
|
124
|
+
when = "machine.os in {'linux', 'android'}"
|
|
125
|
+
name = "libbpf"
|
|
126
|
+
version = "6c8d0d00a122fe126b7a3094f0785340128506f5"
|
|
127
|
+
url = "https://github.com/frida/libbpf.git"
|
|
128
|
+
dependencies = [
|
|
129
|
+
"elfutils",
|
|
130
|
+
"zlib",
|
|
131
|
+
]
|
|
132
|
+
|
|
114
133
|
[xz]
|
|
115
134
|
when = "machine.os != 'none'"
|
|
116
135
|
name = "XZ Utils"
|
|
@@ -334,7 +353,7 @@ dependencies = [
|
|
|
334
353
|
|
|
335
354
|
[capstone]
|
|
336
355
|
name = "Capstone"
|
|
337
|
-
version = "
|
|
356
|
+
version = "fecd93b6e54c0a1df285841620192ffff916a031"
|
|
338
357
|
url = "https://github.com/frida/capstone.git"
|
|
339
358
|
options = [
|
|
340
359
|
"-Darchs=all",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -157,6 +157,24 @@ fdn_uint_to_value (napi_env env,
|
|
|
157
157
|
return result;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
static napi_value
|
|
161
|
+
fdn_int8_to_value (napi_env env,
|
|
162
|
+
gint8 i)
|
|
163
|
+
{
|
|
164
|
+
napi_value result;
|
|
165
|
+
napi_create_int32 (env, i, &result);
|
|
166
|
+
return result;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
static napi_value
|
|
170
|
+
fdn_int16_to_value (napi_env env,
|
|
171
|
+
gint16 i)
|
|
172
|
+
{
|
|
173
|
+
napi_value result;
|
|
174
|
+
napi_create_int32 (env, i, &result);
|
|
175
|
+
return result;
|
|
176
|
+
}
|
|
177
|
+
|
|
160
178
|
static gboolean
|
|
161
179
|
fdn_uint16_from_value (napi_env env,
|
|
162
180
|
napi_value value,
|
|
@@ -187,6 +205,15 @@ fdn_uint16_to_value (napi_env env,
|
|
|
187
205
|
return fdn_uint32_to_value (env, u);
|
|
188
206
|
}
|
|
189
207
|
|
|
208
|
+
static napi_value
|
|
209
|
+
fdn_int32_to_value (napi_env env,
|
|
210
|
+
gint32 i)
|
|
211
|
+
{
|
|
212
|
+
napi_value result;
|
|
213
|
+
napi_create_int32 (env, i, &result);
|
|
214
|
+
return result;
|
|
215
|
+
}
|
|
216
|
+
|
|
190
217
|
static napi_value
|
|
191
218
|
fdn_uint32_to_value (napi_env env,
|
|
192
219
|
guint32 u)
|
|
@@ -221,16 +248,35 @@ fdn_int64_to_value (napi_env env,
|
|
|
221
248
|
gint64 i)
|
|
222
249
|
{
|
|
223
250
|
napi_value result;
|
|
224
|
-
|
|
251
|
+
napi_create_bigint_int64 (env, i, &result);
|
|
225
252
|
return result;
|
|
226
253
|
}
|
|
227
254
|
|
|
255
|
+
static gboolean
|
|
256
|
+
fdn_uint64_from_value (napi_env env,
|
|
257
|
+
napi_value value,
|
|
258
|
+
guint64 * u)
|
|
259
|
+
{
|
|
260
|
+
bool lossless;
|
|
261
|
+
|
|
262
|
+
if (napi_get_value_bigint_uint64 (env, value, u, &lossless) != napi_ok)
|
|
263
|
+
goto invalid_argument;
|
|
264
|
+
|
|
265
|
+
return TRUE;
|
|
266
|
+
|
|
267
|
+
invalid_argument:
|
|
268
|
+
{
|
|
269
|
+
napi_throw_error (env, NULL, "expected an unsigned BigInt");
|
|
270
|
+
return FALSE;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
228
274
|
static napi_value
|
|
229
275
|
fdn_uint64_to_value (napi_env env,
|
|
230
276
|
guint64 u)
|
|
231
277
|
{
|
|
232
278
|
napi_value result;
|
|
233
|
-
|
|
279
|
+
napi_create_bigint_uint64 (env, u, &result);
|
|
234
280
|
return result;
|
|
235
281
|
}
|
|
236
282
|
|
|
@@ -503,7 +549,7 @@ fdn_vardict_from_value (napi_env env,
|
|
|
503
549
|
if (!fdn_variant_from_value (env, js_val, &val))
|
|
504
550
|
goto propagate_error;
|
|
505
551
|
|
|
506
|
-
g_hash_table_insert (dict, g_steal_pointer (&key),
|
|
552
|
+
g_hash_table_insert (dict, g_steal_pointer (&key), val);
|
|
507
553
|
}
|
|
508
554
|
|
|
509
555
|
*vardict = dict;
|
|
@@ -564,7 +610,7 @@ fdn_variant_from_value (napi_env env,
|
|
|
564
610
|
if (!fdn_boolean_from_value (env, value, &b))
|
|
565
611
|
return FALSE;
|
|
566
612
|
|
|
567
|
-
*variant = g_variant_new_boolean (b);
|
|
613
|
+
*variant = g_variant_ref_sink (g_variant_new_boolean (b));
|
|
568
614
|
return TRUE;
|
|
569
615
|
}
|
|
570
616
|
case napi_number:
|
|
@@ -574,7 +620,7 @@ fdn_variant_from_value (napi_env env,
|
|
|
574
620
|
if (!fdn_int64_from_value (env, value, &i))
|
|
575
621
|
return FALSE;
|
|
576
622
|
|
|
577
|
-
*variant = g_variant_new_int64 (i);
|
|
623
|
+
*variant = g_variant_ref_sink (g_variant_new_int64 (i));
|
|
578
624
|
return TRUE;
|
|
579
625
|
}
|
|
580
626
|
case napi_string:
|
|
@@ -584,7 +630,7 @@ fdn_variant_from_value (napi_env env,
|
|
|
584
630
|
if (!fdn_utf8_from_value (env, value, &str))
|
|
585
631
|
return FALSE;
|
|
586
632
|
|
|
587
|
-
*variant = g_variant_new_take_string (str);
|
|
633
|
+
*variant = g_variant_ref_sink (g_variant_new_take_string (str));
|
|
588
634
|
return TRUE;
|
|
589
635
|
}
|
|
590
636
|
case napi_object:
|
|
@@ -606,7 +652,7 @@ fdn_variant_from_value (napi_env env,
|
|
|
606
652
|
return FALSE;
|
|
607
653
|
|
|
608
654
|
copy = g_memdup2 (data, size);
|
|
609
|
-
*variant = g_variant_new_from_data (G_VARIANT_TYPE_BYTESTRING, copy, size, TRUE, g_free, copy);
|
|
655
|
+
*variant = g_variant_ref_sink (g_variant_new_from_data (G_VARIANT_TYPE_BYTESTRING, copy, size, TRUE, g_free, copy));
|
|
610
656
|
return TRUE;
|
|
611
657
|
}
|
|
612
658
|
|
|
@@ -652,7 +698,7 @@ fdn_variant_from_value (napi_env env,
|
|
|
652
698
|
if (!fdn_int64_from_value (env, second, &i))
|
|
653
699
|
return FALSE;
|
|
654
700
|
|
|
655
|
-
val = g_variant_new_uint64 ((guint64) i);
|
|
701
|
+
val = g_variant_ref_sink (g_variant_new_uint64 ((guint64) i));
|
|
656
702
|
}
|
|
657
703
|
else if (!fdn_variant_from_value (env, second, &val))
|
|
658
704
|
{
|
|
@@ -662,7 +708,10 @@ fdn_variant_from_value (napi_env env,
|
|
|
662
708
|
t[0] = g_variant_new_take_string (type);
|
|
663
709
|
t[1] = val;
|
|
664
710
|
|
|
665
|
-
*variant = g_variant_new_tuple (t, G_N_ELEMENTS (t));
|
|
711
|
+
*variant = g_variant_ref_sink (g_variant_new_tuple (t, G_N_ELEMENTS (t)));
|
|
712
|
+
|
|
713
|
+
g_variant_unref (val);
|
|
714
|
+
|
|
666
715
|
return TRUE;
|
|
667
716
|
}
|
|
668
717
|
}
|
|
@@ -687,9 +736,11 @@ fdn_variant_from_value (napi_env env,
|
|
|
687
736
|
}
|
|
688
737
|
|
|
689
738
|
g_variant_builder_add (&builder, "v", v);
|
|
739
|
+
|
|
740
|
+
g_variant_unref (v);
|
|
690
741
|
}
|
|
691
742
|
|
|
692
|
-
*variant = g_variant_builder_end (&builder);
|
|
743
|
+
*variant = g_variant_ref_sink (g_variant_builder_end (&builder));
|
|
693
744
|
return TRUE;
|
|
694
745
|
}
|
|
695
746
|
|
|
@@ -727,10 +778,22 @@ fdn_variant_from_value (napi_env env,
|
|
|
727
778
|
}
|
|
728
779
|
|
|
729
780
|
g_variant_builder_add (&builder, "{sv}", key_str, v);
|
|
781
|
+
|
|
782
|
+
g_variant_unref (v);
|
|
730
783
|
g_free (key_str);
|
|
731
784
|
}
|
|
732
785
|
|
|
733
|
-
*variant = g_variant_builder_end (&builder);
|
|
786
|
+
*variant = g_variant_ref_sink (g_variant_builder_end (&builder));
|
|
787
|
+
return TRUE;
|
|
788
|
+
}
|
|
789
|
+
case napi_bigint:
|
|
790
|
+
{
|
|
791
|
+
guint64 u;
|
|
792
|
+
|
|
793
|
+
if (!fdn_uint64_from_value (env, value, &u))
|
|
794
|
+
return FALSE;
|
|
795
|
+
|
|
796
|
+
*variant = g_variant_ref_sink (g_variant_new_uint64 (u));
|
|
734
797
|
return TRUE;
|
|
735
798
|
}
|
|
736
799
|
default:
|
|
@@ -754,6 +817,16 @@ fdn_variant_to_value (napi_env env,
|
|
|
754
817
|
const gchar * str = g_variant_get_string (variant, NULL);
|
|
755
818
|
return fdn_utf8_to_value (env, str);
|
|
756
819
|
}
|
|
820
|
+
case G_VARIANT_CLASS_BYTE:
|
|
821
|
+
return fdn_int8_to_value (env, g_variant_get_byte (variant));
|
|
822
|
+
case G_VARIANT_CLASS_INT16:
|
|
823
|
+
return fdn_int16_to_value (env, g_variant_get_int16 (variant));
|
|
824
|
+
case G_VARIANT_CLASS_UINT16:
|
|
825
|
+
return fdn_uint16_to_value (env, g_variant_get_uint16 (variant));
|
|
826
|
+
case G_VARIANT_CLASS_INT32:
|
|
827
|
+
return fdn_int32_to_value (env, g_variant_get_int32 (variant));
|
|
828
|
+
case G_VARIANT_CLASS_UINT32:
|
|
829
|
+
return fdn_uint32_to_value (env, g_variant_get_uint32 (variant));
|
|
757
830
|
case G_VARIANT_CLASS_INT64:
|
|
758
831
|
return fdn_int64_to_value (env, g_variant_get_int64 (variant));
|
|
759
832
|
case G_VARIANT_CLASS_UINT64:
|
|
@@ -819,8 +892,41 @@ fdn_variant_to_value (napi_env env,
|
|
|
819
892
|
|
|
820
893
|
break;
|
|
821
894
|
case G_VARIANT_CLASS_TUPLE:
|
|
822
|
-
|
|
895
|
+
{
|
|
896
|
+
napi_value array;
|
|
897
|
+
GVariantIter iter;
|
|
898
|
+
uint32_t i;
|
|
899
|
+
GVariant * child;
|
|
900
|
+
|
|
901
|
+
if (g_variant_n_children (variant) == 0)
|
|
902
|
+
{
|
|
903
|
+
napi_get_undefined (env, &result);
|
|
904
|
+
return result;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
napi_create_array (env, &array);
|
|
908
|
+
|
|
909
|
+
g_variant_iter_init (&iter, variant);
|
|
910
|
+
i = 0;
|
|
911
|
+
while ((child = g_variant_iter_next_value (&iter)) != NULL)
|
|
912
|
+
{
|
|
913
|
+
napi_value element = fdn_variant_to_value (env, child);
|
|
914
|
+
napi_set_element (env, array, i++, element);
|
|
915
|
+
g_variant_unref (child);
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
return array;
|
|
919
|
+
}
|
|
920
|
+
case G_VARIANT_CLASS_VARIANT:
|
|
921
|
+
{
|
|
922
|
+
GVariant * inner;
|
|
923
|
+
|
|
924
|
+
inner = g_variant_get_variant (variant);
|
|
925
|
+
result = fdn_variant_to_value (env, inner);
|
|
926
|
+
g_variant_unref (inner);
|
|
927
|
+
|
|
823
928
|
return result;
|
|
929
|
+
}
|
|
824
930
|
default:
|
|
825
931
|
break;
|
|
826
932
|
}
|
|
@@ -11,8 +11,11 @@ static gboolean fdn_int_from_value (napi_env env, napi_value value, gint * i);
|
|
|
11
11
|
static napi_value fdn_int_to_value (napi_env env, gint i);
|
|
12
12
|
static gboolean fdn_uint_from_value (napi_env env, napi_value value, guint * u);
|
|
13
13
|
static napi_value fdn_uint_to_value (napi_env env, guint u);
|
|
14
|
+
static napi_value fdn_int8_to_value (napi_env env, gint8 i);
|
|
15
|
+
static napi_value fdn_int16_to_value (napi_env env, gint16 i);
|
|
14
16
|
static gboolean fdn_uint16_from_value (napi_env env, napi_value value, guint16 * u);
|
|
15
17
|
static napi_value fdn_uint16_to_value (napi_env env, guint16 u);
|
|
18
|
+
static napi_value fdn_int32_to_value (napi_env env, gint32 i);
|
|
16
19
|
static napi_value fdn_uint32_to_value (napi_env env, guint32 u);
|
|
17
20
|
static gboolean fdn_int64_from_value (napi_env env, napi_value value, gint64 * i);
|
|
18
21
|
static napi_value fdn_int64_to_value (napi_env env, gint64 i);
|