mirror of
https://github.com/faroukbmiled/RyukGram.git
synced 2026-08-13 22:50:34 +02:00
[release] RyukGram v1.2.2
- Profile Analyzer (beta) — follower/following scans with mutuals, non-followbacks, new/lost trackers, and profile change history; searchable lists with batch follow/unfollow - Theme settings — force dark mode, Full OLED, OLED chat theme, and keyboard theme picker - Confirm story like - Confirm story emoji reaction - Swipe down to dismiss media viewer - Manually add users to story/chat exclusion lists by username - Keep stories visually seen locally - Auto-scroll reels mode - Quality picker: audio-only and raw photo download rows - Clear cache button with optional auto-clear interval - Spanish, Russian, Korean, Arabic, and Chinese (Traditional) translations - About page with version, credits, and links - Release notes popup on first launch of a new version - Anonymous live viewing - Toggle live comments - Disappearing DM media overlay — action button, mark-as-viewed eye, and audio toggle - Hide RyukGram UI on screenshots, screen recordings, and mirroring - Open link from clipboard — long-press the search tab - Messages-only mode: optional "Hide tab bar" sub-toggle - Fake profile stats — verified badge and follower/following/post counts on your own profile - Language switcher + import/export localization from Debug - Reveal poll/slider vote counts and quiz answers on stories and reels before interacting - Force legacy Quiz sticker back into the story composer tray - Advanced experimental features menu — toggle hidden IG experiments (QuickSnap, Homecoming, Prism, Direct Notes reply types) with apply-on-restart batching and a crash-loop auto-reset - Shortcut to Advanced experimental features from the General experimental features section - Push notifications render with rich previews on sideload again - IG 426 compatibility across story audio toggle, like confirmation, seen-on-like, live comments, notes audio download - Call confirm split into separate voice-call and video-call toggles - Messages-only mode: tab swiping disabled - Settings quick-access broken in non-English languages - Story seen-receipt block restored on IG v426 - Block selected mode no longer marks listed stories as seen - Hide explore posts grid works again on recent IG versions - Hide suggested stories no longer breaks profile highlights - Hide trending searches now also hides the category chip bar - Story eye long-press menu opens next to the button - Disable video autoplay: tap-to-play now works on videos inside carousels - Disable vanish mode swipe fixed on IG 426 - "Confirm shh mode" renamed to "Confirm vanish mode" across all languages - Confirm sticker interaction split into separate story and highlight toggles - Shared link embed presets: added eeinstagram.com and vxinstagram.com - Downloaded media filenames follow `@username_context_timestamp` - Reels pause mode: optional tap-to-mute on photo reels - Backup & Restore — scope picker with live preview for Settings / Excluded lists / Analyzer data - Profile Analyzer: filter by Not verified - Settings header: tap to open a sheet with GitHub and Telegram channel links - Thanks to Furamako for the Spanish translation - Thanks to [ZomkaDEV](https://github.com/ZomkaDEV) for the Russian translation - Thanks to [@ch1tmdgus](https://github.com/ch1tmdgus) (N4C) for the Korean translation - Thanks to [@bruuhim](https://github.com/bruuhim) for the Arabic translation - Thanks to [@jaydenjcpy](https://github.com/jaydenjcpy) for the Chinese (Traditional) translation - Thanks to [@darthplagueiswise](https://github.com/darthplagueiswise) (Radan) for the experimental flag feature set - Thanks to [@asdfzxcvbn](https://github.com/asdfzxcvbn) for [zxPluginsInject](https://github.com/asdfzxcvbn/zxPluginsInject) and [ipapatch](https://github.com/asdfzxcvbn/ipapatch) - Preserved unsent messages can't be removed via "Delete for you"; pull-to-refresh clears them (warning available in settings) - "Delete for you" detection uses a ~2s window after the local action — a real unsend landing in that window may be missed (rare) - With Liquid Glass buttons + Hide UI on capture both on, the DM eye leaves an empty glass bubble in captures
This commit is contained in:
+159
-16
@@ -5,14 +5,17 @@
|
||||
@implementation SCIDashRepresentation
|
||||
@end
|
||||
|
||||
// Resolve _fieldCache per class (walking the hierarchy). Caching the ivar
|
||||
// against IGAPIStorableObject and then reading that offset from an unrelated
|
||||
// class like IGVideo segfaults — ivar offsets aren't shared.
|
||||
static id sciDashFieldCache(id obj, NSString *key) {
|
||||
if (!obj || !key) return nil;
|
||||
static Ivar fcIvar = NULL;
|
||||
static dispatch_once_t once;
|
||||
dispatch_once(&once, ^{
|
||||
Class c = NSClassFromString(@"IGAPIStorableObject");
|
||||
if (c) fcIvar = class_getInstanceVariable(c, "_fieldCache");
|
||||
});
|
||||
if (!obj || !key.length) return nil;
|
||||
Ivar fcIvar = NULL;
|
||||
@try {
|
||||
for (Class c = [obj class]; c && !fcIvar; c = class_getSuperclass(c)) {
|
||||
fcIvar = class_getInstanceVariable(c, "_fieldCache");
|
||||
}
|
||||
} @catch (__unused id e) { return nil; }
|
||||
if (!fcIvar) return nil;
|
||||
id fc = nil;
|
||||
@try { fc = object_getIvar(obj, fcIvar); } @catch (__unused id e) { return nil; }
|
||||
@@ -24,30 +27,170 @@ static id sciDashFieldCache(id obj, NSString *key) {
|
||||
|
||||
@implementation SCIDashParser
|
||||
|
||||
// Looks like XML DASH manifest or a URL to one.
|
||||
static BOOL sciLooksLikeManifest(id val) {
|
||||
if (![val isKindOfClass:[NSString class]]) return NO;
|
||||
NSString *s = (NSString *)val;
|
||||
if (s.length < 10) return NO;
|
||||
NSString *head = [s substringToIndex:MIN((NSUInteger)16, s.length)];
|
||||
return [head containsString:@"<MPD"] || [head containsString:@"<?xml"]
|
||||
|| [head hasPrefix:@"http"];
|
||||
}
|
||||
|
||||
// Walk a fieldCache dict looking for any key containing "dash" or "manifest".
|
||||
static NSString *sciScanDictForManifest(NSDictionary *dict, NSString *path, int depth) {
|
||||
if (depth > 3 || ![dict isKindOfClass:[NSDictionary class]]) return nil;
|
||||
for (NSString *k in dict) {
|
||||
id v = dict[k];
|
||||
NSString *lk = k.lowercaseString;
|
||||
if (([lk containsString:@"dash"] || [lk containsString:@"manifest"]) && sciLooksLikeManifest(v)) {
|
||||
NSLog(@"[SCInsta][Dash] hit %@/%@ (len=%lu)", path, k, (unsigned long)[(NSString *)v length]);
|
||||
return v;
|
||||
}
|
||||
if ([v isKindOfClass:[NSDictionary class]]) {
|
||||
NSString *found = sciScanDictForManifest(v, [NSString stringWithFormat:@"%@/%@", path, k], depth + 1);
|
||||
if (found) return found;
|
||||
} else if ([v isKindOfClass:[NSArray class]]) {
|
||||
for (id item in (NSArray *)v) {
|
||||
if ([item isKindOfClass:[NSDictionary class]]) {
|
||||
NSString *found = sciScanDictForManifest(item, [NSString stringWithFormat:@"%@/%@[]", path, k], depth + 1);
|
||||
if (found) return found;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
static NSDictionary *sciFieldCacheDict(id obj) {
|
||||
if (!obj) return nil;
|
||||
Ivar fcIvar = NULL;
|
||||
@try {
|
||||
for (Class c = [obj class]; c && !fcIvar; c = class_getSuperclass(c)) {
|
||||
fcIvar = class_getInstanceVariable(c, "_fieldCache");
|
||||
}
|
||||
} @catch (__unused id e) { return nil; }
|
||||
if (!fcIvar) return nil;
|
||||
id fc = nil;
|
||||
@try { fc = object_getIvar(obj, fcIvar); } @catch (__unused id e) { return nil; }
|
||||
return [fc isKindOfClass:[NSDictionary class]] ? fc : nil;
|
||||
}
|
||||
|
||||
// Coerce an arbitrary object (NSString or NSData) into a manifest string.
|
||||
static NSString *sciToManifestString(id val) {
|
||||
if ([val isKindOfClass:[NSString class]] && [(NSString *)val length] > 10) return val;
|
||||
if ([val isKindOfClass:[NSData class]] && [(NSData *)val length] > 10) {
|
||||
NSString *s = [[NSString alloc] initWithData:(NSData *)val encoding:NSUTF8StringEncoding];
|
||||
if (s.length > 10) return s;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
+ (NSString *)dashManifestForMedia:(id)media {
|
||||
if (!media) return nil;
|
||||
|
||||
NSArray *keys = @[@"video_dash_manifest", @"dash_manifest",
|
||||
@"video_dash_manifest_url", @"dash_manifest_url"];
|
||||
|
||||
// Direct hits on the media's fieldCache (older builds).
|
||||
for (NSString *key in keys) {
|
||||
id val = sciDashFieldCache(media, key);
|
||||
if ([val isKindOfClass:[NSString class]] && [(NSString *)val length] > 10)
|
||||
return val;
|
||||
if (sciLooksLikeManifest(val)) return val;
|
||||
}
|
||||
|
||||
// IGBaseMedia -videoDashManifest (used through IG v440ish).
|
||||
@try {
|
||||
if ([media respondsToSelector:@selector(videoDashManifest)]) {
|
||||
id val = ((id(*)(id, SEL))objc_msgSend)(media, @selector(videoDashManifest));
|
||||
NSString *str = sciToManifestString(val);
|
||||
if (sciLooksLikeManifest(str)) return str;
|
||||
}
|
||||
} @catch (__unused id e) {}
|
||||
|
||||
// Nested IGVideo — both fieldCache + the new -dashManifestData NSData getter.
|
||||
id video = nil;
|
||||
SEL videoSel = @selector(video);
|
||||
if ([media respondsToSelector:videoSel]) {
|
||||
video = ((id(*)(id, SEL))objc_msgSend)(media, videoSel);
|
||||
if (video && ![(id)video isKindOfClass:[NSObject class]]) video = nil;
|
||||
}
|
||||
@try {
|
||||
if ([media respondsToSelector:@selector(video)]) {
|
||||
video = ((id(*)(id, SEL))objc_msgSend)(media, @selector(video));
|
||||
}
|
||||
} @catch (__unused id e) { video = nil; }
|
||||
if (video) {
|
||||
for (NSString *key in keys) {
|
||||
id val = sciDashFieldCache(video, key);
|
||||
if ([val isKindOfClass:[NSString class]] && [(NSString *)val length] > 10)
|
||||
return val;
|
||||
if (sciLooksLikeManifest(val)) return val;
|
||||
}
|
||||
@try {
|
||||
if ([video respondsToSelector:@selector(dashManifestData)]) {
|
||||
id val = ((id(*)(id, SEL))objc_msgSend)(video, @selector(dashManifestData));
|
||||
NSString *str = sciToManifestString(val);
|
||||
if (sciLooksLikeManifest(str)) return str;
|
||||
}
|
||||
} @catch (__unused id e) {}
|
||||
// Direct ivar read as last resort (handles future property removals).
|
||||
@try {
|
||||
Ivar iv = NULL;
|
||||
for (Class c = [video class]; c && !iv; c = class_getSuperclass(c))
|
||||
iv = class_getInstanceVariable(c, "_dashManifestData");
|
||||
if (iv) {
|
||||
id val = object_getIvar(video, iv);
|
||||
NSString *str = sciToManifestString(val);
|
||||
if (sciLooksLikeManifest(str)) return str;
|
||||
}
|
||||
} @catch (__unused id e) {}
|
||||
}
|
||||
|
||||
// Wider scan: walk the fieldCache dict recursively for any key containing
|
||||
// "dash" or "manifest".
|
||||
NSDictionary *fc = sciFieldCacheDict(media);
|
||||
if (fc) {
|
||||
NSString *found = sciScanDictForManifest(fc, @"fieldCache", 0);
|
||||
if (found) return found;
|
||||
|
||||
// Last-ditch manifest hunt + dump via iterative stack (no recursion,
|
||||
// no block self-capture).
|
||||
NSMutableArray *stack = [NSMutableArray arrayWithObject:@[fc, @"fieldCache", @(0)]];
|
||||
NSString *bigManifest = nil;
|
||||
NSString *bigManifestPath = nil;
|
||||
NSMutableArray *longStrings = [NSMutableArray array];
|
||||
while (stack.count) {
|
||||
NSArray *frame = stack.lastObject; [stack removeLastObject];
|
||||
id obj = frame[0];
|
||||
NSString *path = frame[1];
|
||||
int depth = [frame[2] intValue];
|
||||
if (depth > 4) continue;
|
||||
if ([obj isKindOfClass:[NSDictionary class]]) {
|
||||
for (NSString *k in obj) {
|
||||
[stack addObject:@[obj[k], [NSString stringWithFormat:@"%@/%@", path, k], @(depth + 1)]];
|
||||
}
|
||||
} else if ([obj isKindOfClass:[NSArray class]]) {
|
||||
NSUInteger i = 0;
|
||||
for (id item in obj) {
|
||||
[stack addObject:@[item, [NSString stringWithFormat:@"%@[%lu]", path, (unsigned long)i++], @(depth + 1)]];
|
||||
}
|
||||
} else if ([obj isKindOfClass:[NSString class]]) {
|
||||
NSString *s = obj;
|
||||
if (s.length > 300) {
|
||||
NSString *head = [s substringToIndex:MIN((NSUInteger)32, s.length)];
|
||||
if (!bigManifest && ([head containsString:@"<MPD"] || [head containsString:@"<?xml"])) {
|
||||
bigManifest = s;
|
||||
bigManifestPath = path;
|
||||
}
|
||||
if (s.length > 200) [longStrings addObject:@[path, @(s.length), [s substringToIndex:MIN((NSUInteger)120, s.length)]]];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (bigManifest) {
|
||||
NSLog(@"[SCInsta][Dash] found manifest at %@ (len=%lu)", bigManifestPath, (unsigned long)bigManifest.length);
|
||||
return bigManifest;
|
||||
}
|
||||
|
||||
static dispatch_once_t once;
|
||||
dispatch_once(&once, ^{
|
||||
NSLog(@"[SCInsta][Dash] no manifest found; top-level keys=%@", [[fc allKeys] componentsJoinedByString:@","]);
|
||||
for (NSArray *row in longStrings) {
|
||||
NSLog(@"[SCInsta][Dash] long-str %@ (len=%@) head=%@", row[0], row[1], row[2]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return nil;
|
||||
|
||||
Reference in New Issue
Block a user