Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Custom agent with Java bridge

Đang mở
#265 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java, javascript, python

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện ví dụ với các lệnh gọi session.create_script và script.load của frida-python, sử dụng frida_java_bridge.js và các nguồn script riêng biệt được hiển thị trong issue. Điều tra xem việc tải bridge có thể giữ nguyên hành vi của Java.perform mà không nối mã nguồn hay không. Được xem là hoàn tất khi agent tùy chỉnh hoạt động với bridge được tải riêng biệt và các lỗi trong script của người dùng vẫn giữ được số dòng hữu ích.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hi,
So with Frida 17, runtime bridges, such as the Java runtime bridge, must be added manually to a custom agent script.

This works for me when concatenating the bridge code with whatever other Frida script I want to load, and then calling script.load from python.
The problem is that it's harder to debug bugs in a Frida script, when the error message points to line ~13'000, because the buggy Frida script was appended to the bridge script. Is there a way to load the bridge script separately?

The following script shows the problem:

import frida
import os
import time

process = "SOME APP"
device = frida.get_usb_device()

pid = device.get_process(process).pid

session = device.attach(pid)

with open('/home/user/frida_java_bridge.js', 'r') as bridgefile:
    bridge_source = bridgefile.read()

script1_source = """
console.log('hello form script1')
"""

script2_source = """
console.log('hello form script2a');
Java.perform(function() {console.log('inside Java runtime')});
console.log('hello form script2b');
"""

bridge= session.create_script(bridge_source)
script1 = session.create_script(script1_source)
script2 = session.create_script(script2_source)

print("one by one:")

bridge.load()
script1.load()
script2.load()

print("concatenated:")
script3 = session.create_script(bridge_source + script2_source)
script3.load()

output:

one by one:
hello form script1
hello form script2a

concatenated:
hello form script2a
inside Java runtime
hello form script2b
Ngôn ngữ chính
Python
Star
873
Fork
173
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của frida/frida-python

Tất cả issue của frida/frida-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.