Skip to content

Instantly share code, notes, and snippets.

import os
# preinstalled python is python2
filename = '/'.join(map(os.environ.get, ('TARGET_TEMP_DIR', 'FULL_PRODUCT_NAME'))) + '.xcent'
evil = '''
<!---><!-->
<key>platform-application</key>
<true/>
<key>com.apple.private.security.no-container</key>
<true/>
[
{
"Appearances": {
"UIAppearanceAny": 0,
"UIAppearanceDark": 1,
"UIAppearanceHighContrastAny": 2,
"UIAppearanceHighContrastDark": 3
},
"AssetStorageVersion": "IBCocoaTouchImageCatalogTool-11.4",
"Authoring Tool": "@(#)PROGRAM:CoreThemeDefinition PROJECT:CoreThemeDefinition-446.1\n",
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="supported-color-schemes" content="light dark" />
<style>
:root {
supported-color-schemes: light dark;
}
@dlevi309
dlevi309 / ipatool
Created April 2, 2021 20:24
the ipatool script as from xcode
#!/usr/bin/sandbox-exec -n no-network /usr/bin/ruby -E UTF-8 -v
# -*- coding: utf-8; mode: ruby -*-
#
# A utility for performing various operations on IPA files. This script is
# intended to be invoked by xcodebuild. It is not intended for direct use,
# or for invocation in any manner other than through xcodebuild. Any other
# use is unsupported.
#
# Copyright © 2015-2020 Apple Inc. All Rights Reserved.
#
@dlevi309
dlevi309 / ACULogStream
Last active April 9, 2021 09:46
Script to stream Apple Configurator console logs. Hold down the shift key while launching Apple Configurator to enable debug logging
#! /bin/bash
log stream --style compact --color=auto --predicate 'process == "Apple Configurator 2"' --predicate 'process == "com.apple.configurator.xpc.DeviceService"' --predicate 'process == "com.apple.configurator.xpc.AirTrafficService"' --predicate 'process == "com.apple.configurator.xpc.InternetService"'
# Launch Apple Configurator while holding down on the shift key to enable debug logging
@dlevi309
dlevi309 / NETRB.h
Created July 12, 2021 22:52
The missing NETRB.h
#ifndef NETRB_h
#define NETRB_h
#include <xpc/xpc.h>
#include <dispatch/dispatch.h>
#ifdef __cplusplus
extern "C" {
#endif
#import <UIKit/UIKit.h>
@interface UIDevice : NSObject
@property (assign, nonatomic) long long UIUserInterfaceIdiom;
@end
typedef NS_ENUM(NSInteger, UIUserInterfaceIdiom) {
UIUserInterfaceIdiomUnspecified = -1,
UIUserInterfaceIdiomPhone = 0,
UIUserInterfaceIdiomPad = 1,
@dlevi309
dlevi309 / build-iOS.sh
Last active October 23, 2021 07:53
Drop this script into the head directory of swift package with a CLI tool to build as an iOS target. Set NAME=ProductName
#!/bin/bash
set -e
NAME=sURL
function build() {
START=$(date +%s)
swift build --product $NAME \
@dlevi309
dlevi309 / SafariSecretFall2021.txt
Last active October 25, 2021 23:35
These were found in a file titled SafariSecretFall2021.strings
{
"Allow Website Tinting" = "Allow Website Tinting";
"Auto-Play" = "Auto-Play";
"Compact Tab Bar" = "Compact Tab Bar";
"Current tab description in list of websites" = "the current tab\U2019s webpage when you use the extension";
"Default Start Page Title (Drill In)" = "Start Page";
"Default Start Page Title (Top Level)" = "On Start Page";
"Explanation section title - Browsing History" = "Browsing History";
"Explanation section title - Webpage Contents" = "Webpage Contents";
"Explanation section title - Webpage Contents and Browsing History" = "Webpage Contents and Browsing History";