Skip to content
Browse files

think for yourself, question authority

  • Loading branch information...
1 parent 338d147 commit 3660578037dfa09e1851ebd66a65bf85a1dd5313 FireCore, LLC committed
View
79 English.lproj/MainMenu.xib
@@ -14,9 +14,9 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="29"/>
<integer value="630"/>
- <integer value="372"/>
<integer value="584"/>
- <integer value="764"/>
+ <integer value="770"/>
+ <integer value="372"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1413,7 +1413,7 @@
<string key="NSClassName">NSFontManager</string>
</object>
<object class="NSCustomView" id="603157072">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1422,7 +1422,6 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{306, 82}, {98, 17}}</string>
<reference key="NSSuperview" ref="603157072"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="99314572">
<int key="NSCellFlags">68288064</int>
@@ -1459,7 +1458,6 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{90, 82}, {79, 17}}</string>
<reference key="NSSuperview" ref="603157072"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="398376766">
<int key="NSCellFlags">68288064</int>
@@ -1476,7 +1474,6 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{296, 107}, {117, 113}}</string>
<reference key="NSSuperview" ref="603157072"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="873271656">
<int key="NSCellFlags">-2080244224</int>
@@ -1501,7 +1498,6 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{72, 107}, {117, 113}}</string>
<reference key="NSSuperview" ref="603157072"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="826826450">
<int key="NSCellFlags">67239424</int>
@@ -1523,8 +1519,6 @@
</object>
</object>
<string key="NSFrameSize">{502, 286}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="867445732">
@@ -1877,7 +1871,7 @@
<object class="NSButton" id="634087851">
<reference key="NSNextResponder" ref="784097789"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{178, 154}, {139, 32}}</string>
+ <string key="NSFrame">{{177, 160}, {139, 32}}</string>
<reference key="NSSuperview" ref="784097789"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1068911896">
@@ -1923,7 +1917,7 @@
<object class="NSButtonCell" key="NSCell" id="263526914">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
- <string key="NSContents">Start Countdown</string>
+ <string key="NSContents">Enter DFU</string>
<reference key="NSSupport" ref="1037303427"/>
<reference key="NSControlView" ref="930133940"/>
<int key="NSButtonFlags">-2038284033</int>
@@ -1943,7 +1937,7 @@
<object class="NSTextFieldCell" key="NSCell" id="871744638">
<int key="NSCellFlags">-1805517311</int>
<int key="NSCellFlags2">272662528</int>
- <string key="NSContents">go aes dec d6e992912f27c60d82f2800e4f9a4d53d1e91dc90359d7a1fb256f619449e28c6746a574dd8f1420a9f801a6e48aee75</string>
+ <string key="NSContents">go aes dec </string>
<reference key="NSSupport" ref="1037303427"/>
<reference key="NSControlView" ref="778090739"/>
<bool key="NSDrawsBackground">YES</bool>
@@ -1958,7 +1952,7 @@
</object>
<object class="NSTextField" id="862394612">
<reference key="NSNextResponder" ref="784097789"/>
- <int key="NSvFlags">268</int>
+ <int key="NSvFlags">-2147483380</int>
<string key="NSFrame">{{142, 143}, {220, 17}}</string>
<reference key="NSSuperview" ref="784097789"/>
<bool key="NSEnabled">YES</bool>
@@ -1974,7 +1968,7 @@
</object>
<object class="NSTextField" id="663071707">
<reference key="NSNextResponder" ref="784097789"/>
- <int key="NSvFlags">268</int>
+ <int key="NSvFlags">-2147483380</int>
<string key="NSFrame">{{364, 143}, {38, 17}}</string>
<reference key="NSSuperview" ref="784097789"/>
<bool key="NSEnabled">YES</bool>
@@ -2959,20 +2953,28 @@
<int key="connectionID">776</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">startCountdown:</string>
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">countdownField</string>
<reference key="source" ref="976324537"/>
- <reference key="destination" ref="930133940"/>
+ <reference key="destination" ref="663071707"/>
</object>
- <int key="connectionID">785</int>
+ <int key="connectionID">787</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">countdownField</string>
+ <string key="label">otherWindow</string>
<reference key="source" ref="976324537"/>
- <reference key="destination" ref="663071707"/>
+ <reference key="destination" ref="499787355"/>
</object>
- <int key="connectionID">787</int>
+ <int key="connectionID">806</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">dfuMode:</string>
+ <reference key="source" ref="976324537"/>
+ <reference key="destination" ref="930133940"/>
+ </object>
+ <int key="connectionID">807</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -4383,11 +4385,11 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="778090739"/>
- <reference ref="634087851"/>
<reference ref="866039869"/>
<reference ref="862394612"/>
<reference ref="663071707"/>
<reference ref="930133940"/>
+ <reference ref="634087851"/>
</object>
<reference key="parent" ref="499787355"/>
</object>
@@ -5063,7 +5065,7 @@
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCjgAAwsIAAA</bytes>
</object>
- <string>{{408, 633}, {231, 203}}</string>
+ <string>{{507, 677}, {231, 203}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{23, 794}, {245, 183}}</string>
@@ -5157,14 +5159,14 @@
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{370, 553}, {519, 202}}</string>
+ <string>{{379, 557}, {519, 202}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{370, 553}, {519, 202}}</string>
+ <string>{{379, 557}, {519, 202}}</string>
<boolean value="NO"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABCVAAAwyoAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABDMgAAwz4AAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -5200,7 +5202,7 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{452, 109}, {196, 203}}</string>
+ <string>{{609, 677}, {196, 203}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{145, 474}, {199, 203}}</string>
@@ -5228,12 +5230,19 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">787</int>
+ <int key="maxID">807</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
+ <string key="className">NSApplication</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">NSApplication+SystemVersion.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">SPButton</string>
<string key="superclassName">NSButton</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -5273,6 +5282,7 @@
<string>fixScript:</string>
<string>itunesRestore:</string>
<string>keydumpPrep:</string>
+ <string>poison:</string>
<string>processOne:</string>
<string>sendCommand:</string>
<string>startCountdown:</string>
@@ -5290,6 +5300,7 @@
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
@@ -5302,6 +5313,7 @@
<string>fixScript:</string>
<string>itunesRestore:</string>
<string>keydumpPrep:</string>
+ <string>poison:</string>
<string>processOne:</string>
<string>sendCommand:</string>
<string>startCountdown:</string>
@@ -5334,6 +5346,10 @@
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
+ <string key="name">poison:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
<string key="name">processOne:</string>
<string key="candidateClassName">id</string>
</object>
@@ -5366,6 +5382,7 @@
<string>firstView</string>
<string>instructionField</string>
<string>instructionImage</string>
+ <string>otherWindow</string>
<string>secondView</string>
<string>window</string>
</object>
@@ -5382,6 +5399,7 @@
<string>NSView</string>
<string>NSTextField</string>
<string>NSImageView</string>
+ <string>NSWindow</string>
<string>NSView</string>
<string>NSWindow</string>
</object>
@@ -5401,6 +5419,7 @@
<string>firstView</string>
<string>instructionField</string>
<string>instructionImage</string>
+ <string>otherWindow</string>
<string>secondView</string>
<string>window</string>
</object>
@@ -5451,6 +5470,10 @@
<string key="candidateClassName">NSImageView</string>
</object>
<object class="IBToOneOutletInfo">
+ <string key="name">otherWindow</string>
+ <string key="candidateClassName">NSWindow</string>
+ </object>
+ <object class="IBToOneOutletInfo">
<string key="name">secondView</string>
<string key="candidateClassName">NSView</string>
</object>
View
2 FWBundle.h
@@ -65,7 +65,7 @@
- (NSDictionary *)fwDictionary;
- (NSString *)localBundlePath;
-
+- (BOOL)is4point3;
@end
/*
View
54 FWBundle.m
@@ -120,30 +120,76 @@ - (NSString *)outputName
return [[self bundleName] stringByAppendingString:@"_SP_Restore.ipsw"];
}
-- (NSString *)ramdiskSize
+- (NSString *)oldramdiskSize
{
if ([[self bundleName] isEqualToString:@"AppleTV2,1_4.3_8F5148c"])
{
return @"24676576";
} else if ([[self bundleName] isEqualToString:@"AppleTV2,1_4.3_8F5153d"]){
return @"24676576";
+ } else if ([[self bundleName] isEqualToString:@"AppleTV2,1_4.3_8F5166b"]) {
+ return @"24676576";
+ } else {
+ return @"16541920";
+ }
+}
+
+- (NSString *)ramdiskSize
+{
+ if ([self is4point3])
+ {
+ return @"24676576";
} else {
- return @"16541920"; }
+ return @"16541920";
+ }
+}
+
+- (BOOL)is4point3
+{
+ NSString *clippedPath = [[self bundleName] substringToIndex:14];
+ if ([clippedPath isEqualToString:@"AppleTV2,1_4.3"])
+ {
+ return YES;
+ } else {
+ return NO;
+ }
+ return NO;
}
- (NSDictionary *)extraPatch
{
+ if ([self is4point3])
+ {
+ NSDictionary *thePatch = [NSDictionary dictionaryWithObjectsAndKeys:[[NSBundle mainBundle] pathForResource:@"status" ofType:@"patch" inDirectory:@"patches"], @"Patch", @"private/var/lib/dpkg/status", @"Target", @"7945d79f0dad7c3397b930877ba92ec4", @"md5", nil];
+ NSLog(@"extraPatch: %@", thePatch);
+ return thePatch;
+ }
+}
+
+- (NSDictionary *)oldextraPatch
+{
+
+ NSString *clippedPath = [[self bundleName] substringToIndex:14];
+ NSLog(@"clippedPath: %@", clippedPath);
+
+ if ([[self bundleName] isEqualToString:@"AppleTV2,1_4.3_8F5166b"])
+ {
+ NSDictionary *thePatch = [NSDictionary dictionaryWithObjectsAndKeys:[[NSBundle mainBundle] pathForResource:@"status" ofType:@"patch" inDirectory:@"patches"], @"Patch", @"private/var/lib/dpkg/status", @"Target", @"7945d79f0dad7c3397b930877ba92ec4", @"md5", nil];
+ //NSLog(@"extraPatch: %@", thePatch);
+ return thePatch;
+ }
+
if ([[self bundleName] isEqualToString:@"AppleTV2,1_4.3_8F5148c"])
{
NSDictionary *thePatch = [NSDictionary dictionaryWithObjectsAndKeys:[[NSBundle mainBundle] pathForResource:@"status" ofType:@"patch" inDirectory:@"patches"], @"Patch", @"private/var/lib/dpkg/status", @"Target", @"7945d79f0dad7c3397b930877ba92ec4", @"md5", nil];
- NSLog(@"extraPatch: %@", thePatch);
+ //NSLog(@"extraPatch: %@", thePatch);
return thePatch;
}
if ([[self bundleName] isEqualToString:@"AppleTV2,1_4.3_8F5153d"])
{
NSDictionary *thePatch = [NSDictionary dictionaryWithObjectsAndKeys:[[NSBundle mainBundle] pathForResource:@"status" ofType:@"patch" inDirectory:@"patches"], @"Patch", @"private/var/lib/dpkg/status", @"Target", @"7945d79f0dad7c3397b930877ba92ec4", @"md5", nil];
- NSLog(@"extraPatch: %@", thePatch);
+ //NSLog(@"extraPatch: %@", thePatch);
return thePatch;
}
View
11 NSApplication+SystemVersion.h
@@ -0,0 +1,11 @@
+#import <Cocoa/Cocoa.h>
+
+@interface NSApplication (SystemVersion)
+
+- (void)getSystemVersionMajor:(unsigned *)major
+ minor:(unsigned *)minor
+ bugFix:(unsigned *)bugFix;
+
+@end
+
+
View
53 NSApplication+SystemVersion.m
@@ -0,0 +1,53 @@
+
+@implementation NSApplication (SystemVersion)
+
+- (void)getSystemVersionMajor:(unsigned *)major
+ minor:(unsigned *)minor
+ bugFix:(unsigned *)bugFix;
+{
+ OSErr err;
+ SInt32 systemVersion, versionMajor, versionMinor, versionBugFix;
+ if ((err = Gestalt(gestaltSystemVersion, &systemVersion)) != noErr) goto fail;
+ if (systemVersion < 0x1040)
+ {
+ if (major) *major = ((systemVersion & 0xF000) >> 12) * 10 +
+ ((systemVersion & 0x0F00) >> 8);
+ if (minor) *minor = (systemVersion & 0x00F0) >> 4;
+ if (bugFix) *bugFix = (systemVersion & 0x000F);
+ }
+ else
+ {
+ if ((err = Gestalt(gestaltSystemVersionMajor, &versionMajor)) != noErr) goto fail;
+ if ((err = Gestalt(gestaltSystemVersionMinor, &versionMinor)) != noErr) goto fail;
+ if ((err = Gestalt(gestaltSystemVersionBugFix, &versionBugFix)) != noErr) goto fail;
+ if (major) *major = versionMajor;
+ if (minor) *minor = versionMinor;
+ if (bugFix) *bugFix = versionBugFix;
+ }
+
+ return;
+
+fail:
+ NSLog(@"Unable to obtain system version: %ld", (long)err);
+ if (major) *major = 10;
+ if (minor) *minor = 0;
+ if (bugFix) *bugFix = 0;
+}
+
+@end
+
+/*
+int main(void)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ unsigned major, minor, bugFix;
+ [[NSApplication sharedApplication]
+ getSystemVersionMajor:&major minor:&minor bugFix:&bugFix];
+ NSLog(@"%u.%u.%u", major, minor, bugFix);
+
+ [pool release];
+ return EXIT_SUCCESS;
+}
+
+*/
View
4 main.m
@@ -9,7 +9,7 @@
#ifdef DEBUG
#define LOG_PATH @"Library/Logs/SP_Debug_db.log"
#else
-#define LOG_PATH @"Library/Logs/SP_Debug_new.log"
+#define LOG_PATH @"Library/Logs/SP_Debug.log"
#endif
#import <Cocoa/Cocoa.h>
@@ -24,9 +24,11 @@ int main(int argc, char *argv[])
//FIXME: COMMENT BACK IN BEFORE RELEASE!!!!
id pool = [NSAutoreleasePool new];
+
NSString *logPath = [NSHomeDirectory() stringByAppendingPathComponent:LOG_PATH];
freopen([logPath fileSystemRepresentation], "a", stderr);
+
[pool release];
View
2 pwnHelperClass.h
@@ -21,7 +21,7 @@
- (int)permissionedCopy:(NSString *)inputFile toPath:(NSString *)outputFile;
- (NSDictionary *)processDict;
- (void)setProcessDict:(NSDictionary *)value;
-- (void)patchDmg:(NSString *)theDMG;
+- (int)patchDmg:(NSString *)theDMG;
- (void)changeStatus:(NSString *)theStatus;
- (NSString *)runPath;
- (void)setRunPath:(NSString *)value;
View
2 tetherKit-Info.plist
@@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>32</string>
+ <string>36</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
View
9 tetherKit.xcodeproj/project.pbxproj
@@ -17,6 +17,7 @@
3200F4FA12D4DDEB003EA66E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3200F4F812D4DDEB003EA66E /* Localizable.strings */; };
3200F54712D4E1FF003EA66E /* tether.png in Resources */ = {isa = PBXBuildFile; fileRef = 3200F54612D4E1FF003EA66E /* tether.png */; };
3200F54B12D4E2B7003EA66E /* ipsw.png in Resources */ = {isa = PBXBuildFile; fileRef = 3200F54A12D4E2B7003EA66E /* ipsw.png */; };
+ 324FF2EC12F8CC690039310E /* NSApplication+SystemVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = 324FF2EB12F8CC690039310E /* NSApplication+SystemVersion.m */; };
3272047F12C9AD320054F4B0 /* libsyringe.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3272047E12C9AD320054F4B0 /* libsyringe.a */; };
327205DE12C9B5110054F4B0 /* ripURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 327205DD12C9B5110054F4B0 /* ripURL.m */; };
327206AA12C9C32A0054F4B0 /* nitoUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 327206A912C9C32A0054F4B0 /* nitoUtility.m */; };
@@ -130,6 +131,8 @@
3200F4F912D4DDEB003EA66E /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; };
3200F54612D4E1FF003EA66E /* tether.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tether.png; sourceTree = "<group>"; };
3200F54A12D4E2B7003EA66E /* ipsw.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ipsw.png; sourceTree = "<group>"; };
+ 324FF2EA12F8CC690039310E /* NSApplication+SystemVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSApplication+SystemVersion.h"; sourceTree = "<group>"; };
+ 324FF2EB12F8CC690039310E /* NSApplication+SystemVersion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSApplication+SystemVersion.m"; sourceTree = "<group>"; };
3272047E12C9AD320054F4B0 /* libsyringe.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libsyringe.a; sourceTree = "<group>"; };
327204A612C9AEAD0054F4B0 /* syringe.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = syringe.xcodeproj; path = "../Chronic-Dev-syringe/_ide/syringe.xcodeproj"; sourceTree = SOURCE_ROOT; };
327204C512C9AFBB0054F4B0 /* utilities.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = utilities.xcodeproj; path = "../Chronic-Dev-syringe/_ide/utilities.xcodeproj"; sourceTree = SOURCE_ROOT; };
@@ -234,6 +237,8 @@
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
+ 324FF2EA12F8CC690039310E /* NSApplication+SystemVersion.h */,
+ 324FF2EB12F8CC690039310E /* NSApplication+SystemVersion.m */,
32720F0F12CC66E10054F4B0 /* PatchedFile.h */,
32720F1012CC66E10054F4B0 /* PatchedFile.m */,
32720EF012CC63F80054F4B0 /* FWManager.h */,
@@ -622,6 +627,7 @@
32DF741912E17498002916D5 /* FWBundle.m in Sources */,
32DF825512E65280002916D5 /* SPButton.m in Sources */,
32DF84CE12E6E426002916D5 /* SPMenuItem.m in Sources */,
+ 324FF2EC12F8CC690039310E /* NSApplication+SystemVersion.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -763,10 +769,13 @@
"\"$(SDKROOT)/usr/lib/gcc/i686-apple-darwin10/4.0.1\"",
"\"$(SRCROOT)/../xpwn/idevice/QuicktimeSDK/Libraries\"",
);
+ ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"-lcurl",
"-lstdc++",
"-lz",
+ "-undefined",
+ dynamic_lookup,
);
PRODUCT_NAME = Seas0nPass;
SDKROOT = macosx10.6;
View
3 tetherKitAppDelegate.h
@@ -30,6 +30,7 @@ enum {
IBOutlet NSButton *buttonOne;
IBOutlet NSButton *cancelButton;
IBOutlet SPButton *bootButton;
+ IBOutlet NSWindow *otherWindow;
NSMutableArray *downloadFiles;
int downloadIndex;
BOOL processing;
@@ -50,6 +51,7 @@ enum {
@property (assign) IBOutlet NSArrayController *bundleController;
@property (assign) FWBundle *currentBundle;
@property (assign) IBOutlet NSWindow *window;
+@property (assign) IBOutlet NSWindow *otherWindow;
@property (assign) IBOutlet NSView *firstView;
@property (assign) IBOutlet NSView *secondView;
@property (readwrite, assign) BOOL processing;
@@ -58,6 +60,7 @@ enum {
@property (readwrite, assign) int downloadIndex;
@property (readwrite, assign) int counter;
+- (IBAction)poison:(id)sender;
- (IBAction)startCountdown:(id)sender;
- (void)firstTimer:(NSTimer *)timer;
- (BOOL) optionKeyIsDown;
View
184 tetherKitAppDelegate.m
@@ -45,7 +45,7 @@
@implementation tetherKitAppDelegate
-@synthesize window, downloadIndex, processing, enableScripting, firstView, secondView, poisoning, currentBundle, bundleController, counter;
+@synthesize window, downloadIndex, processing, enableScripting, firstView, secondView, poisoning, currentBundle, bundleController, counter, otherWindow;
/*
@@ -246,6 +246,158 @@ - (NSString *)ipswOutputPath
}
+
+void LogIt (NSString *format, ...)
+{
+ va_list args;
+
+ va_start (args, format);
+
+ NSString *string;
+
+ string = [[NSString alloc] initWithFormat: format arguments: args];
+
+ va_end (args);
+
+ printf ("%s", [string cString]);
+
+ [string release];
+
+} // LogIt
+
+- (void)printEnvironment
+{
+ /*
+
+ Process: Chicken of the VNC [5926]
+ Path: /Applications/Chicken of the VNC.app/Contents/MacOS/Chicken of the VNC
+ Identifier: com.geekspiff.chickenofthevnc
+ Version: 2.0b4 (2.0b4)
+ Code Type: X86 (Native)
+ Parent Process: launchd [175]
+
+ Date/Time: 2011-01-24 18:02:48.227 -0700
+ OS Version: Mac OS X 10.6.5 (10H574)
+ Report Version: 6
+
+ */
+
+ /*
+
+ CFBundleDevelopmentRegion = English;
+ CFBundleExecutable = Seas0nPass;
+ CFBundleExecutablePath = "/Users/kevinbradley/Projects/Seas0nPass/build/Release/Seas0nPass.app/Contents/MacOS/Seas0nPass";
+ CFBundleIconFile = Seas0nPass;
+ CFBundleIdentifier = "com.firecore.Seas0nPass";
+ CFBundleInfoDictionaryVersion = "6.0";
+ CFBundleInfoPlistURL = "Contents/Info.plist -- file://localhost/Users/kevinbradley/Projects/Seas0nPass/build/Release/Seas0nPass.app/";
+ CFBundleName = Seas0nPass;
+ CFBundleNumericVersion = 838893568;
+ CFBundlePackageType = APPL;
+ CFBundleShortVersionString = "0.6.9";
+ CFBundleSignature = "????";
+ CFBundleVersion = 32;
+ LSMinimumSystemVersion = "10.6";
+ NSBundleInitialPath = "/Users/kevinbradley/Projects/Seas0nPass/build/Release/Seas0nPass.app";
+ NSBundleResolvedPath = "/Users/kevinbradley/Projects/Seas0nPass/build/Release/Seas0nPass.app";
+ NSHumanReadableCopyright = "Copyright \U00a9 2011 FireCore, LLC";
+ NSMainNibFile = MainMenu;
+ NSPrincipalClass = NSApplication;
+ SUFeedURL = "http://files.firecore.com/SP/Seas0nPass.xml";
+
+ */
+ unsigned major, minor, bugFix;
+ [[NSApplication sharedApplication] getSystemVersionMajor:&major minor:&minor bugFix:&bugFix];
+ NSDictionary *bundle = [[NSBundle mainBundle] infoDictionary];
+
+ //NSLog(@"info: %@", [[NSBundle mainBundle] infoDictionary]);
+ NSString *process = [NSString stringWithFormat:@"Process:\t\t%@\n", [bundle valueForKey:@"CFBundleExecutable"] ];
+ NSString *path = [NSString stringWithFormat:@"Path:\t\t%@\n", [bundle valueForKey:@"CFBundleExecutablePath"] ];
+ NSString *ident = [NSString stringWithFormat:@"Identifier:\t\t%@\n", [bundle valueForKey:@"CFBundleIdentifier"] ];
+ NSString *vers = [NSString stringWithFormat:@"Version:\t\t%@ (%@)\n", [bundle valueForKey:@"CFBundleShortVersionString"], [bundle valueForKey:@"CFBundleVersion"]];
+ NSString *ct = [NSString stringWithFormat:@"Code Type:\t\t%@\n", @"idontknow"];
+ NSString *pp = [NSString stringWithFormat:@"Parent Process:\t\t%@\n\n", [bundle valueForKey:@"CFBundleIdentifier"] ];
+ NSString *date = [NSString stringWithFormat:@"Date/Time:\t\t%@\n", [[NSDate date] description]];
+ NSString *osvers = [NSString stringWithFormat:@"OS Version:\t\t%u.%u.%u\n\n\n", major, minor, bugFix];
+ NSLog(@"\n");
+ NSLog(@"BEGIN NEW SESSION\n");
+ NSLog(@"************************\n");
+ NSLog(@"%@", process);
+ NSLog(@"%@", path);
+ NSLog(@"%@", ident);
+ NSLog(@"%@", vers);
+ NSLog(@"%@", date);
+ NSLog(@"%@", osvers);
+ //[self gestaltFun];
+
+
+}
+
+- (void)gestaltFun
+{
+ OSType returnType;
+ long gestaltReturnValue,
+ swappedReturnValue;
+
+ NSLog(@"Gestalt fun...");
+
+ returnType=Gestalt(gestaltPhysicalRAMSize, &gestaltReturnValue);
+ if (!returnType)
+ {
+ NSLog(@"RAM: %d MB",(gestaltReturnValue/1048576));
+ } else {
+ NSLog(@"error calling Gestalt: %d", returnType);
+ }
+ //gestaltSysArchitecture
+ returnType=Gestalt(gestaltNativeCPUtype, &gestaltReturnValue);
+ if (!returnType)
+ {
+ char type[5] = { 0 };
+ swappedReturnValue = EndianU32_BtoN(gestaltReturnValue);
+ memmove( type, &swappedReturnValue, 4 );
+ NSLog(@"NativeCPUType: '%s' (%d)",type,gestaltReturnValue);
+
+ switch(gestaltReturnValue) {
+ case gestaltCPU601: NSLog(@"PowerPC 601"); break;
+ case gestaltCPU603: NSLog(@"PowerPC 603"); break;
+ case gestaltCPU603e: NSLog(@"PowerPC 603e"); break;
+ case gestaltCPU603ev: NSLog(@"PowerPC 603ev"); break;
+ case gestaltCPU604: NSLog(@"PowerPC 604"); break;
+ case gestaltCPU604e: NSLog(@"PowerPC 604e"); break;
+ case gestaltCPU604ev: NSLog(@"PowerPC 604ev"); break;
+ case gestaltCPU750: NSLog(@"G3"); break;
+ case gestaltCPUG4: NSLog(@"G4"); break;
+ case gestaltCPU970: NSLog(@"G5 (970)"); break;
+ case gestaltCPU970FX: NSLog(@"G5 (970 FX)"); break;
+ case gestaltCPU486 : NSLog(@"Intel 486"); break;
+ case gestaltCPUPentium: NSLog(@"Intel Pentium"); break;
+ case gestaltCPUPentiumPro: NSLog(@"Intel Pentium Pro"); break;
+ case gestaltCPUPentiumII: NSLog(@"Intel Pentium II"); break;
+ case gestaltCPUX86: NSLog(@"Intel x86"); break;
+ case gestaltCPUPentium4: NSLog(@"Intel Pentium 4"); break;
+ default: NSLog(@"error calling Gestalt: %d", returnType);
+ }
+ }
+
+ returnType=Gestalt(gestaltProcClkSpeed, &gestaltReturnValue);
+ if (!returnType)
+ {
+ NSLog(@"procSpeed: %d MHz",(gestaltReturnValue/1000000));
+ } else {
+ NSLog(@"error calling Gestalt: %d", returnType);
+ }
+
+ returnType=Gestalt( gestaltPowerPCProcessorFeatures, &gestaltReturnValue);
+ if (!returnType)
+ {
+ NSLog(@"PowerPC ProcFeatures: %d",(gestaltReturnValue));
+ if (gestaltPowerPCHasDCBAInstruction==gestaltReturnValue) {
+ }
+ } else {
+ NSLog(@"error calling Gestalt: %d", returnType);
+ }
+}
+
+ (NSString *)applicationSupportFolder {
NSFileManager *man = [NSFileManager defaultManager];
@@ -417,7 +569,7 @@ - (int)inject
return result;
}
[self setDownloadText:NSLocalizedString(@"Injecting Pois0n", @"Injecting Pois0n")];
- result = pois0n_inject();
+ result = pois0n_inject();
if (result < 0) {
[self setDownloadText:NSLocalizedString(@"Exploit injection failed!", @"Exploit injection failed!")];
[self hideProgress];
@@ -426,7 +578,7 @@ - (int)inject
[pool release];
return result;
}
- [self setDownloadText:@"Keydump preparation complete"];
+ [self setDownloadText:@"pois0n successfully administered"];
NSString *command = [commandTextField stringValue];
irecv_send_command(client, [command UTF8String]);
[self hideProgress];
@@ -602,6 +754,14 @@ int postcommand_cb(irecv_client_t client, const irecv_event_t* event) {
return 0;
}
+- (IBAction)poison:(id)sender
+{
+ NSString *lastUsedbundle = LAST_BUNDLE;
+ self.currentBundle = [FWBundle bundleWithName:lastUsedbundle];
+ [window setContentView:self.secondView];
+ [window display];
+ [NSThread detachNewThreadSelector:@selector(inject) toTarget:self withObject:nil];
+}
- (IBAction)sendCommand:(id)sender
{
@@ -860,8 +1020,13 @@ - (void)setBundleControllerContent
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// Insert code here to initialize your application
-
-
+ /*
+ if ([self optionKeyIsDown])
+ {
+ [otherWindow makeKeyAndOrderFront:nil];
+ }
+ */
+ [self printEnvironment];
[window setContentView:self.firstView];
downloadIndex = 0;
downloadFiles = [[NSMutableArray alloc] init];
@@ -1271,6 +1436,8 @@ - (IBAction)bootTethered:(id)sender
- (IBAction)dfuMode:(id)sender
{
[self killiTunes];
+ [window setContentView:self.secondView];
+ [window display];
[NSThread detachNewThreadSelector:@selector(enterDFU) toTarget:self withObject:nil];
}
@@ -1279,6 +1446,11 @@ - (IBAction)dfuMode:(id)sender
- (IBAction)processOne:(id)sender //download and modify ipsw
{
+
+ //[NSHomeDirectory() stringByAppendingPathComponent:@"Library/Logs/SP_Debug.log"]
+
+ NSString *logPath2 = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Logs/SP_Debug_new.log"];
+ [FM removeFileAtPath:logPath2 handler:nil];
//current bundle may be set by default, but we never want to assume the default processOne ipsw to be anything but the latest- which is still hardcoded to 4.2.1.
self.currentBundle = [FWBundle bundleWithName:@"AppleTV2,1_4.2.1_8C154"];
if ([self optionKeyIsDown])
@@ -1490,7 +1662,7 @@ - (void)customFW:(NSString *)inputIPSW
- (int)performFirmwarePatches:(FWBundle *)theBundle withUtility:(nitoUtility *)nitoUtil
{
- [theBundle logDescription];
+ //[theBundle logDescription];
int status = 0;
if ([theBundle iBSS] != nil)
{
View
1 tetherKit_Prefix.pch
@@ -5,4 +5,5 @@
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#import "PatchedFile.h"
+ #import "NSApplication+SystemVersion.h"
#endif

0 comments on commit 3660578

Please sign in to comment.
Something went wrong with that request. Please try again.