UNPKG

frida-il2cpp-bridge-my

Version:

(my:Support IOS)Frida module to dump, manipulate and hijack any IL2CPP application at runtime with a high level of abstraction.

37 lines (36 loc) 1.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports._Il2CppString = void 0; const api_1 = require("../api"); const native_struct_1 = require("../native-struct"); const object_1 = require("./object"); class _Il2CppString extends native_struct_1.NativeStruct { get content() { if (this.handle.isNull()) { return null; } return api_1.Api._stringChars(this.handle).readUtf16String(this.length); } set content(value) { if (value != null && !this.handle.isNull()) { api_1.Api._stringChars(this.handle).writeUtf16String(value); api_1.Api._stringSetLength(this.handle, value.length); } } get length() { if (this.handle.isNull()) { return 0; } return api_1.Api._stringLength(this.handle); } get object() { return new object_1._Il2CppObject(this.handle); } static from(content) { return new _Il2CppString(api_1.Api._stringNew(content)); } toString() { return this.content; } } exports._Il2CppString = _Il2CppString;