frida 17.0.6 → 17.1.0

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.
@@ -1,7 +1,7 @@
1
- import type { DeviceManager as _DeviceManager, DeviceAddedHandler as _DeviceAddedHandler, DeviceRemovedHandler as _DeviceRemovedHandler, DeviceChangedHandler as _DeviceChangedHandler, Device as _Device, SpawnAddedHandler as _SpawnAddedHandler, SpawnRemovedHandler as _SpawnRemovedHandler, ChildAddedHandler as _ChildAddedHandler, ChildRemovedHandler as _ChildRemovedHandler, ProcessCrashedHandler as _ProcessCrashedHandler, OutputHandler as _OutputHandler, UninjectedHandler as _UninjectedHandler, DeviceLostHandler as _DeviceLostHandler, RemoteDeviceOptions as _RemoteDeviceOptions, Application as _Application, Process as _Process, ProcessMatchOptions as _ProcessMatchOptions, RawSpawnOptions as _RawSpawnOptions, Spawn as _Spawn, Child as _Child, Crash as _Crash, Bus as _Bus, BusDetachedHandler as _BusDetachedHandler, BusMessageHandler as _BusMessageHandler, Service as _Service, ServiceCloseHandler as _ServiceCloseHandler, ServiceMessageHandler as _ServiceMessageHandler, Session as _Session, SessionDetachedHandler as _SessionDetachedHandler, Script as _Script, ScriptDestroyedHandler as _ScriptDestroyedHandler, ScriptMessageHandler as _ScriptMessageHandler, PortalMembership as _PortalMembership, ControlService as _ControlService, ControlServiceOptions as _ControlServiceOptions, PortalService as _PortalService, PortalNodeConnectedHandler as _PortalNodeConnectedHandler, PortalNodeJoinedHandler as _PortalNodeJoinedHandler, PortalNodeLeftHandler as _PortalNodeLeftHandler, PortalNodeDisconnectedHandler as _PortalNodeDisconnectedHandler, PortalControllerConnectedHandler as _PortalControllerConnectedHandler, PortalControllerDisconnectedHandler as _PortalControllerDisconnectedHandler, PortalAuthenticatedHandler as _PortalAuthenticatedHandler, PortalSubscribeHandler as _PortalSubscribeHandler, PortalMessageHandler as _PortalMessageHandler, FileMonitor as _FileMonitor, FileMonitorChangeHandler as _FileMonitorChangeHandler, Compiler as _Compiler, CompilerStartingHandler as _CompilerStartingHandler, CompilerFinishedHandler as _CompilerFinishedHandler, CompilerOutputHandler as _CompilerOutputHandler, CompilerDiagnosticsHandler as _CompilerDiagnosticsHandler, CompilerOptions as _CompilerOptions, BuildOptions as _BuildOptions, WatchOptions as _WatchOptions, StaticAuthenticationService as _StaticAuthenticationService, FrontmostQueryOptions as _FrontmostQueryOptions, ApplicationQueryOptions as _ApplicationQueryOptions, ProcessQueryOptions as _ProcessQueryOptions, SessionOptions as _SessionOptions, ScriptOptions as _ScriptOptions, SnapshotOptions as _SnapshotOptions, PortalOptions as _PortalOptions, PeerOptions as _PeerOptions, Relay as _Relay, EndpointParameters as _EndpointParameters, AuthenticationService as _AuthenticationService, AbstractAuthenticationService as _AbstractAuthenticationService, BaseObject as _BaseObject, Cancellable as _Cancellable, CancelledHandler as _CancelledHandler, IOStream as _IOStream, InputStream as _InputStream, OutputStream as _OutputStream, InetSocketAddress as _InetSocketAddress, InetAddress as _InetAddress, UnixSocketAddress as _UnixSocketAddress, BaseSocketAddress as _BaseSocketAddress, SocketAddressEnumerator as _SocketAddressEnumerator, SocketConnectable as _SocketConnectable, Runtime as _Runtime, DeviceType as _DeviceType, SourceMaps as _SourceMaps, JsCompression as _JsCompression, Realm as _Realm, SessionDetachReason as _SessionDetachReason, Scope as _Scope, Stdio as _Stdio, ChildOrigin as _ChildOrigin, SnapshotTransport as _SnapshotTransport, ScriptRuntime as _ScriptRuntime, RelayKind as _RelayKind, FileMonitorEvent as _FileMonitorEvent, SocketFamily as _SocketFamily, UnixSocketAddressType as _UnixSocketAddressType, TargetProcess as _TargetProcess, ProcessID as _ProcessID, InjecteeID as _InjecteeID, FileDescriptor as _FileDescriptor, ProcessName as _ProcessName, SystemParameters as _SystemParameters, SystemInterface as _SystemInterface, NetworkInterface as _NetworkInterface, CellularInterface as _CellularInterface, SpawnOptions as _SpawnOptions, RelayProperties as _RelayProperties, Message as _Message, MessageType as _MessageType, SendMessage as _SendMessage, ErrorMessage as _ErrorMessage, ScriptLogHandler as _ScriptLogHandler, ScriptExports as _ScriptExports, LogLevel as _LogLevel, EnableDebuggerOptions as _EnableDebuggerOptions, PortalServiceOptions as _PortalServiceOptions, PortalConnectionId as _PortalConnectionId, PortalConnectionTag as _PortalConnectionTag, EndpointParametersSubset as _EndpointParametersSubset, AuthenticationScheme as _AuthenticationScheme, TokenAuthenticationScheme as _TokenAuthenticationScheme, CallbackAuthenticationScheme as _CallbackAuthenticationScheme, AuthenticationCallback as _AuthenticationCallback, AuthenticatedSessionInfo as _AuthenticatedSessionInfo, SocketAddress as _SocketAddress, IPV4SocketAddress as _IPV4SocketAddress, IPV6SocketAddress as _IPV6SocketAddress, AnonymousUnixSocketAddress as _AnonymousUnixSocketAddress, PathUnixSocketAddress as _PathUnixSocketAddress, AbstractUnixSocketAddress as _AbstractUnixSocketAddress, Variant as _Variant, VariantValue as _VariantValue, VariantDict as _VariantDict } from "./frida_binding.d.ts";
1
+ import type { DeviceManager as _DeviceManager, DeviceAddedHandler as _DeviceAddedHandler, DeviceRemovedHandler as _DeviceRemovedHandler, DeviceChangedHandler as _DeviceChangedHandler, Device as _Device, SpawnAddedHandler as _SpawnAddedHandler, SpawnRemovedHandler as _SpawnRemovedHandler, ChildAddedHandler as _ChildAddedHandler, ChildRemovedHandler as _ChildRemovedHandler, ProcessCrashedHandler as _ProcessCrashedHandler, OutputHandler as _OutputHandler, UninjectedHandler as _UninjectedHandler, DeviceLostHandler as _DeviceLostHandler, RemoteDeviceOptions as _RemoteDeviceOptions, Application as _Application, Process as _Process, ProcessMatchOptions as _ProcessMatchOptions, RawSpawnOptions as _RawSpawnOptions, Spawn as _Spawn, Child as _Child, Crash as _Crash, Bus as _Bus, BusDetachedHandler as _BusDetachedHandler, BusMessageHandler as _BusMessageHandler, Service as _Service, ServiceCloseHandler as _ServiceCloseHandler, ServiceMessageHandler as _ServiceMessageHandler, Session as _Session, SessionDetachedHandler as _SessionDetachedHandler, Script as _Script, ScriptDestroyedHandler as _ScriptDestroyedHandler, ScriptMessageHandler as _ScriptMessageHandler, PortalMembership as _PortalMembership, ControlService as _ControlService, ControlServiceOptions as _ControlServiceOptions, PortalService as _PortalService, PortalNodeConnectedHandler as _PortalNodeConnectedHandler, PortalNodeJoinedHandler as _PortalNodeJoinedHandler, PortalNodeLeftHandler as _PortalNodeLeftHandler, PortalNodeDisconnectedHandler as _PortalNodeDisconnectedHandler, PortalControllerConnectedHandler as _PortalControllerConnectedHandler, PortalControllerDisconnectedHandler as _PortalControllerDisconnectedHandler, PortalAuthenticatedHandler as _PortalAuthenticatedHandler, PortalSubscribeHandler as _PortalSubscribeHandler, PortalMessageHandler as _PortalMessageHandler, FileMonitor as _FileMonitor, FileMonitorChangeHandler as _FileMonitorChangeHandler, Compiler as _Compiler, CompilerStartingHandler as _CompilerStartingHandler, CompilerFinishedHandler as _CompilerFinishedHandler, CompilerOutputHandler as _CompilerOutputHandler, CompilerDiagnosticsHandler as _CompilerDiagnosticsHandler, CompilerOptions as _CompilerOptions, BuildOptions as _BuildOptions, WatchOptions as _WatchOptions, StaticAuthenticationService as _StaticAuthenticationService, FrontmostQueryOptions as _FrontmostQueryOptions, ApplicationQueryOptions as _ApplicationQueryOptions, ProcessQueryOptions as _ProcessQueryOptions, SessionOptions as _SessionOptions, ScriptOptions as _ScriptOptions, SnapshotOptions as _SnapshotOptions, PortalOptions as _PortalOptions, PeerOptions as _PeerOptions, Relay as _Relay, EndpointParameters as _EndpointParameters, AuthenticationService as _AuthenticationService, AbstractAuthenticationService as _AbstractAuthenticationService, BaseObject as _BaseObject, Cancellable as _Cancellable, CancelledHandler as _CancelledHandler, IOStream as _IOStream, InputStream as _InputStream, OutputStream as _OutputStream, InetSocketAddress as _InetSocketAddress, InetAddress as _InetAddress, UnixSocketAddress as _UnixSocketAddress, BaseSocketAddress as _BaseSocketAddress, SocketAddressEnumerator as _SocketAddressEnumerator, SocketConnectable as _SocketConnectable, Runtime as _Runtime, DeviceType as _DeviceType, OutputFormat as _OutputFormat, BundleFormat as _BundleFormat, TypeCheckMode as _TypeCheckMode, SourceMaps as _SourceMaps, JsCompression as _JsCompression, Realm as _Realm, SessionDetachReason as _SessionDetachReason, Scope as _Scope, Stdio as _Stdio, ChildOrigin as _ChildOrigin, SnapshotTransport as _SnapshotTransport, ScriptRuntime as _ScriptRuntime, RelayKind as _RelayKind, FileMonitorEvent as _FileMonitorEvent, SocketFamily as _SocketFamily, UnixSocketAddressType as _UnixSocketAddressType, TargetProcess as _TargetProcess, ProcessID as _ProcessID, InjecteeID as _InjecteeID, FileDescriptor as _FileDescriptor, ProcessName as _ProcessName, SystemParameters as _SystemParameters, SystemInterface as _SystemInterface, NetworkInterface as _NetworkInterface, CellularInterface as _CellularInterface, SpawnOptions as _SpawnOptions, RelayProperties as _RelayProperties, Message as _Message, MessageType as _MessageType, SendMessage as _SendMessage, ErrorMessage as _ErrorMessage, ScriptLogHandler as _ScriptLogHandler, ScriptExports as _ScriptExports, LogLevel as _LogLevel, EnableDebuggerOptions as _EnableDebuggerOptions, PortalServiceOptions as _PortalServiceOptions, PortalConnectionId as _PortalConnectionId, PortalConnectionTag as _PortalConnectionTag, EndpointParametersSubset as _EndpointParametersSubset, AuthenticationScheme as _AuthenticationScheme, TokenAuthenticationScheme as _TokenAuthenticationScheme, CallbackAuthenticationScheme as _CallbackAuthenticationScheme, AuthenticationCallback as _AuthenticationCallback, AuthenticatedSessionInfo as _AuthenticatedSessionInfo, SocketAddress as _SocketAddress, IPV4SocketAddress as _IPV4SocketAddress, IPV6SocketAddress as _IPV6SocketAddress, AnonymousUnixSocketAddress as _AnonymousUnixSocketAddress, PathUnixSocketAddress as _PathUnixSocketAddress, AbstractUnixSocketAddress as _AbstractUnixSocketAddress, Variant as _Variant, VariantValue as _VariantValue, VariantDict as _VariantDict } from "./frida_binding.d.ts";
2
2
  export declare const MessageType: typeof _MessageType;
