Skip to content

Instantly share code, notes, and snippets.

View Dantee296's full-sized avatar

dantee296 Dantee296

View GitHub Profile
@Dantee296
Dantee296 / macOS_SytemPrefs.md
Created January 8, 2024 10:34 — forked from rmcdongit/macOS_SytemPrefs.md
Apple System Preferences URL Schemes

macOS 10.15 System Preference Panes

Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.

To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:

tell application "System Preferences"
	set CurrentPane to the id of the current pane
	set the clipboard to CurrentPane
@Dantee296
Dantee296 / code.mm
Created January 8, 2024 05:11 — forked from EthanArbuckle/code.mm
a gross way to use raw iokit events to detect pinch gestures
#import <UIKit/UIKit.h>
#include <IOKit/hid/IOHIDEventSystem.h>
#include <IOKit/hid/IOHIDEventSystemClient.h>
#include "CDTContextHostProvider.h"
#include <stdio.h>
#include <dlfcn.h>
UIView *contextView;
int IOHIDEventSystemClientSetMatching(IOHIDEventSystemClientRef client, CFDictionaryRef match);
@Dantee296
Dantee296 / main.c
Created December 1, 2023 12:29 — forked from andrew-d/main.c
Example of how to get current binary's path using Apple's Code Signing Services
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <Security/Security.h>
// Compile with:
// gcc -o ourpath -framework CoreFoundation -framework Security main.c
@Dantee296
Dantee296 / service_call_test.py
Created August 7, 2023 06:55 — forked from ktnr74/service_call_test.py
*update_transaction_codes.py* parses Android services source code to find out transaction codes and saves them in YAML format for later use. *transaction_codes.yaml* is an example of the resulting file. *service_call_test.py* shows how it can be used
#!/usr/bin/python
import os
import sys
import time
import yaml
import subprocess
import re
import struct
#!/bin/bash
ADBShell () { adb ${2+-s }$2 shell "$1" | tr -d '\r'
}
GetAndroidVersion () {
local ALL_TAGS=$(wget -qO - "$GOOGLE_SOURCE/$REPO/+refs/tags/?format=text" | \
tr -d '^{}' | cut -d/ -f3 | sort -u | grep -vE -- '-(cts|sdk)-' | grep -v "_r0")
TAG=${1:-$(ADBShell 'getprop ro.build.version.release')}
echo -e "ANDROID_SERIAL=$ANDROID_SERIAL\nro.build.version.release=$TAG" 1>&2
SUPERDUPER SERIAL
SUPERDUPER SERIAL:
LAST CHECKED WORKING IN VERSION 3.3.1
NAME: Serial_Box
SERIAL: SPSD001613-C55P-20F5-012L-XVSE-11E3
@Dantee296
Dantee296 / jurpleConsole.c
Created June 22, 2022 10:13 — forked from dlevi309/jurpleConsole.c
jurpleConsole from newosxbook.com with an adjusted buffer size to work
#include <stdio.h>
#include <dlfcn.h>
#include <CoreFoundation/CoreFoundation.h>
// Barebones purple_console clone - constructed with some reverse and forward engineering.
//
// No copyright or license. Feel free to share. Comments/Feedback welcome @http://newosxbook.com/forum/
//
//
@Dantee296
Dantee296 / ProductionBag
Created October 5, 2021 10:44 — forked from inC3ASE/ProductionBag
Library/Caches/com.apple.appstore
 streamtypedÅËÑ@ÑÑÑNSMutableDictionaryÑÑ NSDictionaryÑÑNSObjectÖÑiíÑÑÑNSStringïÑ+bagÜíÑÑÑ
NSMutableDataÑÑNSDataïñÇ÷Ñ [120342c]<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>metrics</key>
<dict>
<key>metricsUrl</key><string>https://xp.apple.com/report</string>
<key>compoundSeparator</key><string>_</string>
<key>tokenSeparator</key><string>|</string>
@Dantee296
Dantee296 / AdbCommands
Created September 23, 2021 10:24 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@Dantee296
Dantee296 / gist:a6a0990319211c7cb07144dfee901f3e
Created November 13, 2020 11:17 — forked from Blefish/gist:ecdbd21341f66a0a53095bd84bc2a1d0
Unofficial documentation for the iCloud Apple device image URL format
https://statici.icloud.com/fmipmobile/deviceImages-9.0/iPhone/iPhone9,4-2-3-0/online-infobox__3x.png
A B C D E F G
A: deviceImages version seems to determine the format of the image specifier (C, D, E, F)
B: device marketing name
C: device model identifier
D: front color (DeviceColor)
E: back color (DeviceEnclosureColor) (missing on very old devices)
F: color (device cover/backing/housing)?? (missing on older devices)
G: image variant