Skip to main content

The rpc server api of https://github.com/cyal1/BcryptMontoya

Project description

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")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyburp-1.0.2.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file pyburp-1.0.2.tar.gz.

File metadata

  • Download URL: pyburp-1.0.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.9

File hashes

Hashes for pyburp-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7004567b939756e6a64c8ba1aa7a8612af8a9f4b4da5e6cd03649cab31bb357a
MD5 1fc8ca61f575ba56232bf6289410fd3b
BLAKE2b-256 572b60c2625bb7b468242f3eac19ddc1f5353cea7d127f6324aa0ef52615be0e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page