3
3
  export declare const LogLevel: typeof _LogLevel;
4
- export declare const DeviceManager: typeof _DeviceManager, Device: typeof _Device, RemoteDeviceOptions: _RemoteDeviceOptions, Application: typeof _Application, Process: typeof _Process, ProcessMatchOptions: _ProcessMatchOptions, RawSpawnOptions: _RawSpawnOptions, Spawn: typeof _Spawn, Child: typeof _Child, Crash: typeof _Crash, Bus: typeof _Bus, Service: typeof _Service, Session: typeof _Session, Script: typeof _Script, PortalMembership: typeof _PortalMembership, ControlService: typeof _ControlService, ControlServiceOptions: _ControlServiceOptions, PortalService: typeof _PortalService, FileMonitor: typeof _FileMonitor, Compiler: typeof _Compiler, CompilerOptions: _CompilerOptions, BuildOptions: _BuildOptions, WatchOptions: _WatchOptions, StaticAuthenticationService: typeof _StaticAuthenticationService, FrontmostQueryOptions: _FrontmostQueryOptions, ApplicationQueryOptions: _ApplicationQueryOptions, ProcessQueryOptions: _ProcessQueryOptions, SessionOptions: _SessionOptions, ScriptOptions: _ScriptOptions, SnapshotOptions: _SnapshotOptions, PortalOptions: _PortalOptions, PeerOptions: _PeerOptions, Relay: typeof _Relay, EndpointParameters: typeof _EndpointParameters, AbstractAuthenticationService: typeof _AbstractAuthenticationService, BaseObject: typeof _BaseObject, Cancellable: typeof _Cancellable, IOStream: typeof _IOStream, InputStream: typeof _InputStream, OutputStream: typeof _OutputStream, InetSocketAddress: typeof _InetSocketAddress, InetAddress: typeof _InetAddress, UnixSocketAddress: typeof _UnixSocketAddress, BaseSocketAddress: typeof _BaseSocketAddress, SocketAddressEnumerator: typeof _SocketAddressEnumerator, Runtime: typeof _Runtime, DeviceType: typeof _DeviceType, SourceMaps: typeof _SourceMaps, JsCompression: typeof _JsCompression, Realm: typeof _Realm, SessionDetachReason: typeof _SessionDetachReason, Scope: typeof _Scope, Stdio: typeof _Stdio, ChildOrigin: typeof _ChildOrigin, SnapshotTransport: typeof _SnapshotTransport, ScriptRuntime: typeof _ScriptRuntime, RelayKind: typeof _RelayKind, FileMonitorEvent: typeof _FileMonitorEvent, SocketFamily: typeof _SocketFamily, UnixSocketAddressType: typeof _UnixSocketAddressType;
4
+ export declare const DeviceManager: typeof _DeviceManager, Device: typeof _Device, RemoteDeviceOptions: _RemoteDeviceOptions, Application: typeof _Application, Process: typeof _Process, ProcessMatchOptions: _ProcessMatchOptions, RawSpawnOptions: _RawSpawnOptions, Spawn: typeof _Spawn, Child: typeof _Child, Crash: typeof _Crash, Bus: typeof _Bus, Service: typeof _Service, Session: typeof _Session, Script: typeof _Script, PortalMembership: typeof _PortalMembership, ControlService: typeof _ControlService, ControlServiceOptions: _ControlServiceOptions, PortalService: typeof _PortalService, FileMonitor: typeof _FileMonitor, Compiler: typeof _Compiler, CompilerOptions: _CompilerOptions, BuildOptions: _BuildOptions, WatchOptions: _WatchOptions, StaticAuthenticationService: typeof _StaticAuthenticationService, FrontmostQueryOptions: _FrontmostQueryOptions, ApplicationQueryOptions: _ApplicationQueryOptions, ProcessQueryOptions: _ProcessQueryOptions, SessionOptions: _SessionOptions, ScriptOptions: _ScriptOptions, SnapshotOptions: _SnapshotOptions, PortalOptions: _PortalOptions, PeerOptions: _PeerOptions, Relay: typeof _Relay, EndpointParameters: typeof _EndpointParameters, AbstractAuthenticationService: typeof _AbstractAuthenticationService, BaseObject: typeof _BaseObject, Cancellable: typeof _Cancellable, IOStream: typeof _IOStream, InputStream: typeof _InputStream, OutputStream: typeof _OutputStream, InetSocketAddress: typeof _InetSocketAddress, InetAddress: typeof _InetAddress, UnixSocketAddress: typeof _UnixSocketAddress, BaseSocketAddress: typeof _BaseSocketAddress, SocketAddressEnumerator: typeof _SocketAddressEnumerator, Runtime: typeof _Runtime, DeviceType: typeof _DeviceType, OutputFormat: typeof _OutputFormat, BundleFormat: typeof _BundleFormat, TypeCheckMode: typeof _TypeCheckMode, SourceMaps: typeof _SourceMaps, JsCompression: typeof _JsCompression, Realm: typeof _Realm, SessionDetachReason: typeof _SessionDetachReason, Scope: typeof _Scope, Stdio: typeof _Stdio, ChildOrigin: typeof _ChildOrigin, SnapshotTransport: typeof _SnapshotTransport, ScriptRuntime: typeof _ScriptRuntime, RelayKind: typeof _RelayKind, FileMonitorEvent: typeof _FileMonitorEvent, SocketFamily: typeof _SocketFamily, UnixSocketAddressType: typeof _UnixSocketAddressType;
5
5
  declare const frida: {
6
6
  readonly DeviceManager: typeof _DeviceManager;
7
7
  readonly Device: typeof _Device;
@@ -50,6 +50,9 @@ declare const frida: {
50
50
  readonly SocketAddressEnumerator: typeof _SocketAddressEnumerator;
51
51
  readonly Runtime: typeof _Runtime;
52
52
  readonly DeviceType: typeof _DeviceType;
53
+ readonly OutputFormat: typeof _OutputFormat;
54
+ readonly BundleFormat: typeof _BundleFormat;
55
+ readonly TypeCheckMode: typeof _TypeCheckMode;
53
56
  readonly SourceMaps: typeof _SourceMaps;
54
57
  readonly JsCompression: typeof _JsCompression;
55
58
  readonly Realm: typeof _Realm;
@@ -163,6 +166,9 @@ declare namespace frida {
163
166
  type SocketConnectable = _SocketConnectable;
164
167
  type Runtime = _Runtime;
165
168
  type DeviceType = _DeviceType;
169
+ type OutputFormat = _OutputFormat;
170
+ type BundleFormat = _BundleFormat;
171
+ type TypeCheckMode = _TypeCheckMode;
166
172
  type SourceMaps = _SourceMaps;
167
173
  type JsCompression = _JsCompression;
168
174
  type Realm = _Realm;
@@ -296,6 +302,9 @@ export type SocketAddressEnumerator = _SocketAddressEnumerator;
296
302
  export type SocketConnectable = _SocketConnectable;
297
303
  export type Runtime = _Runtime;
298
304
  export type DeviceType = _DeviceType;
305
+ export type OutputFormat = _OutputFormat;
306
+ export type BundleFormat = _BundleFormat;
307
+ export type TypeCheckMode = _TypeCheckMode;
299
308
  export type SourceMaps = _SourceMaps;
300
309
  export type JsCompression = _JsCompression;
301
310
  export type Realm = _Realm;
@@ -764,7 +764,7 @@ export const LogLevel = binding.LogLevel;
764
764
  };
765
765
  }
766
766
  binding.commitConstructors();
767
- export const { DeviceManager, Device, RemoteDeviceOptions, Application, Process, ProcessMatchOptions, RawSpawnOptions, Spawn, Child, Crash, Bus, Service, Session, Script, PortalMembership, ControlService, ControlServiceOptions, PortalService, FileMonitor, Compiler, CompilerOptions, BuildOptions, WatchOptions, StaticAuthenticationService, FrontmostQueryOptions, ApplicationQueryOptions, ProcessQueryOptions, SessionOptions, ScriptOptions, SnapshotOptions, PortalOptions, PeerOptions, Relay, EndpointParameters, AbstractAuthenticationService, BaseObject, Cancellable, IOStream, InputStream, OutputStream, InetSocketAddress, InetAddress, UnixSocketAddress, BaseSocketAddress, SocketAddressEnumerator, Runtime, DeviceType, SourceMaps, JsCompression, Realm, SessionDetachReason, Scope, Stdio, ChildOrigin, SnapshotTransport, ScriptRuntime, RelayKind, FileMonitorEvent, SocketFamily, UnixSocketAddressType, } = binding;
767
+ export const { DeviceManager, Device, RemoteDeviceOptions, Application, Process, ProcessMatchOptions, RawSpawnOptions, Spawn, Child, Crash, Bus, Service, Session, Script, PortalMembership, ControlService, ControlServiceOptions, PortalService, FileMonitor, Compiler, CompilerOptions, BuildOptions, WatchOptions, StaticAuthenticationService, FrontmostQueryOptions, ApplicationQueryOptions, ProcessQueryOptions, SessionOptions, ScriptOptions, SnapshotOptions, PortalOptions, PeerOptions, Relay, EndpointParameters, AbstractAuthenticationService, BaseObject, Cancellable, IOStream, InputStream, OutputStream, InetSocketAddress, InetAddress, UnixSocketAddress, BaseSocketAddress, SocketAddressEnumerator, Runtime, DeviceType, OutputFormat, BundleFormat, TypeCheckMode, SourceMaps, JsCompression, Realm, SessionDetachReason, Scope, Stdio, ChildOrigin, SnapshotTransport, ScriptRuntime, RelayKind, FileMonitorEvent, SocketFamily, UnixSocketAddressType, } = binding;
768
768
  const frida = {
769
769
  DeviceManager,
770
770
  Device,
@@ -813,6 +813,9 @@ const frida = {
813
813
  SocketAddressEnumerator,
814
814
  Runtime,
815
815
  DeviceType,
816
+ OutputFormat,
817
+ BundleFormat,
818
+ TypeCheckMode,
816
819
  SourceMaps,
817
820
  JsCompression,
818
821
  Realm,
@@ -54,6 +54,9 @@ export interface FridaBinding {
54
54
  SocketAddressEnumerator: typeof SocketAddressEnumerator;
55
55
  Runtime: typeof Runtime;
56
56
  DeviceType: typeof DeviceType;
57
+ OutputFormat: typeof OutputFormat;
58
+ BundleFormat: typeof BundleFormat;
59
+ TypeCheckMode: typeof TypeCheckMode;
57
60
  SourceMaps: typeof SourceMaps;
58
61
  JsCompression: typeof JsCompression;
59
62
  Realm: typeof Realm;
@@ -394,6 +397,9 @@ export type CompilerDiagnosticsHandler = (diagnostics: any) => void;
394
397
 
395
398
  export interface CompilerOptions {
396
399
  projectRoot?: string;
400
+ outputFormat?: OutputFormat;
401
+ bundleFormat?: BundleFormat;
402
+ typeCheck?: TypeCheckMode;
397
403
  sourceMaps?: SourceMaps;
398
404
  compression?: JsCompression;
399
405
  }
@@ -597,6 +603,22 @@ export enum DeviceType {
597
603
  Usb = "usb"
598
604
  }
599
605
 
606
+ export enum OutputFormat {
607
+ Unescaped = "unescaped",
608
+ HexBytes = "hex-bytes",
609
+ CString = "c-string"
610
+ }
611
+
612
+ export enum BundleFormat {
613
+ Esm = "esm",
614
+ Iife = "iife"
615
+ }
616
+
617
+ export enum TypeCheckMode {
618
+ Full = "full",
619
+ None = "none"
620
+ }
621
+
600
622
  export enum SourceMaps {
601
623
  Included = "included",
602
624
  Omitted = "omitted"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frida",
3
- "version": "17.0.6",
3
+ "version": "17.1.0",
4
4
  "authors": [
5
5
  "Frida Developers"
6
6
  ],
package/releng/deps.toml CHANGED
@@ -281,7 +281,7 @@ options = [
281
281
 
282
282
  [ngtcp2]
283
283
  name = "ngtcp2"
284
- version = "cc5cf523615b7fa7a9340234c7eec3c3645ae969"
284
+ version = "828dcaed498b40954e1b496664a3309796968db6"
285
285
  url = "https://github.com/frida/ngtcp2.git"
286
286
  dependencies = [
287
287
  "openssl",
@@ -368,7 +368,7 @@ when = """ \
368
368
  and machine.os != 'qnx' \
369
369
  """
370
370
  name = "V8"
371
- version = "a7b09c3d8b16199ef8664c66559d2530c293b8cf"
371
+ version = "990fdb00e1506126019493dd3bda4d416c81eaee"
372
372
  url = "https://github.com/frida/v8.git"
373
373
  options = [
374
374
  "-Ddebug=false",
@@ -5,6 +5,10 @@ import re
5
5
  import subprocess
6
6
  from typing import Optional
7
7
 
8
+ if platform.system() == "Windows":
9
+ import ctypes
10
+ from ctypes import wintypes
11
+
8
12
 
9
13
  @dataclass
10
14
  class MachineSpec:
@@ -236,9 +240,79 @@ def detect_os() -> str:
236
240
 
237
241
 
238
242
  def detect_arch() -> str:
243
+ if platform.system() == "Windows":
244
+ return detect_arch_windows()
239
245
  arch = platform.machine().lower()
240
246
  return ARCHS.get(arch, arch)
241
247
 
248
+ def detect_arch_windows():
249
+ try:
250
+ code = detect_arch_windows_modern()
251
+ except AttributeError:
252
+ code = detect_arch_windows_legacy()
253
+ if code == PROCESSOR_ARCHITECTURE_INTEL:
254
+ return "x86"
255
+ elif code in {PROCESSOR_ARCHITECTURE_AMD64, IMAGE_FILE_MACHINE_AMD64}:
256
+ return "x86_64"
257
+ elif code in {PROCESSOR_ARCHITECTURE_ARM64, IMAGE_FILE_MACHINE_ARM64}:
258
+ return "arm64"
259
+ else:
260
+ raise RuntimeError(f"unrecognized native architecture code: {code!r}")
261
+
262
+ def detect_arch_windows_modern():
263
+ kernel32 = ctypes.WinDLL("kernel32", use_last_error=True)
264
+
265
+ try:
266
+ is_wow64_process = kernel32.IsWow64Process2
267
+ except AttributeError:
268
+ raise
269
+
270
+ is_wow64_process.argtypes = (
271
+ wintypes.HANDLE,
272
+ ctypes.POINTER(wintypes.WORD),
273
+ ctypes.POINTER(wintypes.WORD),
274
+ )
275
+ is_wow64_process.restype = wintypes.BOOL
276
+
277
+ process_machine = wintypes.WORD(0)
278
+ native_machine = wintypes.WORD(0)
279
+
280
+ ok = is_wow64_process(
281
+ kernel32.GetCurrentProcess(),
282
+ ctypes.byref(process_machine),
283
+ ctypes.byref(native_machine)
284
+ )
285
+ if not ok:
286
+ raise ctypes.WinError(ctypes.get_last_error())
287
+
288
+ return native_machine.value
289
+
290
+ def detect_arch_windows_legacy():
291
+ class SYSTEM_INFO(ctypes.Structure):
292
+ _fields_ = [
293
+ ("wProcessorArchitecture", wintypes.WORD),
294
+ ("wReserved", wintypes.WORD),
295
+ ("dwPageSize", wintypes.DWORD),
296
+ ("lpMinimumApplicationAddress", ctypes.c_void_p),
297
+ ("lpMaximumApplicationAddress", ctypes.c_void_p),
298
+ ("dwActiveProcessorMask", ctypes.c_void_p),
299
+ ("dwNumberOfProcessors", wintypes.DWORD),
300
+ ("dwProcessorType", wintypes.DWORD),
301
+ ("dwAllocationGranularity", wintypes.DWORD),
302
+ ("wProcessorLevel", wintypes.WORD),
303
+ ("wProcessorRevision", wintypes.WORD),
304
+ ]
305
+
306
+ kernel32 = ctypes.WinDLL("kernel32", use_last_error=True)
307
+
308
+ get_native_system_info = kernel32.GetNativeSystemInfo
309
+ get_native_system_info.argtypes = (ctypes.POINTER(SYSTEM_INFO),)
310
+ get_native_system_info.restype = None
311
+
312
+ info = SYSTEM_INFO()
313
+ get_native_system_info(ctypes.byref(info))
314
+ return info.wProcessorArchitecture
315
+
242
316
 
243
317
  ARCHS = {
244
318
  "amd64": "x86_64",
@@ -320,3 +394,10 @@ BIG_ENDIAN_ARCHS = {
320
394
  }
321
395
 
322
396
  TARGET_TRIPLET_ARCH_PATTERN = re.compile(r"^(i.86|x86_64|arm\w*|aarch64(_be)?|mips\w*|powerpc|s390x)$")
397
+
398
+ PROCESSOR_ARCHITECTURE_INTEL = 0
399
+ PROCESSOR_ARCHITECTURE_AMD64 = 9
400
+ PROCESSOR_ARCHITECTURE_ARM64 = 12
401
+
402
+ IMAGE_FILE_MACHINE_AMD64 = 0x8664
403
+ IMAGE_FILE_MACHINE_ARM64 = 0xAA64
@@ -1547,6 +1547,8 @@ class NinjaBackend(backends.Backend):
1547
1547
  for dep in itertools.chain(target.link_targets, target.link_whole_targets):
1548
1548
  if not dep.is_linkable_target():
1549
1549
  continue
1550
+ if isinstance(dep, (build.CustomTarget, build.CustomTargetIndex)):
1551
+ continue
1550
1552
  for i in dep.sources:
1551
1553
  if hasattr(i, 'fname'):
1552
1554
  i = i.fname
@@ -1,6 +1,6 @@
1
1
  [wrap-git]
2
2
  url = https://github.com/frida/frida-core.git
3
- revision = 17.0.6
3
+ revision = 17.1.0
4
4
  depth = 1
5
5
 
6
6
  [provide]