// // DJI GO 4 - Frida Tweaks // if (ObjC.available) { // // Create variables that we can use for "one shot" rules // AFSecurityPolicysetSSLPinningModeSeenHit=0; AFSecurityPolicysetSSLPinningModeSeenReplace=0; DJIAccountManagercheckIsAdminUserSeenHit=0; DJIAccountManagercheckIsAdminUserSeenReplace=0; DJIAppSettingscanUseIllegalChannelsSeenHit=0; DJIAppSettingscanUseIllegalChannelsSeenReplace=0; DJIRadioLogiccanUseIllegalChannelsSeenHit=0; DJIRadioLogiccanUseIllegalChannelsSeenReplace=0; DJIAppSettingssdr_force_fccSeenHit=0; DJIAppSettingssdr_force_fccSeenReplace=0; DJITermsNotificationControllershouldShowTermsSeenHit=0; DJITermsNotificationControllershouldShowTermsSeenReplace=0; DJIAppForceUpdateManagerhasCheckedSeenHit=0; DJIAppForceUpdateManagerhasCheckedSeenReplace=0; DJIUpgradeNotifyViewModelnotifyHiddenSeenHit=0; DJIUpgradeNotifyViewModelnotifyHiddenSeenReplace=0; DJIProductManagercurrentProductCodeSeenHit=0; DJIProductManagercurrentProductCodeSeenReplace=0; // // AFSecurityPolicy setSSLPinningMode jsobject // var AFSecurityPolicy = ObjC.classes.AFSecurityPolicy; var setSSLPinningMode = AFSecurityPolicy['- setSSLPinningMode:']; var setSSLPinningModeImpl = setSSLPinningMode.implementation; setSSLPinningMode.implementation = ObjC.implement(setSSLPinningMode, function (handle, selector, originalResult) { setSSLPinningModeImpl(handle, selector, 0); if ( originalResult != 0 ) { if ( 00 == 0 || AFSecurityPolicysetSSLPinningModeSeenReplace == 0 ) { console.log("[*] SSL Pinning BYPASSED"); AFSecurityPolicysetSSLPinningModeSeenReplace = 1; } } else { if ( 00 == 0 || AFSecurityPolicysetSSLPinningModeSeenHit == 0 ) { console.log(" [*] SSL Pinning not used this time"); AFSecurityPolicysetSSLPinningModeSeenHit = 1; } } }); // // DJIAccountManager checkIsAdminUser jsfunction // var DJIAccountManager = ObjC.classes.DJIAccountManager; var checkIsAdminUser = DJIAccountManager['- checkIsAdminUser']; var checkIsAdminUserImpl = checkIsAdminUser.implementation; checkIsAdminUser.implementation = ObjC.implement(checkIsAdminUser, function (handle, selector) { var originalResult = checkIsAdminUserImpl(handle, selector); if ( originalResult != 1 ) { if ( 00 == 0 || DJIAccountManagercheckIsAdminUserSeenReplace == 0 ) { console.log("[*] Flight Records admin user ENABLED"); DJIAccountManagercheckIsAdminUserSeenReplace = 1; } } else { if ( 00 == 0 || DJIAccountManagercheckIsAdminUserSeenHit == 0 ) { console.log("[*] Flight Records admin user already enabled"); DJIAccountManagercheckIsAdminUserSeenHit = 1; } } return 1; }); // // DJIAppSettings canUseIllegalChannels jsfunction // var DJIAppSettings = ObjC.classes.DJIAppSettings; var canUseIllegalChannels = DJIAppSettings['- canUseIllegalChannels']; var canUseIllegalChannelsImpl = canUseIllegalChannels.implementation; canUseIllegalChannels.implementation = ObjC.implement(canUseIllegalChannels, function (handle, selector) { var originalResult = canUseIllegalChannelsImpl(handle, selector); if ( originalResult != 1 ) { if ( 00 == 0 || DJIAppSettingscanUseIllegalChannelsSeenReplace == 0 ) { console.log("[*] Illegal Channels config (32) ENABLED"); DJIAppSettingscanUseIllegalChannelsSeenReplace = 1; } } else { if ( 00 == 0 || DJIAppSettingscanUseIllegalChannelsSeenHit == 0 ) { console.log("[*] Illegal Channels config (32) already enabled"); DJIAppSettingscanUseIllegalChannelsSeenHit = 1; } } return 1; }); // // DJIRadioLogic canUseIllegalChannels jsfunction // var DJIRadioLogic = ObjC.classes.DJIRadioLogic; var canUseIllegalChannels = DJIRadioLogic['- canUseIllegalChannels']; var canUseIllegalChannelsImpl = canUseIllegalChannels.implementation; canUseIllegalChannels.implementation = ObjC.implement(canUseIllegalChannels, function (handle, selector) { var originalResult = canUseIllegalChannelsImpl(handle, selector); if ( originalResult != 1 ) { if ( 00 == 0 || DJIRadioLogiccanUseIllegalChannelsSeenReplace == 0 ) { console.log("[*] Illegal Channels SDR (32) ENABLED"); DJIRadioLogiccanUseIllegalChannelsSeenReplace = 1; } } else { if ( 00 == 0 || DJIRadioLogiccanUseIllegalChannelsSeenHit == 0 ) { console.log("[*] Illegal Channels SDR(32) already enabled"); DJIRadioLogiccanUseIllegalChannelsSeenHit = 1; } } return 1; }); // // DJIAppSettings sdr_force_fcc jsfunction // var DJIAppSettings = ObjC.classes.DJIAppSettings; var sdr_force_fcc = DJIAppSettings['- sdr_force_fcc']; var sdr_force_fccImpl = sdr_force_fcc.implementation; sdr_force_fcc.implementation = ObjC.implement(sdr_force_fcc, function (handle, selector) { var originalResult = sdr_force_fccImpl(handle, selector); if ( originalResult != 1 ) { if ( 00 == 0 || DJIAppSettingssdr_force_fccSeenReplace == 0 ) { console.log("[*] Forced FCC Mode ACTIVATED"); DJIAppSettingssdr_force_fccSeenReplace = 1; } } else { if ( 00 == 0 || DJIAppSettingssdr_force_fccSeenHit == 0 ) { console.log("[*] Forced FCC mode already active"); DJIAppSettingssdr_force_fccSeenHit = 1; } } return 1; }); // // DJITermsNotificationController shouldShowTerms jsfunction // var DJITermsNotificationController = ObjC.classes.DJITermsNotificationController; var shouldShowTerms = DJITermsNotificationController['- shouldShowTerms']; var shouldShowTermsImpl = shouldShowTerms.implementation; shouldShowTerms.implementation = ObjC.implement(shouldShowTerms, function (handle, selector) { var originalResult = shouldShowTermsImpl(handle, selector); if ( originalResult != 0 ) { if ( 00 == 0 || DJITermsNotificationControllershouldShowTermsSeenReplace == 0 ) { console.log("[*] Terms and conditions BYPASSED"); DJITermsNotificationControllershouldShowTermsSeenReplace = 1; } } else { if ( 00 == 0 || DJITermsNotificationControllershouldShowTermsSeenHit == 0 ) { console.log("[*] Terms and conditions already accepted"); DJITermsNotificationControllershouldShowTermsSeenHit = 1; } } return 0; }); // // DJIAppForceUpdateManager hasChecked jsfunction // var DJIAppForceUpdateManager = ObjC.classes.DJIAppForceUpdateManager; var hasChecked = DJIAppForceUpdateManager['- hasChecked']; var hasCheckedImpl = hasChecked.implementation; hasChecked.implementation = ObjC.implement(hasChecked, function (handle, selector) { var originalResult = hasCheckedImpl(handle, selector); if ( originalResult != 1 ) { if ( 00 == 0 || DJIAppForceUpdateManagerhasCheckedSeenReplace == 0 ) { console.log("[*] Upgrade Check: DISABLED"); DJIAppForceUpdateManagerhasCheckedSeenReplace = 1; } } else { if ( 00 == 0 || DJIAppForceUpdateManagerhasCheckedSeenHit == 0 ) { console.log("[*] Upgrade Check: Already checked"); DJIAppForceUpdateManagerhasCheckedSeenHit = 1; } } return 1; }); // // DJIUpgradeNotifyViewModel notifyHidden jsfunction // var DJIUpgradeNotifyViewModel = ObjC.classes.DJIUpgradeNotifyViewModel; var notifyHidden = DJIUpgradeNotifyViewModel['- notifyHidden']; var notifyHiddenImpl = notifyHidden.implementation; notifyHidden.implementation = ObjC.implement(notifyHidden, function (handle, selector) { var originalResult = notifyHiddenImpl(handle, selector); if ( originalResult != 1 ) { if ( 00 == 0 || DJIUpgradeNotifyViewModelnotifyHiddenSeenReplace == 0 ) { console.log("[*] Upgrade Notification DISABLLED"); DJIUpgradeNotifyViewModelnotifyHiddenSeenReplace = 1; } } else { if ( 00 == 0 || DJIUpgradeNotifyViewModelnotifyHiddenSeenHit == 0 ) { console.log("[*] Upgrade Notification already disabled"); DJIUpgradeNotifyViewModelnotifyHiddenSeenHit = 1; } } return 1; }); // // DJIProductManager currentProductCode jsfunctioniffcc // var DJIProductManager = ObjC.classes.DJIProductManager; var currentProductCode = DJIProductManager['+ currentProductCode']; var currentProductCodeImpl = currentProductCode.implementation; currentProductCode.implementation = ObjC.implement(currentProductCode, function (handle, selector) { var originalResult = currentProductCodeImpl(handle, selector); if ( originalResult != 13 ) { if ( 01 == 0 || DJIProductManagercurrentProductCodeSeenReplace == 0 ) { console.log("[*] Changed product code to MAVIC"); DJIProductManagercurrentProductCodeSeenReplace = 1; } } if( DJIAppSettingssdr_force_fccSeenReplace == 0 ) { return 13; //mavic } else { return originalResult; } }); // // DJILImitDBUpdateLogic needUpdateType jsfunction // var DJILImitDBUpdateLogic = ObjC.classes.DJILImitDBUpdateLogic; var needUpdateType = DJILImitDBUpdateLogic['- needUpdateType']; var needUpdateTypeImpl = needUpdateType.implementation; needUpdateType.implementation = ObjC.implement(needUpdateType, function (handle, selector) { var originalResult = needUpdateTypeImpl(handle, selector); if ( originalResult != 0 ) { if ( 00 == 0 || DJILImitDBUpdateLogicneedUpdateTypeSeenReplace == 0 ) { console.log("[*] Removing NFZ DB Update Message"); DJILImitDBUpdateLogicneedUpdateTypeSeenReplace = 1; } } else { if ( 00 == 0 || DJILImitDBUpdateLogicneedUpdateTypeSeenHit == 0 ) { console.log(""); DJILImitDBUpdateLogicneedUpdateTypeSeenHit = 1; } } return 0; }); }