Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View hym3242's full-sized avatar
💭
still lovin' TIOCSTI

hym3242 hym3242

💭
still lovin' TIOCSTI
View GitHub Profile
@hym3242
hym3242 / SLsymtest.c
Last active April 22, 2024 17:26
macOS privateframework SkyLight.framework private external function test: flash your screen with a visual bell!
//compile with
//cc SLsymtest.c -o SLsymtest -framework Carbon -undefined dynamic_lookup
// -framework for macho loading commands for SkyLight to be loaded otherwise dyld at runtime will complain and abort
// -undefined dynamic_lookup to prevent linker from complaining it can't find a definition/implementation for symbol
void SLDisplayDefaultVisualBell();
int main(){
SLDisplayDefaultVisualBell(); //via default mach port to WindowServer (after SkyLight bootstraps)
return 0;
@hym3242
hym3242 / BetterFormattedDescription.txt
Last active April 9, 2024 08:54
Better formatted description of NARA record "Private Motion Pictures of Adolf Hitler and Eva Braun" https://catalog.archives.gov/id/43461
Reel 1
Part 1, b&w, Eva Braun swims with her parents and others at Hitler's mountain retreat at Berchtesgaden. Hitler and Eva greet guests. Eva swims and performs gymnastics.
Part 2, color, shows Hitler, Eva, and the mountains surrounding the retreat. Eva and others swim, surfboard, and play at nearby lakes. Shows Hitler and others on a terrace overlooking the mountains.
Part 3, b&w, Hitler stands with officers as a guard forms and departs.
Part 4, color, shows Eva picking flowers.
Part 5, b&w, Hitler talks to Himmler and other officers.
Reel 2
Part 1, color, shows a panoramic view from the terrace of Hitler's retreat. Eva greets Goebbels. Hitler talks to Himmler and others.
Part 2, b&w, Hitler greets a group of women and children.
Part 3, color, shows the surrounding mountains. Hitler plays with a dog, children play in the snow, and Eva and others swim and play in the water.
@hym3242
hym3242 / PressSpace.ahk
Created March 31, 2024 20:50
PressSpace.ahk for plane grabbing in Battlefield 1
#Persistent
SetTimer, PressSpaceIfBF1, 7
Return
PressSpaceIfBF1:
IfWinActive, ahk_exe bf1.exe
{
Send, {Space down}
Sleep, 10
Send, {Space up}
@hym3242
hym3242 / NARA.API.sample.usage.sh
Last active March 29, 2024 20:07
NARA (catalog.archives.gov) API (reverse-engineered) sample usage
for n in {1..10}; do curl -s "https://catalog.archives.gov/proxy/records/search?ancestorNaId=533461&page=$n&limit=100&availableOnline=true&abbreviated=true&debug=true&datesAgg=true" | jq -r '.body.hits.hits[] | "https://catalog.archives.gov/id/\(._id)\t\(._source.record.ancestors[] | select(.distance == 2) | .title + "\t" + .creators[0].heading)\t\(._source.record.title)"' | colorevenoddlines; done
@hym3242
hym3242 / generatePlayM3U8.av.lib.uh.edu.media_objects.bashfunction
Created March 24, 2024 16:59
BASH function that prints m3u8 URLs for given media object link in University of Houston Audio Video Repository
avlibuheduplayurlGEN ()
{
curl "https://av.lib.uh.edu/media_objects/$(basename "$1")" | grep m3u8 | sed -n 's/.*\(https[^ ]*m3u8\).*/\1/p'
}
@hym3242
hym3242 / genAAPBPlayURL.bashfunction
Last active January 26, 2024 14:22
Generate direct m3u8 url from a url to americanarchive.org catalog
bash$ type genaapbplayurl
genaapbplayurl is a function
genaapbplayurl ()
{
curl -si "https://americanarchive.org/media/$(basename "$1")" -H "Referer: https://americanarchive.org/catalog/$(basename "$1")" --compressed | grep '^Location:' | cut -d ' ' -f 2
}

iOS Shared Cache Extraction

Having fallen off the iOS-exploration train due to completing my Masters and other commitments, I have finally climbed back aboard in pursuit of understanding the telephony stack.

Like most things in iOS that are used frequently, the vast majority of the frameworks and libraries used in the telephony stack reside in the DYLD shared cache located at /System/Library/Caches/com.apple.dyld/dyld_shared_cache_armv7.

In this post I am going to explain how to go about extracting this cache file so that you can then work with each library individually.

Get The Cache

The first step in all of this is to copy the cache over to your local machine. I did this using a program called iExplorer, but you can just as easily do it over SSH. As a side note, you can connect to your iDevice using SSH over USB if you install a tool called iProxy.

@hym3242
hym3242 / trivia.md
Created January 19, 2024 08:08
Misc trivia i know
  • The "force quit applications" window is from loginwindow.
@hym3242
hym3242 / macOS.10.15.AppKit.symbols.dump!grep.NSKeyBindingCommands.txt
Last active April 18, 2024 17:14
dump of macOS 10.15 AppKit symbols (grep NSKeyBindingCommands)
0x000000000041e50d ( 0x205) -[NSTextView(NSKeyBindingCommands) insertTab:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
0x000000000046d4ee ( 0x22d) -[NSTextView(NSKeyBindingCommands) insertNewline:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
0x000000000046e21a ( 0x35a) -[NSTextView(NSKeyBindingCommands) deleteBackward:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
0x000000000046e574 ( 0x358) -[NSTextView(NSKeyBindingCommands) _checkInList:listStart:markerRange:emptyItem:atEnd:inBlock:blockStart:forCharacterRange:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
0x0000000000471d20 ( 0x9e) -[NSTextView(NSKeyBindingCommands) deleteWordBackward:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
0x000000000084cf2c ( 0xe5) -[NSTextView(NSKeyBindingCommands) _verticalDistanceForPageScroll] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
0x
@hym3242
hym3242 / StandardKeyBinding.dict.dump
Last active April 21, 2024 22:32
Dump of /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict on macOS Ventura 13.4, plus some notes
$ # plz forgive this dumb method of visualization.
$ cp /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict .
$ plutil -convert xml1 StandardKeyBinding.dict
$ plutil -p StandardKeyBinding.dict | unicode-vis | cat -v | tr '\t' '+'
{
"^C" => "insertNewline:"
"^H" => "deleteBackward:"
"^Y" => "insertBacktab:" //shift+tab
"^[" => "cancelOperation:"
"^?" => "deleteBackward:"