From e0d637cc4a60b2ce277a5157aab651b1647a80da Mon Sep 17 00:00:00 2001
From: Naville <403799106@qq.com>
Date: Fri, 12 Aug 2016 00:45:50 +0800
Subject: [PATCH] Add Callstack to output
---
BasePreferences.plist | 12 +
BuildConfig.py | 3 +-
CompileDefines.mm | 240 ++++++++++++++++++
Hooks/API/sysctl.xm | 2 +-
Hooks/Utils/PlistObjectConverter.m | 2 +-
Hooks/Utils/SQLiteStorage.h | 2 +-
Hooks/Utils/SQLiteStorage.m | 36 ++-
Makefile | 14 +
ThirdPartyTools/dumpdecrypted/dumpdecrypted.m | 3 +-
Tweak.xm | 1 -
VERSION | 2 +-
build.py | 6 +-
12 files changed, 306 insertions(+), 17 deletions(-)
create mode 100644 CompileDefines.mm
create mode 100644 Makefile
diff --git a/BasePreferences.plist b/BasePreferences.plist
index 944769b..15a4cad 100644
--- a/BasePreferences.plist
+++ b/BasePreferences.plist
@@ -33,6 +33,18 @@
label
Verbose Logging
+
+ cell
+ PSSwitchCell
+ default
+
+ defaults
+ naville.wtfjh
+ key
+ AddCallStackToDatabase
+ label
+ AddCallStackToDatabase
+
cell
PSSwitchCell
diff --git a/BuildConfig.py b/BuildConfig.py
index 9ef8cd3..70b26e1 100644
--- a/BuildConfig.py
+++ b/BuildConfig.py
@@ -1,8 +1,9 @@
#Put Your Lists Here
+import os
ManualList=["GlobalInit","getBoolFromPreferences","RandomString"]
ExtraFramework=["UIKit","CoreGraphics","CoreFoundation","QuartzCore","CFNetwork"]
ExtraLibrary=[]
LDFLAGS=["-lz","-L.","-v","-force_load ./ExtraFWs/libcapstone.a","-force_load ./ExtraFWs/libLiberation.a","-force_load ./ExtraFWs/Reveal.framework/Reveal","-force_load ./ExtraFWs/Cycript.framework/Cycript","-F./ExtraFWs/","-Wno-unused-function"]
-ExtraCFlags=["-I./Hooks/"]
+ExtraCFlags=["-I"+os.getcwd()+"/Hooks/"]
ExtraOBJFiles=[]
ExtraCCFlags=["-std=c++11"]
diff --git a/CompileDefines.mm b/CompileDefines.mm
new file mode 100644
index 0000000..9812dc5
--- /dev/null
+++ b/CompileDefines.mm
@@ -0,0 +1,240 @@
+#import "./Hooks/Obfuscation.h"
+void GlobalInit() {
+extern BOOL getBoolFromPreferences(NSString *preferenceValue);
+if (getBoolFromPreferences(@"AppleAccount") == YES) {
+NSLog(@"AppleAccountInit");
+extern void init_AppleAccount_hook();
+ init_AppleAccount_hook();
+}
+if (getBoolFromPreferences(@"CommonCryptor") == YES) {
+NSLog(@"CommonCryptorInit");
+extern void init_CommonCryptor_hook();
+ init_CommonCryptor_hook();
+}
+if (getBoolFromPreferences(@"CommonDigest") == YES) {
+NSLog(@"CommonDigestInit");
+extern void init_CommonDigest_hook();
+ init_CommonDigest_hook();
+}
+if (getBoolFromPreferences(@"CommonHMAC") == YES) {
+NSLog(@"CommonHMACInit");
+extern void init_CommonHMAC_hook();
+ init_CommonHMAC_hook();
+}
+if (getBoolFromPreferences(@"CommonKeyDerivation") == YES) {
+NSLog(@"CommonKeyDerivationInit");
+extern void init_CommonKeyDerivation_hook();
+ init_CommonKeyDerivation_hook();
+}
+if (getBoolFromPreferences(@"CoreTelephony") == YES) {
+NSLog(@"CoreTelephonyInit");
+extern void init_CoreTelephony_hook();
+ init_CoreTelephony_hook();
+}
+if (getBoolFromPreferences(@"dlfcn") == YES) {
+NSLog(@"dlfcnInit");
+extern void init_dlfcn_hook();
+ init_dlfcn_hook();
+}
+if (getBoolFromPreferences(@"Keychain") == YES) {
+NSLog(@"KeychainInit");
+extern void init_Keychain_hook();
+ init_Keychain_hook();
+}
+if (getBoolFromPreferences(@"libC") == YES) {
+NSLog(@"libCInit");
+extern void init_libC_hook();
+ init_libC_hook();
+}
+if (getBoolFromPreferences(@"libMobileGestalt") == YES) {
+NSLog(@"libMobileGestaltInit");
+extern void init_libMobileGestalt_hook();
+ init_libMobileGestalt_hook();
+}
+if (getBoolFromPreferences(@"LSApplication") == YES) {
+NSLog(@"LSApplicationInit");
+extern void init_LSApplication_hook();
+ init_LSApplication_hook();
+}
+if (getBoolFromPreferences(@"MachO") == YES) {
+NSLog(@"MachOInit");
+extern void init_MachO_hook();
+ init_MachO_hook();
+}
+if (getBoolFromPreferences(@"Notification") == YES) {
+NSLog(@"NotificationInit");
+extern void init_Notification_hook();
+ init_Notification_hook();
+}
+if (getBoolFromPreferences(@"NSData") == YES) {
+NSLog(@"NSDataInit");
+extern void init_NSData_hook();
+ init_NSData_hook();
+}
+if (getBoolFromPreferences(@"NSFileHandle") == YES) {
+NSLog(@"NSFileHandleInit");
+extern void init_NSFileHandle_hook();
+ init_NSFileHandle_hook();
+}
+if (getBoolFromPreferences(@"NSFileManager") == YES) {
+NSLog(@"NSFileManagerInit");
+extern void init_NSFileManager_hook();
+ init_NSFileManager_hook();
+}
+if (getBoolFromPreferences(@"NSHTTPCookie") == YES) {
+NSLog(@"NSHTTPCookieInit");
+extern void init_NSHTTPCookie_hook();
+ init_NSHTTPCookie_hook();
+}
+if (getBoolFromPreferences(@"NSInputStream") == YES) {
+NSLog(@"NSInputStreamInit");
+extern void init_NSInputStream_hook();
+ init_NSInputStream_hook();
+}
+if (getBoolFromPreferences(@"NSKeyedArchiver") == YES) {
+NSLog(@"NSKeyedArchiverInit");
+extern void init_NSKeyedArchiver_hook();
+ init_NSKeyedArchiver_hook();
+}
+if (getBoolFromPreferences(@"NSKeyedUnarchiver") == YES) {
+NSLog(@"NSKeyedUnarchiverInit");
+extern void init_NSKeyedUnarchiver_hook();
+ init_NSKeyedUnarchiver_hook();
+}
+if (getBoolFromPreferences(@"NSOutputStream") == YES) {
+NSLog(@"NSOutputStreamInit");
+extern void init_NSOutputStream_hook();
+ init_NSOutputStream_hook();
+}
+if (getBoolFromPreferences(@"NSProcessInfo") == YES) {
+NSLog(@"NSProcessInfoInit");
+extern void init_NSProcessInfo_hook();
+ init_NSProcessInfo_hook();
+}
+if (getBoolFromPreferences(@"NSURLConnection") == YES) {
+NSLog(@"NSURLConnectionInit");
+extern void init_NSURLConnection_hook();
+ init_NSURLConnection_hook();
+}
+if (getBoolFromPreferences(@"NSURLCredential") == YES) {
+NSLog(@"NSURLCredentialInit");
+extern void init_NSURLCredential_hook();
+ init_NSURLCredential_hook();
+}
+if (getBoolFromPreferences(@"NSURLSession") == YES) {
+NSLog(@"NSURLSessionInit");
+extern void init_NSURLSession_hook();
+ init_NSURLSession_hook();
+}
+if (getBoolFromPreferences(@"NSUserDefaults") == YES) {
+NSLog(@"NSUserDefaultsInit");
+extern void init_NSUserDefaults_hook();
+ init_NSUserDefaults_hook();
+}
+if (getBoolFromPreferences(@"NSXMLParser") == YES) {
+NSLog(@"NSXMLParserInit");
+extern void init_NSXMLParser_hook();
+ init_NSXMLParser_hook();
+}
+if (getBoolFromPreferences(@"ObjCRuntime") == YES) {
+NSLog(@"ObjCRuntimeInit");
+extern void init_ObjCRuntime_hook();
+ init_ObjCRuntime_hook();
+}
+if (getBoolFromPreferences(@"Security") == YES) {
+NSLog(@"SecurityInit");
+extern void init_Security_hook();
+ init_Security_hook();
+}
+if (getBoolFromPreferences(@"Socket") == YES) {
+NSLog(@"SocketInit");
+extern void init_Socket_hook();
+ init_Socket_hook();
+}
+if (getBoolFromPreferences(@"SSLKillSwitch") == YES) {
+NSLog(@"SSLKillSwitchInit");
+extern void init_SSLKillSwitch_hook();
+ init_SSLKillSwitch_hook();
+}
+if (getBoolFromPreferences(@"sysctl") == YES) {
+NSLog(@"sysctlInit");
+extern void init_sysctl_hook();
+ init_sysctl_hook();
+}
+if (getBoolFromPreferences(@"UIPasteboard") == YES) {
+NSLog(@"UIPasteboardInit");
+extern void init_UIPasteboard_hook();
+ init_UIPasteboard_hook();
+}
+if (getBoolFromPreferences(@"FclBlowfish") == YES) {
+NSLog(@"FclBlowfishInit");
+extern void init_FclBlowfish_hook();
+ init_FclBlowfish_hook();
+}
+if (getBoolFromPreferences(@"JSPatch") == YES) {
+NSLog(@"JSPatchInit");
+extern void init_JSPatch_hook();
+ init_JSPatch_hook();
+}
+if (getBoolFromPreferences(@"OpenSSLAES") == YES) {
+NSLog(@"OpenSSLAESInit");
+extern void init_OpenSSLAES_hook();
+ init_OpenSSLAES_hook();
+}
+if (getBoolFromPreferences(@"OpenSSLBlowFish") == YES) {
+NSLog(@"OpenSSLBlowFishInit");
+extern void init_OpenSSLBlowFish_hook();
+ init_OpenSSLBlowFish_hook();
+}
+if (getBoolFromPreferences(@"OpenSSLMD5") == YES) {
+NSLog(@"OpenSSLMD5Init");
+extern void init_OpenSSLMD5_hook();
+ init_OpenSSLMD5_hook();
+}
+if (getBoolFromPreferences(@"OpenSSLSHA1") == YES) {
+NSLog(@"OpenSSLSHA1Init");
+extern void init_OpenSSLSHA1_hook();
+ init_OpenSSLSHA1_hook();
+}
+if (getBoolFromPreferences(@"OpenSSLSHA512") == YES) {
+NSLog(@"OpenSSLSHA512Init");
+extern void init_OpenSSLSHA512_hook();
+ init_OpenSSLSHA512_hook();
+}
+if (getBoolFromPreferences(@"Reveal") == YES) {
+NSLog(@"RevealInit");
+extern void init_Reveal_hook();
+ init_Reveal_hook();
+}
+if (getBoolFromPreferences(@"Wax") == YES) {
+NSLog(@"WaxInit");
+extern void init_Wax_hook();
+ init_Wax_hook();
+}
+if (getBoolFromPreferences(@"classdumpdyld") == YES) {
+NSLog(@"classdumpdyldInit");
+extern void init_classdumpdyld_hook();
+ init_classdumpdyld_hook();
+}
+if (getBoolFromPreferences(@"dumpdecrypted") == YES) {
+NSLog(@"dumpdecryptedInit");
+extern void init_dumpdecrypted_hook();
+ init_dumpdecrypted_hook();
+}
+if (getBoolFromPreferences(@"InspectiveC") == YES) {
+NSLog(@"InspectiveCInit");
+extern void init_InspectiveC_hook();
+ init_InspectiveC_hook();
+}
+if (getBoolFromPreferences(@"Cycript") == YES) {
+NSLog(@"CycriptInit");
+extern void init_Cycript_hook();
+ init_Cycript_hook();
+}
+if (getBoolFromPreferences(@"RemoveASLR") == YES) {
+NSLog(@"RemoveASLRInit");
+extern void init_RemoveASLR_hook();
+ init_RemoveASLR_hook();
+}
+NSLog(@"Finished Init Modules");
+}
diff --git a/Hooks/API/sysctl.xm b/Hooks/API/sysctl.xm
index 8c2ceca..1008ed2 100644
--- a/Hooks/API/sysctl.xm
+++ b/Hooks/API/sysctl.xm
@@ -31,7 +31,7 @@ static NSArray* HWArgs=@[
/*
int sysctlnametomib(const char *, int *, size_t *);//Probably Pointless To Hook
*/
-extern BOOL getBoolFromPreferences(NSString *preferenceValue);
+extern BOOL getBoolFromPreferences(NSString *preferenceValue);
static int (*oldsyscall)(long request, long pid, long addr, long data);
int (*old_sysctl)(int *, u_int, void *, size_t *, void *, size_t);
int (*old_sysctlbyname)(const char *, void *, size_t *, void *, size_t);
diff --git a/Hooks/Utils/PlistObjectConverter.m b/Hooks/Utils/PlistObjectConverter.m
index 95c9cc4..82ab168 100755
--- a/Hooks/Utils/PlistObjectConverter.m
+++ b/Hooks/Utils/PlistObjectConverter.m
@@ -620,7 +620,7 @@ + (NSDictionary *) convertNSError:(NSError *)error {
return errorDict;
}
-+ (NSDictionary *) convertNSURLSessionTask:(id)task {
++ (NSDictionary *) convertNSURLSessionTask:(NSURLSessionTask*)task {
if (task == nil)
return [NSDictionary dictionary];
NSString *state_str = nil;
diff --git a/Hooks/Utils/SQLiteStorage.h b/Hooks/Utils/SQLiteStorage.h
index 48943a5..60e4d87 100755
--- a/Hooks/Utils/SQLiteStorage.h
+++ b/Hooks/Utils/SQLiteStorage.h
@@ -1,5 +1,5 @@
#import "CallTracer.h"
-
+#import
#if 0
#define NSLog WTFJHLog
#endif
diff --git a/Hooks/Utils/SQLiteStorage.m b/Hooks/Utils/SQLiteStorage.m
index 4918f7a..acf7508 100755
--- a/Hooks/Utils/SQLiteStorage.m
+++ b/Hooks/Utils/SQLiteStorage.m
@@ -8,9 +8,20 @@ @implementation SQLiteStorage
static BOOL logToConsole = TRUE;
static NSString *appstoreDBFileFormat = @"~/Library/wtfjh-%@.db"; // Becomes ~/Library/introspy-.db
static NSString *systemDBFileFormat = @"~/Library/Preferences/wtfjh-%@.db";
-static const char createTableStmtStr[] = "CREATE TABLE tracedCalls (className TEXT, methodName TEXT, argumentsAndReturnValueDict TEXT)";
-static const char saveTracedCallStmtStr[] = "INSERT INTO tracedCalls VALUES (?1, ?2, ?3)";
-
+static const char createTableStmtStr[] = "CREATE TABLE tracedCalls (className TEXT, methodName TEXT, argumentsAndReturnValueDict TEXT,CALLSTACK TEXT)";
+static const char saveTracedCallStmtStr[] = "INSERT INTO tracedCalls VALUES (?1, ?2, ?3,?4)";
+static BOOL ApplyCallStack=NO;
+static BOOL getBoolFromPreferences(NSString *preferenceValue) {
+ NSMutableDictionary *preferences = [[NSMutableDictionary alloc] initWithContentsOfFile:preferenceFilePath];
+ id value = [preferences objectForKey:preferenceValue];
+ if (value == nil) {
+ return NO; // default to YES
+ }
+ [preferences release];
+ BOOL retVal=[value boolValue];
+ [value release];
+ return retVal;
+}
// Internal stuff
static sqlite3_stmt *saveTracedCallStmt;
@@ -47,7 +58,7 @@ - (SQLiteStorage *)initWithDefaultDBFilePathAndLogToConsole: (BOOL) shouldLog {
- (SQLiteStorage *)initWithDBFilePath:(NSString *) DBFilePath andLogToConsole: (BOOL) shouldLog {
self = [super init];
sqlite3 *dbConn;
-
+ ApplyCallStack=getBoolFromPreferences(@"AddCallStackToDatabase");
// Open the DB file if it's already there
if (sqlite3_open_v2([DBFilePath UTF8String], &dbConn, SQLITE_OPEN_READWRITE, NULL) != SQLITE_OK) {
@@ -93,18 +104,31 @@ - (BOOL)saveTracedCall: (CallTracer*) tracedCall {
// Do the query; has to be atomic or we get random SQLITE_PROTOCOL errors
// TODO: this is probably super slow
@synchronized(appstoreDBFileFormat) {
+
sqlite3_reset(saveTracedCallStmt);
sqlite3_bind_text(saveTracedCallStmt, 1, [ [tracedCall className] UTF8String], -1, nil);
sqlite3_bind_text(saveTracedCallStmt, 2, [ [tracedCall methodName] UTF8String], -1, nil);
sqlite3_bind_text(saveTracedCallStmt, 3, [argsAndReturnValueStr UTF8String], -1, nil);
+ if(ApplyCallStack){
+ sqlite3_bind_text(saveTracedCallStmt, 4, [[[NSThread callStackSymbols] componentsJoinedByString:@"\n"] UTF8String], -1, nil);
+ }
+ else{
+ sqlite3_bind_text(saveTracedCallStmt, 4, "WTFJH-StackNotEnabled", -1, nil);
+ }
+
queryResult = sqlite3_step(saveTracedCallStmt);
//NSString* SQLQuery=[NSString stringWithUTF8String:sqlite3_sql(saveTracedCallStmt)];
//[[RemoteLogSender sharedInstance] sendCommand:SQLQuery];
}
if (logToConsole) {
-
- NSLog(@"\n-----WTFJH Console-----\nCALLED %@ %@\nWITH:\n%@\n---------------", [tracedCall className], [tracedCall methodName], [tracedCall argsAndReturnValue]);
+ if(ApplyCallStack){
+ NSLog(@"\n-----WTFJH Console-----\nCALLED %@ %@\nWITH:\n%@\n---------------\nAND CALLSTACK:%@", [tracedCall className], [tracedCall methodName], [tracedCall argsAndReturnValue],[[NSThread callStackSymbols] componentsJoinedByString:@"\n"]);
+ }
+ else{
+ NSLog(@"\n-----WTFJH Console-----\nCALLED %@ %@\nWITH:\n%@\n---------------", [tracedCall className], [tracedCall methodName], [tracedCall argsAndReturnValue]);
+ }
+
}
[argsAndReturnValueStr release];
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..933f747
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,14 @@
+export CFLAGS=-Wp,"-DWTFJHTWEAKNAME=@\"NH919IJFS93JT68\","-DWTFJHHostName=@\"NavRMBP\"
+include $(THEOS)/makefiles/common.mk
+TWEAK_NAME = NH919IJFS93JT68
+SUBSTRATE ?= yes
+NH919IJFS93JT68_FILES = Tweak.xm CompileDefines.xm Hooks/API/AppleAccount.xm Hooks/API/CommonCryptor.xm Hooks/API/CommonDigest.xm Hooks/API/CommonHMAC.xm Hooks/API/CommonKeyDerivation.xm Hooks/API/CoreTelephony.xm Hooks/API/dlfcn.xm Hooks/API/Keychain.xm Hooks/API/libC.xm Hooks/API/libMobileGestalt.xm Hooks/API/LSApplication.xm Hooks/API/MachO.xm Hooks/API/Notification.xm Hooks/API/NSData.xm Hooks/API/NSFileHandle.xm Hooks/API/NSFileManager.xm Hooks/API/NSHTTPCookie.xm Hooks/API/NSInputStream.xm Hooks/API/NSKeyedArchiver.xm Hooks/API/NSKeyedUnarchiver.xm Hooks/API/NSOutputStream.xm Hooks/API/NSProcessInfo.xm Hooks/API/NSURLConnection.xm Hooks/API/NSURLCredential.xm Hooks/API/NSURLSession.xm Hooks/API/NSUserDefaults.xm Hooks/API/NSXMLParser.xm Hooks/API/ObjCRuntime.xm Hooks/API/Security.xm Hooks/API/Socket.xm Hooks/API/SSLKillSwitch.xm Hooks/API/sysctl.xm Hooks/API/UIPasteboard.xm Hooks/SDK/FclBlowfish.xm Hooks/SDK/JSPatch.xm Hooks/SDK/OpenSSLAES.xm Hooks/SDK/OpenSSLBlowFish.xm Hooks/SDK/OpenSSLMD5.xm Hooks/SDK/OpenSSLSHA1.xm Hooks/SDK/OpenSSLSHA512.xm Hooks/SDK/Reveal.xm Hooks/SDK/Wax.xm Hooks/Utils/CallStackInspector.m Hooks/Utils/CallTracer.m Hooks/Utils/DelegateProxies.m Hooks/Utils/NSURLConnectionDelegateProx.m Hooks/Utils/NSURLSessionDelegateProxy.m Hooks/Utils/PlistObjectConverter.m Hooks/Utils/RemoteLogSender.m Hooks/Utils/RuntimeUtils.m Hooks/Utils/SQLiteStorage.m Hooks/Utils/Utils.m Hooks/ThirdPartyTools/classdumpdyld.xm Hooks/ThirdPartyTools/dumpdecrypted.xm Hooks/ThirdPartyTools/InspectiveC.xm Hooks/Misc/Cycript.xm Hooks/Misc/fishhook.c Hooks/Misc/RemoveASLR.xm Hooks/Misc/SplitMachO.mm Hooks/Misc/WTSubstrate.mm
+NH919IJFS93JT68_CCFLAGS = -Qunused-arguments -std=c++11
+NH919IJFS93JT68_LDFLAGS = -Wl,-segalign,4000,-sectcreate,WTFJH,SIGDB,./SignatureDatabase.plist,-sectcreate,WTFJH,classdumpdyld,./classdumpdyld.dylib,-sectcreate,WTFJH,dumpdecrypted,./dumpdecrypted.dylib,-sectcreate,WTFJH,InspectiveC,./InspectiveC.dylib -lz -L. -v -force_load ./ExtraFWs/libcapstone.a -force_load ./ExtraFWs/libLiberation.a -force_load ./ExtraFWs/Reveal.framework/Reveal -force_load ./ExtraFWs/Cycript.framework/Cycript -F./ExtraFWs/ -Wno-unused-function
+NH919IJFS93JT68_CFLAGS = -I/Volumes/PAGEZERO/WTFJH/Hooks/
+NH919IJFS93JT68_LIBRARIES = sqlite3 substrate stdc++ c++
+NH919IJFS93JT68_FRAMEWORKS = Foundation UIKit Security JavaScriptCore UIKit CoreGraphics CoreFoundation QuartzCore CFNetwork
+
+include $(THEOS_MAKE_PATH)/tweak.mk
+after-install::
+ install.exec "killall -9 SpringBoard"
\ No newline at end of file
diff --git a/ThirdPartyTools/dumpdecrypted/dumpdecrypted.m b/ThirdPartyTools/dumpdecrypted/dumpdecrypted.m
index 52e3c57..5d0dab1 100644
--- a/ThirdPartyTools/dumpdecrypted/dumpdecrypted.m
+++ b/ThirdPartyTools/dumpdecrypted/dumpdecrypted.m
@@ -15,8 +15,7 @@
#include
#include
-#import "../../Hooks/SharedDefine.pch"
-
+#define RMASLRCenter @"com.naville.wtfjh.rmaslr"
struct ProgramVars {
struct mach_header* mh;
int* NXArgcPtr;
diff --git a/Tweak.xm b/Tweak.xm
index 1cb8e22..dcacf02 100644
--- a/Tweak.xm
+++ b/Tweak.xm
@@ -1,7 +1,6 @@
#import "./Hooks/SharedDefine.pch"
#include
#include
-
static BOOL RedirectLog(){
NSString* fileName=[NSString stringWithFormat:@"%@/Documents/%@-%@.txt",NSHomeDirectory(),[NSDate date],[[NSProcessInfo processInfo] processName]];
[@"-----Overture-----\n" writeToFile:fileName atomically:YES encoding:NSUTF8StringEncoding error:nil];
diff --git a/VERSION b/VERSION
index 5587802..3d41066 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-405
\ No newline at end of file
+410
\ No newline at end of file
diff --git a/build.py b/build.py
index 4ff8faa..3e050b5 100755
--- a/build.py
+++ b/build.py
@@ -144,16 +144,16 @@ def BuildMakeFile():
if(JAILED==True):
makeFileString += randomTweakName+"_USE_SUBSTRATE = $(SUBSTRATE)\n"
makeFileString += randomTweakName + MakeFileListString + "\n"
- makeFileString += "export ADDITIONAL_CCFLAGS = -Qunused-arguments"
+ makeFileString += randomTweakName +"_CCFLAGS = -Qunused-arguments"
for CCFlag in BuildConfig.ExtraCCFlags:
makeFileString +=" "+CCFlag
makeFileString+="\n"
global LinkerString
- makeFileString += "export ADDITIONAL_LDFLAGS = -Wl,-segalign,4000,-sectcreate,WTFJH,SIGDB,./SignatureDatabase.plist"+LinkerString+" "
+ makeFileString += randomTweakName +"_LDFLAGS = -Wl,-segalign,4000,-sectcreate,WTFJH,SIGDB,./SignatureDatabase.plist"+LinkerString+" "
for LDF in BuildConfig.LDFLAGS:
makeFileString +=" "+LDF
makeFileString +=" \n"
- makeFileString +="export ADDITIONAL_CFLAGS = "
+ makeFileString +=randomTweakName +"_CFLAGS = "
for CFlag in BuildConfig.ExtraCFlags:
makeFileString +=" "+CFlag
makeFileString+="\n"