nuexs 5
windows10
burpsuite
jeb3
# -*- coding: utf-8 -*- import frida, sys, re, sys, os
import codecs, timeAPP_NAME = ""
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(hexstr.decode('hex'))
else:
print_result(data)
print_result(hexstr.decode('hex'))
else:
print_result(data)
else:
if message['type'] == 'error':
print (message['stack'])
else:
print_result(message)def main():
try:
with codecs.open("hooks.js", 'r', encoding='utf8') as f:
jscode = f.read()
process = frida.get_usb_device().attach(APP_NAME)
script = process.create_script(jscode)
script.on('message', on_message)
print ("[*] Intercepting on (pid: )...")
script.load()
sys.stdin.read()
except KeyboardInterrupt:
print ("[!] Killing app...")if __name__ == "__main__":
if (len(sys.argv) > 1):
APP_NAME = str(sys.argv[1])
main()
else:
print("must input two arg")
print("For exanple: python application.py packName")
# -*- coding: utf-8 -*-
# python3.7
import sys
import subprocesscmd = ["adb shell","su","cd /data/local/tmp","./frida-server-12-7-11-android-arm64"]
def Forward1():
s = subprocess.Popen("adb forward tcp:27042 tcp:27042")
return s.returncodedef Forward2():
s = subprocess.Popen("adb forward tcp:27043 tcp:27043")
return s.returncodedef Run():
s = subprocess.Popen("adb shell", stdin=subprocess.PIPE,stdout=subprocess.PIPE, shell=True)
for i in range(1,len(cmd)):
s.stdin.write(str(cmd[i]+"\r\n").encode("utf-8"))
s.stdin.flush()
return s.returncodeif __name__ == "__main__":
Forward1()
print("adb forward tcp:27042 tcp:27042")
Forward2()
print("adb forward tcp:27043 tcp:27043")
print("Android server--->./frida-server-12-7-11-android-arm64")
print("success-->frida-ps -R")
Run()
python application.py com.flick.flickcheck
作者:ESE007 文章来源:先知社区
注:如有侵权请联系删除