|
|
@@ -13,7 +13,7 @@
|
|
|
#import <Foundation/Foundation.h>
|
|
|
#import "PureLayout.h"
|
|
|
#import "UIColor+Additions.h"
|
|
|
-
|
|
|
+#import <CoreFoundation/CoreFoundation.h>
|
|
|
//electra
|
|
|
|
|
|
#import "NSTask.h"
|
|
|
@@ -27,6 +27,9 @@
|
|
|
#include <string.h>
|
|
|
#include <dlfcn.h>
|
|
|
|
|
|
+CF_EXPORT CFDictionaryRef _CFCopySystemVersionDictionary(void);
|
|
|
+CF_EXPORT CFDictionaryRef _CFCopyServerVersionDictionary(void);
|
|
|
+
|
|
|
static ViewController *currentViewController;
|
|
|
|
|
|
typedef NS_ENUM(NSInteger, BSInstallType) {
|
|
|
@@ -244,11 +247,17 @@ bool jailbreak_has_run = false;
|
|
|
return;
|
|
|
}
|
|
|
*/
|
|
|
+
|
|
|
+
|
|
|
[self writeTextPlain:[NSString stringWithFormat:@"> %s on iOS %@ (Build %@)",
|
|
|
[self getDeviceIdentifier],
|
|
|
[self getVersionString],
|
|
|
[self getBuildString]]];
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if (jailbreak_has_run) {
|
|
|
[self writeTextPlain:@"> already jailbroken."];
|
|
|
|
|
|
@@ -419,6 +428,21 @@ bool jailbreak_has_run = false;
|
|
|
}
|
|
|
|
|
|
- (NSString *)getBuildString {
|
|
|
+
|
|
|
+
|
|
|
+ NSString *hey = [[NSProcessInfo processInfo] operatingSystemVersionString];
|
|
|
+ CFDictionaryRef dict= NULL;
|
|
|
+ CFStringRef str = NULL;
|
|
|
+ char cstr[256];
|
|
|
+
|
|
|
+ dict = _CFCopyServerVersionDictionary();
|
|
|
+ if (dict == NULL)
|
|
|
+ dict = _CFCopySystemVersionDictionary();
|
|
|
+
|
|
|
+ str = CFDictionaryGetValue(dict, CFSTR("ProductBuildVersion"));
|
|
|
+ //NSLog(@"pbv: %@", str);
|
|
|
+ return (__bridge NSString *)str;
|
|
|
+
|
|
|
NSString *verString = [[NSProcessInfo processInfo] operatingSystemVersionString];
|
|
|
// wish there was a better way of doing this (hopefully there is)
|
|
|
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"14[A-Za-z0-9]{3,5}"
|