Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Astro is pretty cool

Menushka Weeratunga menushka

🚀
Astro is pretty cool
View GitHub Profile
@menushka
menushka / hookAllMethods.sh
Last active April 23, 2021 11:58
Convert Objective C header file to Logos tweak file with all methods hooked and logged with option to log return value also
View hookAllMethods.sh
#!/bin/sh
getStringFormat() {
SED_REPALCE[0]='s/HBLogDebug(id)/HBLogDebug(@"Returns: %@", r)/g; '
SED_REPALCE[1]='s/HBLogDebug(int)/HBLogDebug(@"Returns: %d", r)/g; '
SED_REPALCE[2]='s/HBLogDebug(unsigned int)/HBLogDebug(@"Returns: %u", r)/g; '
SED_REPALCE[3]='s/HBLogDebug(double)/HBLogDebug(@"Returns: %f", r)/g; '
SED_REPALCE[4]='s/HBLogDebug(unsigned char)/HBLogDebug(@"Returns: %c", r)/g; '
SED_REPALCE[5]='s/HBLogDebug(unichar)/HBLogDebug(@"Returns: %C", r)/g; '
SED_REPALCE[6]='s/HBLogDebug(long long)/HBLogDebug(@"Returns: %lld", r)/g; '
SED_REPALCE[7]='s/HBLogDebug(BOOL)/HBLogDebug(@"Returns: %@", r ? @"YES" : @"NO")/g; '
@menushka
menushka / downloadiOSHeaders.py
Last active January 4, 2023 06:26
Download iOS Headers from http://developer.limneos.net. Includes settings for iOS version, download path and only downloading select frameworks.
View downloadiOSHeaders.py
from lxml import html
import requests
import re
import os
def createDir(path):
if not os.path.exists(path): os.makedirs(path)
# Settings
iosVersion = "12.1"
@menushka
menushka / airdropSorter.scpt
Created December 30, 2018 22:47
A Folder Action script written in AppleScript used to separate AirDropped files into a different folder other than the default Downloads folder
View airdropSorter.scpt
property AIRDROP_FOLDER : "Path:to:AirDrop:Folder:in:Alias:format"
property QUARANTINE_KEY : "59"
property GET_QUARANTINE_COMMAND_START : "ls -l -@ '"
property GET_QUARANTINE_COMMAND_END : "' | tr '\\n' ' ' | sed 's/.*com\\.apple\\.quarantine\\s*\\(\\d*\\)/ \\1/' | awk '{$1=$1};1'"
on adding folder items to this_folder after receiving added_items
repeat with i from 1 to length of added_items
set current_item to item i of added_items
set quarantine_type to getQuarantineType(POSIX path of current_item)
@menushka
menushka / generateTestUsers.sh
Created March 29, 2018 19:16
Generate Facebook Test Users
View generateTestUsers.sh
#!/bin/sh
APP_TOKEN="FACEBOOK APP TOKEN"
APP_ID="FACEBOOK APP ID"
NUMBER_OF_USERS=500
createTestUser () {
curl -s -i -X POST \
-d "=" \