BcryptRpcServer


NameBcryptRpcServer JSON
Version 0.0.6 PyPI version JSON
download
home_pagehttps://github.com/cyal1/BcryptRpcServer/tree/main/python
SummaryThe rpc server api of https://github.com/cyal1/BcryptMontoya
upload_time2024-07-31 10:17:45
maintainerNone
docs_urlNone
authorcyal1
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # BcryptRpcServer

## install 
pip install BcryptRpcServer

## Basic
```python
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

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

```




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cyal1/BcryptRpcServer/tree/main/python",
    "name": "BcryptRpcServer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "cyal1",
    "author_email": "admin@example.com",
    "download_url": null,
    "platform": null,
    "description": "# BcryptRpcServer\n\n## install \npip install BcryptRpcServer\n\n## Basic\n```python\nimport BcryptRpcServer \n\ndef test(a,b,c,d,e):\n    print(a,type(a),b,type(b),c,type(c),d,type(d),e,type(e))\n    return b'asdf'\n\n\n@BcryptRpcServer.expose # some thing wrong. not always work\ndef test2():\n    return 'xxx'\n    \nBcryptRpcServer.expose(test) # recommend\nBcryptRpcServer.run(\"127.0.0.1:30051\")\n```\n\n\n## Frida\n\n```python\nimport BcryptRpcServer \nimport time\nimport frida\n\ndef my_message_handler(message, payload):\n    print(message)\n    print(payload)\n\ndef decrypt(arg):\n    print(f\"decrypt {arg}\")\n    return script.exports.calldecryptfunction(arg)\n\n\ndef encrypt(arg):\n    print(f\"encrypt {arg}\")\n    return script.exports.callencryptfunction(arg)\n\n# device = frida.get_usb_device()\ndevice = frida.get_device_manager().add_remote_device('127.0.0.1:27042')\n\n# pid = device.spawn([\"com.example.www\"])\n# device.resume(pid)\n# time.sleep(1)  # Without it Java.perform silently fails\n# session = device.attach(pid)\n\nsession = device.attach(17982)\nwith open(\"python_to_call_function.js\") as f:\n    script = session.create_script(f.read())\nscript.on(\"message\", my_message_handler)\nscript.load()\n\nprint(encrypt(\"test\"))\nprint(decrypt(encrypt(\"test\")))\n\nBcryptRpcServer.expose(decrypt)\nBcryptRpcServer.expose(encrypt)\n\nBcryptRpcServer.run(\"127.0.0.1:30051\")\n\n```\n\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "The rpc server api of https://github.com/cyal1/BcryptMontoya",
    "version": "0.0.6",
    "project_urls": {
        "Homepage": "https://github.com/cyal1/BcryptRpcServer/tree/main/python"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2cf9f306d1f73efb63cf5c32ecbdbbbdb10788dd86db766cec81ef3b0a4774fe",
                "md5": "04743a5ce277f5f0b558b778670d31ed",
                "sha256": "84bc6146a11d591aceb2e49f58580f027e925048d07d105be10e3fbdc7d2722c"
            },
            "downloads": -1,
            "filename": "BcryptRpcServer-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "04743a5ce277f5f0b558b778670d31ed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4719,
            "upload_time": "2024-07-31T10:17:45",
            "upload_time_iso_8601": "2024-07-31T10:17:45.275857Z",
            "url": "https://files.pythonhosted.org/packages/2c/f9/f306d1f73efb63cf5c32ecbdbbbdb10788dd86db766cec81ef3b0a4774fe/BcryptRpcServer-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-31 10:17:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cyal1",
    "github_project": "BcryptRpcServer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "bcryptrpcserver"
}
        
Elapsed time: 0.36528s