This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@self.hook() | |
def _bootstrap_check_in(bootstrap_port: int, sn: int, sp: int): | |
service_name = c_string(self._uc.mem_read(sn, 0x100)) | |
self.debug(f"bootstrap_check_in {hex(bootstrap_port)} {service_name} {hex(sp)}") | |
port = self.mach_ports.create_mach_port_with_name(service_name) | |
self._uc.mem_write(sp, port.to_bytes(4, byteorder='little')) | |
return 0 | |
@self.hook() | |
def _CFMachPortCreateWithPort(allocator: int, port: int, callout: int, context: int, shouldFreeInfo: int): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
struct psem_fdinfo { | |
struct proc_fileinfo { | |
var fi_openflags: UInt32 | |
var fi_status: UInt32 | |
var fi_offset: Int64 | |
var fi_type: Int32 | |
var fi_guardflags: UInt32 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from rich import print | |
from rich.progress import track, Progress | |
from rich.prompt import Prompt | |
from rich.console import Console | |
from rich.table import Table | |
import zipfile | |
import os | |
import threading | |
import io |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var objs = []; // we'll store the object references in this array | |
function walkTheObject(obj) { | |
var keys = Object.keys(obj); // get all own property names of the object | |
// Check if 'info' and 'error' keys are present (meaning it is probably the object we want) | |
if (keys.indexOf("info") > -1 && keys.indexOf("error") > -1) { | |
function fmt_console_log(strings, ...values) { | |
let str = ''; | |
if (strings?.logString?.fragments != null) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; calling convention | |
symbol arg1 = b0 | |
symbol arg2 = b1 | |
symbol arg3 = b2 | |
;symbol arg1w = w3 | |
symbol shift_out_current_mask = b3 | |
symbol shift_out_temp = b4 | |
symbol main_last = b5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lxml import etree | |
import requests | |
OVERRIDE_CSS = """ | |
/* Custom injected CSS */ | |
.VBoxView { | |
display: flex; | |
flex-direction: column; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var m = 'libsystem_trace.dylib'; | |
// bool os_log_type_enabled(os_log_t oslog, os_log_type_t type); | |
var isEnabledFunc = Module.findExportByName(m, 'os_log_type_enabled'); | |
// _os_log_impl(void *dso, os_log_t log, os_log_type_t type, const char *format, uint8_t *buf, unsigned int size); | |
var logFunc = Module.findExportByName(m, '_os_log_impl'); | |
Interceptor.attach(isEnabledFunc, { | |
onLeave: function (ret) { | |
// console.log('log_enabled', ret); | |
ret.replace(0x1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{alloc::Layout, mem, ops::{Deref, DerefMut}}; | |
use crate::pager::Pagable; | |
pub struct MemoryMap(Vec<u8>); | |
impl MemoryMap { | |
fn page_round(size: usize) -> usize { | |
Layout::from_size_align(size, Vec::<u8>::page_size()).unwrap().size() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure the script is run as root | |
# Otherwise, try to run it with sudo | |
if [ $EUID -ne 0 ]; then | |
echo "This script must be run as root" | |
sudo $0 | |
exit $? # Exit with the same exit code as sudo | |
fi | |
# Look for .mac files in the current folder | |
shopt -s nullglob |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import hashlib | |
import hmac | |
import locale | |
import plistlib as plist | |
from datetime import datetime | |
import logging | |
import requests | |
import srp._pysrp as srp | |
import urllib3 |