Skip to content

Instantly share code, notes, and snippets.

View spotlightishere's full-sized avatar
🦊
in your computer

Spotlight spotlightishere

🦊
in your computer
View GitHub Profile
@LinusHenze
LinusHenze / iOS_16_Launch_Constraints.txt
Created June 15, 2022 16:30
Description of the Launch Constraints introduced in iOS 16
iOS 16 introduced launch constraints, which can be used to constraint the launch of an application.
There are three types of constraints:
Self Constraints, which the launched application itself must meet
Parent Constraints, which the parent process must meet
Responsible Constraints, which the "responsible process" must meet (I assume that the responsible process is the process that asked launchd to launch a service)
Additionally, the TrustCache format was updated (see below) to support assigning each binary a "Constraint Category", which forces Self and Parent Constraints.
Note that Self, Parent and Responsible Constraints can also be set by the process performing the launch and they can be included in the code signature, in the new blob type 0xFADE8181. In both cases, the constraints are DER encoded (just like the DER entitlements).
Constraint Categories (from TrustCache, new in version 2):
@mateuszkwiatkowski
mateuszkwiatkowski / vscode-remote-ssh-freebsd.md
Last active April 6, 2024 02:27
Configure FreeBSD to work with VScode's remote ssh extension

This procedure was tested on FreeBSD-CURRENT build from d8819d88af52.

  1. Enable linuxulator and install linux userland:
    # sysrc linux_enable="YES"
    # service linux start
    # pkg install linux_base-c7
    
@saagarjha
saagarjha / library_injector.cpp
Last active April 5, 2024 19:53
Load a library into newly spawned processes (using DYLD_INSERT_LIBRARIES and EndpointSecurity)
// To compile: clang++ -arch x86_64 -arch arm64 -std=c++20 library_injector.cpp -lbsm -lEndpointSecurity -o library_injector,
// then codesign with com.apple.developer.endpoint-security.client and run the
// program as root.
#include <EndpointSecurity/EndpointSecurity.h>
#include <algorithm>
#include <array>
#include <bsm/libbsm.h>
#include <cstdint>
#include <cstdlib>
@DreamingInBinary
DreamingInBinary / Best in Class iOS Checklist
Last active January 29, 2024 18:18
This is a public checklist updated every year after the latest version of iOS and iPadOS are shipped. It's a boiled down version of a "Best in Class" app checklist created by Jordan Morgan.
# A Best in Class Checklist
A boiled down checklist adapted from this [post](https://www.swiftjectivec.com/a-best-in-class-app/), created by @jordanmorgan10.
> To use this, create a Github Issue in your own repo, and simply copy and paste this text.
## iOS Core Technology
_Things any iOS app can benefit from_
- [ ] iCloud Sync
- [ ] Focus Filter Support

Removing a Mac's Firmware Password By Reflashing EFI ROM

According to Apple, the only way to remove an unknown firmware password from a MacBook (2011 and later) is to take it to the Apple Store with the original proof-of-purchase. However, I've found that there is another way, which I've been successful with for the unibody MacBook Pro--it's essentially just modifying a couple bytes in the EFI ROM, which should be simple. What's not simple, however, is figuring out how to read and write to the EFI chip. In this post, I'll talk about the process that I figured out and what worked for me.

The Official Method

Apple's method of resetting the firmware password is not reproducible, as Apple generates an SCBO file that unlocks the EFI using their private key. You can read more about this process here. The problem with this system is that, if you are in the unfortunate situation of neither having the firmware unlock pass

@laggardkernel
laggardkernel / startup-time-of-zsh.md
Last active April 12, 2024 13:24
Comparison of ZSH frameworks and plugin managers

Comparison of ZSH frameworks and plugin managers

Changelog

  • update 1: add a FAQ section
  • update 2: benchmark chart and feature comparison table
  • update 3:
    • improve the table with missing features for antigen
    • new zplg times result

TLDR

@fay59
fay59 / Quirks of C.md
Last active January 23, 2024 04:24
Quirks of C

Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.

There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]

struct foo {
   struct bar {
 int x;
@OkashiOdayakana
OkashiOdayakana / getting-started-sh.md
Last active March 1, 2019 22:35
OwO.sh Getting Started Guide

Getting Started with OwO.sh

The URL Shortener / File Uploader by @OkashiOdayakana, @Jakeoid, and @Aurieh

Installation

Go to https://owo.codes/whats-this/owo.sh and follow the instructions there.

/*
GasGauge race condition yielding double free
(c) 2016 qwertyoruiop
greetz: banty (this one is for you!) / filippobiga / windknown / morpheus / cturt / laughing_mantis / p0sixninja / osxreverser / trimo / beist / sn0w
by Kim Jong Cracks Research (please CVE it to them!)
@hnakamur
hnakamur / vagrant-1.8.1-xenial.patch
Last active June 8, 2016 15:52
A patch to support predictable network interface names like enp0s25 on Ubuntu 16.04 with Vagrant 1.8.1
diff -ruN vagrant-1.8.1.orig/plugins/guests/debian/cap/configure_networks.rb vagrant-1.8.1/plugins/guests/debian/cap/configure_networks.rb
--- vagrant-1.8.1.orig/plugins/guests/debian/cap/configure_networks.rb 2015-12-25 06:30:19.000000000 +0900
+++ vagrant-1.8.1/plugins/guests/debian/cap/configure_networks.rb 2016-04-24 03:22:08.000000000 +0900
@@ -1,3 +1,4 @@
+require 'log4r'
require 'set'
require 'tempfile'
@@ -9,8 +10,22 @@
class ConfigureNetworks