Skip to main content

pyburpRPC

install

pip install pyburp

Basic

import pyburp 

def test(a,b,c,d,e):
    print(a,type(a),b,type(b),c,type(c),d,type(d),e,type(e))
    return b'asdf'


@pyburp.expose # some thing wrong. not always work
def test2():
    return 'xxx'

pyburp.expose(test) # recommend
pyburp.run("127.0.0.1:30051")

Frida

import pyburp 
import time
import frida

def my_message_handler(message, payload):
    print(message)
    print(payload)

def decrypt(arg):
    print(f"decrypt {arg}")
    return script.exports.calldecryptfunction(arg)


def encrypt(arg):
    print(f"encrypt {arg}")
    return script.exports.callencryptfunction(arg)

# device = frida.get_usb_device()
device = frida.get_device_manager().add_remote_device('127.0.0.1:27042')

# pid = device.spawn(["com.example.www"])
# device.resume(pid)
# time.sleep(1)  # Without it Java.perform silently fails
# session = device.attach(pid)

session = device.attach(17982)
with open("python_to_call_function.js") as f:
    script = session.create_script(f.read())
script.on("message", my_message_handler)
script.load()

print(encrypt("test"))
print(decrypt(encrypt("test")))

pyburp.expose(decrypt)
pyburp.expose(encrypt)

pyburp.run("127.0.0.1:30051")

Release files for pyburp 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyburp 1.0.3
File Size Uploaded
pyburp-1.0.3.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyburp 1.0.3
File Interpreter ABI Platform
pyburp-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / pyburp-1.0.3.tar.gz

Download URL pyburp-1.0.3.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
208fec8abaafef6ab6f9480b4ddc6cc3be7faeec65b127fbf64974d1d4843e18
BLAKE2b-256 checksum
How to use checksums
9f6336352a21ce183f2bd0d11ae5c9c77820896b0efd23738177e6943976d627
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.1

Release files / pyburp-1.0.3-py3-none-any.whl

Download URL pyburp-1.0.3-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb72724b6673adaeb796217aea926d69881d17aaee6fa31b47656e8ca2848f34
BLAKE2b-256 checksum
How to use checksums
4b330dda9ea9d6bb20bdde55c624406f523090dfccb6478344c4bddc69b88d08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.1

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page