Skip to main content

BcryptRpcServer

install

pip install BcryptRpcServer

Basic

import BcryptRpcServer 

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'


@BcryptRpcServer.expose # some thing wrong. not always work
def test2():
    return 'xxx'
    
BcryptRpcServer.expose(test) # recommend
BcryptRpcServer.run("127.0.0.1:30051")

Frida

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

BcryptRpcServer.expose(decrypt)
BcryptRpcServer.expose(encrypt)

BcryptRpcServer.run("127.0.0.1:30051")

Release files for BcryptRpcServer 0.0.8

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

Source distribution (sdist)

Source distribution for BcryptRpcServer 0.0.8
File Size Uploaded
BcryptRpcServer-0.0.8.tar.gz 4.1 kB Details

Release files / BcryptRpcServer-0.0.8.tar.gz

Download URL BcryptRpcServer-0.0.8.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a33249be0fa0af5c318ac4725dbeaef100e17b1d819d17167af99d9e030d8019
BLAKE2b-256 checksum
How to use checksums
6ed8db7b62671b246a73fa32a1d5633b594cfb195f9268be37a7f5ca596046c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.9

Release history Release notifications | RSS feed

This release

0.0.8 This release

1 release file

0.0.6

1 release file

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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