需要的东西
1.钉钉砸壳后的ipa (可以自己砸壳也可以在pp助手下)
2.获取公司的wifi ssid 或者经纬度信息
#import <UIKit/UIKit.h>
%hook LAPluginInstanceCollector
- (void)handleJavaScriptRequest:(id)arg2 callback:(void(^)(id dic))arg3{
// if(![LLPunchManager shared].punchConfig.isOpenPunchHelper){
// %orig;
// } else
if([arg2[@"action"] isEqualToString:@"getInterface"]){
id callback = ^(id dic){
NSDictionary *retDic = @{
@"errorCode" : @"0",
@"errorMessage": @"",
@"keep": @"0",
@"result": @{
@"macIp": @"xx:xx:xx:xx:xx:xx",
@"ssid": @"xxxxxx"
}
};
// arg3(![LLPunchManager shared].punchConfig.isLocationPunchMode ? retDic : dic);
arg3(YES ? retDic : retDic);
};
%orig(arg2,callback);
} else if([arg2[@"action"] isEqualToString:@"start"]){
// id callback = ^(id dic){
// NSDictionary *retDic = @{
// @"errorCode" : @"0",
// @"errorMessage": @"",
// @"keep": @"1",
// @"result": @{
// @"aMapCode": @"0",
// @"accuracy": [LLPunchManager shared].punchConfig.accuracy,
// @"latitude": [LLPunchManager shared].punchConfig.latitude,
// @"longitude": [LLPunchManager shared].punchConfig.longitude,
// @"netType": @"",
// @"operatorType": @"unknown",
// @"resultCode": @"0",
// @"resultMessage": @""
// }
// };
// arg3([LLPunchManager shared].punchConfig.isLocationPunchMode ? retDic : dic);
// };
// %orig(arg2,callback);
} else {
%orig;
}
}
%end
%hook DTInfoPlist
+ (NSString *)getAppBundleId{
return @"com.laiwang.DingTalk";
}
%end
参考
http://iosre.com/t/ios/10842?from=timeline&isappinstalled=0