Skip to content

Instantly share code, notes, and snippets.

@level3tjg
level3tjg / Tweak.x
Last active November 30, 2023 22:17
Disable app thinning
// Inject into appstored and itunesstored
#import <MobileGestalt/MobileGestalt.h>
NSString *deviceClass;
%hook XDCDevice
- (NSString *)productType {
return deviceClass;
}
@pinkeen
pinkeen / DOCKER_SYSTEMD_CGROUPV2.md
Last active April 21, 2024 09:50
Run a systemd container using cgroupv2

Run a systemd container using cgroupv2 [NOTES]

In theory this would allow the nested systemd init to manage its own resources via slices and scopes - kind of like with LXC's nested mode but without the nasty security implication of bind mounting the real cgroupfs into the container.

Running a systemd container is not the only thing that this would enable - together with fuse-overlayfs it might allow one to run containers inside containers more securely.

The problem is that by default the nested group is mounted ro into the container which should not be necessary according to my research. It gets mounted rw as expected when userns-remap is enabled in Docker what is not desirable for me. I am not sure if docker/moby/containerd is at fault here or if it's a limitation of Linux control groups or user namespaces. It would be great if som

@zerotypic
zerotypic / idapython_asyncio.py
Last active March 11, 2022 12:38
Get asyncio working in IDAPython
# Insert this into your idapythonrc.py file.
from PyQt5.QtWidgets import QApplication
import qasync
import asyncio
qapp = QApplication.instance()
# Requires qasync from here: https://github.com/zerotypic/qasync/tree/evloop_already_running, if not already merged
loop = qasync.QEventLoop(qapp, already_running=True)
asyncio.set_event_loop(loop)
@sarimarton
sarimarton / crossover-howtocompile.md
Last active May 2, 2024 08:16 — forked from Alex4386/crossover-howtocompile.md
CodeWeavers CrossOver - How to compile from source! for macOS

UPDATE 2023-01-22 21:34:33

This guide was last tested on an Intel MacBook 2017. Since then it's unmaintained and won't be updated (I quit the game and bought a life-time crossover licence).


This has been forked from https://gist.github.com/Alex4386/4cce275760367e9f5e90e2553d655309

For the latest discussion, see the comments there.

@icecr4ck
icecr4ck / idapython_ctree.md
Last active April 25, 2024 08:09
Notes on CTREE usage with IDAPython

IDAPython CTREE

Important links

Description

The CTREE is built from the optimized microcode (maturity at CMAT_FINAL), it represents an AST-like tree with C statements and expressions. It can be printed as C code.

@adamghill
adamghill / create_setup.py
Created February 7, 2020 23:27
Convert pyproject.toml to setup.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @Author: José Sánchez-Gallego (gallegoj@uw.edu)
# @Date: 2019-12-18
# @Filename: create_setup.py
# @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause)
# https://github.com/sdss/flicamera/blob/master/create_setup.py
# This is a temporary solution for the fact that pip install . fails with
@cerebrate
cerebrate / README.md
Last active December 2, 2023 08:17
Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.

WARNING

THIS GIST IS EXTREMELY OBSOLETE. DO NOT FOLLOW THESE INSTRUCTIONS. SERIOUSLY.

IF YOU IGNORE THE ABOVE WARNING, YOU AGREE IN ADVANCE THAT YOU DIDN'T GET THESE INSTRUCTIONS FROM ME, THAT I WARNED YOU, AND THAT I RESERVE THE RIGHT TO POINT AND LAUGH MOCKINGLY IF AND WHEN SOMETHING BREAKS HORRIBLY.

I'll do a write-up of current custom-kernel procedures over on Random Bytes ( https://randombytes.substack.com/ ) one day soon.

NOTE

@esterTion
esterTion / coneshell_extract_metadata.cpp
Last active May 25, 2021 12:59
Extract metadata from ConeShell (Cygames) processed binary
#include <cstdio>
#include <iostream>
#include <cstdint>
using namespace std;
void writeReverse(FILE* f, uint32_t num)
{
char* buf[4];
*(uint32_t*)buf = 0xFFFFFFFF - num;
fwrite(buf, 4, 1, f);
@cbracken
cbracken / decode_syslog.dart
Last active November 28, 2023 11:27
Quickly hacked-up decoder for syslog lines in macOS/iOS syslog
import 'dart:convert' show utf8;
/// Decodes a vis-encoded syslog string to a UTF-8 representation.
///
/// Apple's syslog logs are encoded in 7-bit form. Input bytes are encoded as follows:
/// 1. 0x00 to 0x19: non-printing range. Some ignored, some encoded as <...>.
/// 2. 0x20 to 0x7f: as-is, with the exception of 0x5c (backslash).
/// 3. 0x5c (backslash): octal representation \134.
/// 4. 0x80 to 0x9f: \M^x (using control-character notation for range 0x00 to 0x40).
/// 5. 0xa0: octal representation \240.
Add-Type -TypeDefinition @"
using System;
using System.IO;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Linq;
using Microsoft.Win32;