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
| #!/usr/bin/env python3 | |
| import getpass | |
| import json | |
| import pathlib | |
| import sys | |
| import urllib.parse | |
| import urllib.request | |
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
| #!/bin/sh | |
| set -euo pipefail | |
| cd /tmp | |
| mkdir debug | |
| wget https://raw.githubusercontent.com/sbingner/jailbreak-resources/master/layout/usr/share/entitlements/debugserver.xml | |
| disk="$(hdik ram://100000 | xargs)" | |
| echo "Using new disk at $disk" | |
| newfs_hfs "$disk" |
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
| #define _XOPEN_SOURCE 700 | |
| #include <ctype.h> | |
| #include <ftw.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| // djb2 because it's short | |
| unsigned int hash(char *string) { | |
| unsigned int hash = 5381; |
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
| // The usual: compile with clang libfixjit.c -arch arm64 -arch arm64e -shared -o libfixjit.dylib, add to DYLD_INSERT_LIBRARIES. | |
| #include <errno.h> | |
| #include <pthread.h> | |
| #include <stdatomic.h> | |
| __attribute__((constructor)) static void fix_jit() { | |
| unsigned long long mask; | |
| __asm__ volatile("mrs %0, s3_4_c15_c2_7" : "=r"(mask): :); | |
| __asm__ volatile("msr s3_4_c15_c2_7, %0" : : "r"(mask & 0xfffffffff0ffffff) :); |
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
| #!/bin/sh | |
| set -eu | |
| create_iconset() { | |
| mkdir -p Ghidra.iconset | |
| cat << EOF > Ghidra.iconset/Contents.json | |
| { | |
| "images": | |
| [ |
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
| [Unit] | |
| Description=Python Web Server | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| Restart=always | |
| User=root | |
| WorkingDirectory=/share | |
| ExecStart=/usr/bin/python3 -m http.server 80 |
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
| #!/usr/bin/env python3 | |
| import json | |
| import re | |
| import urllib.request | |
| if __name__ == "__main__": | |
| comments = json.load(urllib.request.urlopen("https://hacker-news.firebaseio.com/v0/user/saagarjha.json"))["submitted"][::-1] | |
| for comment in comments: | |
| timestamp = json.load(urllib.request.urlopen("https://hacker-news.firebaseio.com/v0/item/" + str(comment) + ".json"))["time"] |
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
| #!/sbin/openrc-run | |
| start() { | |
| start-stop-daemon --start --chdir /share --background --exec /usr/bin/python3 -- -m http.server 80 | |
| } | |
| stop() { | |
| start-stop-daemon --stop --chdir /share --exec /usr/bin/python3 -- -m http.server | |
| } |
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
| #!/usr/bin/env python3 | |
| import iterm2 | |
| async def set_theme(connection, theme): | |
| # Themes have space-delimited attributes, one of which will be light or dark. | |
| parts = theme.split(" ") | |
| if "dark" in parts: | |
| preset = await iterm2.ColorPreset.async_get(connection, "Fixed Solarized Dark") |
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
| #include <string.h> | |
| int overridden_strncasecmp(const char *s1, const char *s2, size_t n) { | |
| if (n != 6 || strncmp(s2, "bright", n)) { | |
| return strncasecmp(s1, s2, n); | |
| } else { | |
| return !0; | |
| } | |
| } |