2024年6月11日发(作者:)

quiet_send('OkHTTP 3.x check() called. Not throwing an exception.');

}

} catch (err) {

// If we dont have a ClassNotFoundException exception, raise the

// problem encountered.

if (f('ClassNotFoundException') === 0) {

throw new Error(err);

}

}

application脚本

# -*- coding: utf-8 -*-

import frida, sys, re, sys, os

from subprocess import Popen, PIPE, STDOUT

import codecs, time

if (len() > 1):

APP_NAME = str([1])

else:

APP_NAME = "3SSLPinning"

def sbyte2ubyte(byte):

return (byte % 256)

def print_result(message):

print ("[!] Received: [%s]" %(message))

def on_message(message, data):

if 'payload' in message:

data = message['payload']

if type(data) is str:

print_result(data)

elif type(data) is list:

a = data[0]

if type(a) is int:

hexstr = "".join([("%02X" % (sbyte2ubyte(a))) for a in data])

print_result(hexstr)

print_result(('hex'))

else:

print_result(data)

print_result(('hex'))

else:

print_result(data)

else:

if message['type'] == 'error':

print (message['stack'])

else:

print_result(message)

def kill_process():

cmd = "adb shell pm clear {} 1> /dev/null".format(APP_NAME)

(cmd)

#kill_process()

try:

with ("", 'r', encoding='utf8') as f:

jscode = ()

device = _usb_device(timeout=5)

#pid = ([APP_NAME])

session = ("3SSLPinning")

script = _script(jscode)

#(APP_NAME)

('message', on_message)

print ("[*] Intercepting on {} ...".format(APP_NAME))

()

()

except KeyboardInterrupt:

print ("[!] ")

kill_process()

(1)

kill_process()

异常处理

def get_frida_server():

# arm64

("开始下载frida-server 版本arm64")

file_name = "fs1280"

url = "/frida/frida/releases/download/12.8.0/"

frida_full_path = (frida_server_path, file_name)

download_from_url(url, dst=frida_full_path)

("下载frida-server成功!")

adb_operation(frida_full_path)

def main():

get_python_version()

install_list = ["frida==12.8.0", "frida-tools==5.3.0", "objection==1.8.4"]

python_path = able

for install_item in install_list:

(f"当前安装的是:{install_('==')[0]}")

try:

command = f'{python_path} -m pip install {install_item}'

completed = (command, check=True, shell=True,

stdout=)

result = ("utf-8")

(result)

except ProcessError:

raise ValueError(f"{install_item},安装失败")

get_frida_server()

if __name__ == '__main__':

main()