-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathoppo_ssl.py
More file actions
54 lines (43 loc) · 1.41 KB
/
oppo_ssl.py
File metadata and controls
54 lines (43 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import frida, sys
import time
test_sky = '''
Java.perform(function () {
console.log('start');
// 证书效验
// var cir = Java.use('a.a.a.cir');
var cir = Java.use('a.a.a.amz');
cir["checkServerTrusted"].overload('[Ljava.security.cert.X509Certificate;', 'java.lang.String').implementation =
function (v1, v2) {
console.log("v1: ", v2);
//var result = this.checkClientTrusted(v1, v2);
return null;
}
// 日志
var LogUtility = Java.use('com.nearme.module.util.LogUtility');
LogUtility.debug.overload('java.lang.String').implementation = function (v1) {
console.log("v1: ", v1);
return null;
}
});
'''
def on_message(message, data):
if message['type'] == 'send':
print("[*] {0}".format(message['payload']))
else:
print(message)
def test():
process = frida.get_usb_device().attach('com.oppo.market')
script = process.create_script(test_sky)
script.on('message', on_message)
script.load()
sys.stdin.read()
# def hook_prepare():
# process = frida.get_usb_device().attach('com.sankuai.meituan')
# script = process.create_script(test_sky)
# script.on('message', on_message)
# script.load()
# print('hook_prepare is ok')
# return script
# hook_prepare()
if __name__ == "__main__":
test()