BandarHelal

Untitled

Sep 22nd, 2021
934
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %hook WAKeychainAccessGroup
  2. - (id)initWithName:(id)arg1 {
  3.     NSDictionary *query = [NSDictionary dictionaryWithObjectsAndKeys:
  4.                            (__bridge NSString *)kSecClassGenericPassword, (__bridge NSString *)kSecClass,
  5.                            @"bundleSeedID", kSecAttrAccount,
  6.                            @"", kSecAttrService,
  7.                            (id)kCFBooleanTrue, kSecReturnAttributes,
  8.                            nil];
  9.     CFDictionaryRef result = nil;
  10.     OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, (CFTypeRef *)&result);
  11.     if (status == errSecItemNotFound)
  12.         status = SecItemAdd((__bridge CFDictionaryRef)query, (CFTypeRef *)&result);
  13.         if (status != errSecSuccess)
  14.             return nil;
  15.     NSString *accessGroup = [(__bridge NSDictionary *)result objectForKey:(__bridge NSString *)kSecAttrAccessGroup];
  16.     if (accessGroup != nil) {
  17.         arg1 = accessGroup;
  18.     }
  19.     return %orig(arg1);
  20. }
  21. %end
RAW Paste Data