Skip to content

Instantly share code, notes, and snippets.

Avatar
🏔️
Darwin tooling

Leptos leptos-null

🏔️
Darwin tooling
View GitHub Profile
@leptos-null
leptos-null / mach_slide.c
Last active Jul 31, 2019
Function to get the image_vmaddr_slide of a mach_header
View mach_slide.c
//
// mach_slide.c
//
// This code was based on functions from https://opensource.apple.com/source/dyld
// See the Apple Public Source License https://www.opensource.apple.com/apsl
//
// Created by Leptos on 5/11/19.
//
#include <string.h>
@leptos-null
leptos-null / taylor_sin.c
Last active Apr 28, 2019
A C sine routine implemented using a Taylor series
View taylor_sin.c
//
// taylor_sin.c
//
// Created by Leptos on 4/25/19.
// Copyright © 2019 Leptos. All rights reserved.
//
#include <math.h> // not required- included only for the M_PI macros which are also included below
#include <errno.h> // needed to set errno in the even that the input of sin is an infinity
@leptos-null
leptos-null / UIOrientationPortableState.h
Created Apr 26, 2019
An idea for maintaining orientation state through notify_state
View UIOrientationPortableState.h
union UIOrientationPortableState {
struct UIOrientationState {
enum UIOrientation { /* this is UIInterfaceOrientation, but unsigned */
UIOrientationUnknown,
UIOrientationPortrait,
UIOrientationPortraitUpsideDown,
UIOrientationLandscapeRight,
UIOrientationLandscapeLeft
}
current : 3, // may be the orientation the device is transitioning to, if transition != UITransitionPhaseZero
@leptos-null
leptos-null / floating.c
Created Mar 3, 2019
Visualizing and understanding IEEE 754 floating point values
View floating.c
//
// floating.c
// funbits
//
// Created by Leptos on 8/18/18.
// Copyright © 2018 Leptos. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
@leptos-null
leptos-null / ios_image_app_url_dump.m
Last active Apr 19, 2020
Dump URL schemes from an iOS system image (stock applications)
View ios_image_app_url_dump.m
//
// ios_image_app_url_dump
//
// Created by Leptos on 2/19/19.
// Copyright © 2019 Leptos. All rights reserved.
//
/* compile with:
* $ clang -fobjc-arc -framework Foundation
*/
@leptos-null
leptos-null / progress_bar.c
Last active Apr 28, 2019
Example of a VT100 progress bar in C
View progress_bar.c
//
// progress_bar.c
//
// Created by Leptos on 2/17/19.
// Copyright © 2018 Leptos. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
@leptos-null
leptos-null / YouTube_Music_Client.md
Last active Sep 14, 2021
Writing an iOS YouTube Music client
View YouTube_Music_Client.md

Writing an iOS YouTube Music client

I’ve been using YouTube Music as my main music streaming service for almost a year and a half. The iOS client is great- I’ve never had a single complaint. It’s potentially one of the most bug free apps I’ve ever used, it has an extremely friendly, and simple, graphical interface, and the service itself is great.

I was curious how the client worked in terms of networking, and while curiosity may treat cats poorly, it lands researchers in black sites can provide a lot of insight.

Step 0

The first thing I do when reverse engineering a client is monitor HTTP requests while the application starts up, and when doing the tasks interested in. On a jailbroken iOS device, I use FLEX by FlipBoard.

@leptos-null
leptos-null / protobuf.nanorc
Last active Dec 19, 2018
Protobuf syntax highlighting for nano
View protobuf.nanorc
## Protobuf syntax highlighting for nano by Leptos
## Based off creekpld's Swift syntax highlighter
syntax "Protobuf" "\.proto$"
# Default
color white ".+"
# Keywords
color yellow "^ *\<(syntax|package|import|option)\>"
@leptos-null
leptos-null / YTIThumbnailDetails.md
Last active Dec 15, 2018
Odd encoding in YTIThumbnailDetails property list
View YTIThumbnailDetails.md

YTIThumbnailDetails classdump notes

While class dumping YouTube Music, I ran into two problematic properties in a protobuf-generated class.

The property largestImageSource had the type encoding

{YTImageSource=@@{YTClientResource=@@{optional<unsigned int>=B(?={dummy_type=[4{empty_struct=}]}I)}}{optional<unsigned int>=B(?={dummy_type=[4{empty_struct=}]}I)}{optional<unsigned int>=B(?={dummy_type=[4{empty_struct=}]}I)}}
@leptos-null
leptos-null / LMApiaryDeviceCrypto.h
Last active Jul 20, 2021
Fully implemented mirror of YouTube's YTApiaryDeviceCrypto class
View LMApiaryDeviceCrypto.h
//
// LMApiaryDeviceCrypto.h
//
// Created by Leptos on 11/18/18.
// Copyright © 2018 Leptos. All rights reserved.
//
#import <Foundation/Foundation.h>
#define kYouTubeBase64EncodedProjectKey @"vOU14u6GkupSL2pLKI/B7L3pBZJpI8W92RoKHJOu3PY="