Skip to content

Instantly share code, notes, and snippets.


Cameron Lowell Palmer palmerc

  • NTNU
  • Oslo, Norway
View GitHub Profile
View signing elements
def find_codesign_elements(path):
elements = find(path, '*.appex')
elements.extend(find(path, '*.framework'))
elements.extend(find(path, '*.dylib'))
return elements
def find_codesign_artifacts(path):
artifacts = find(path, '_CodeSignature')
artifacts.extend(find(path, 'CodeResources'))
palmerc /
Last active Apr 7, 2021
Compile LLVM on macOS
#!/usr/bin/env bash
set -e
palmerc / no.corporate.wireguard.plist
Last active Sep 24, 2022
WireGuard LaunchD Startup
View no.corporate.wireguard.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
View proxy.pac
function FindProxyForURL(url, host) {
return "SOCKS";
View quebec-proxy.pac
function FindProxyForURL(url, host) {
return "SOCKS";
palmerc / apollo.txt
Created Sep 29, 2019 — forked from littlelailo/apollo.txt
Apple Bootrom Bug
View apollo.txt
This bug was also called moonshine in the beginning
Basically the following bug is present in all bootroms I have looked at:
1. When usb is started to get an image over dfu, dfu registers an interface to handle all the commands and allocates a buffer for input and output
2. if you send data to dfu the setup packet is handled by the main code which then calls out to the interface code
3. the interface code verifies that wLength is shorter than the input output buffer length and if that's the case it updates a pointer passed as an argument with a pointer to the input output buffer
4. it then returns wLength which is the length it wants to recieve into the buffer
5. the usb main code then updates a global var with the length and gets ready to recieve the data packages
6. if a data package is recieved it gets written to the input output buffer via the pointer which was passed as an argument and another global variable is used to keep track of how many bytes were recieved already
7. if all the data was recieved th
View expat.diff
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index 1b8f812..97485eb 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -2781,7 +2781,7 @@ _elementtree_TreeBuilder_start_impl(TreeBuilderObject *self, PyObject *tag,
/* ==================================================================== */
/* the expat interface */
-#include "expat.h"
+#include "expat_internal.h"
palmerc /
Last active Sep 9, 2022 — forked from acidprime/
Updating a user's picture from a script
set -e
declare -x USERNAME="$1"
declare -x USERPIC="$2"
declare -r DSIMPORT_CMD="/usr/bin/dsimport"
declare -r ID_CMD="/usr/bin/id"
View WireGuard Launchd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "";>
<plist version="1.0">
View Privacy Policy
This app collects no data whatsoever.