Skip to main content

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

Project description

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

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

BcryptRpcServer-0.0.5.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

BcryptRpcServer-0.0.5-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file BcryptRpcServer-0.0.5.tar.gz.

File metadata

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

File hashes

Hashes for BcryptRpcServer-0.0.5.tar.gz
Algorithm Hash digest
SHA256 7dd7afc34cc965a648c2ccbf332fc3edda84c993af2bb93c53da93697439f43e
MD5 e30ee22858ffa44d6529c4dbe36627dd
BLAKE2b-256 e88e024dd81fff220782131f222e379233ff5fe29ba679fcd7f32bc7c2715c0b

See more details on using hashes here.

File details

Details for the file BcryptRpcServer-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for BcryptRpcServer-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1b21b224ef1ecce98e154ba7ad63370fcf4d46032ae9bfb8c2fb8be1348da3f6
MD5 8e9398eaf22847e42b54abdea7508d13
BLAKE2b-256 c287a3f19ccfbcb9b5a09b2abd5f7b376d3b306d94a512d9cf676a29996997f2

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