Decompilebench Client (declient)
Asynchronous Request
from pathlib import Path
import asyncio
from declient import DecompilerClient
binary_path = Path(__file__).parent / "testcases" / "test.bin.strip"
address_list = ["0x1a00", "0x1b00"] # Example address list
base_url = "http://localhost:8000" # Example base URL
output = "my_task_queue.json"
async def main():
client = DecompilerClient(
max_concurrent_requests=50,
persistent_file_path=output,
target_url=base_url,
)
DECOMPILERS = await client.get_decompilers_async()
tasks = [
asyncio.create_task(client.decompile_async(binary_path, address_list, decompiler_name))
for decompiler_name in DECOMPILERS
]
for task in tasks:
print(await task)
# query and wait for tasks to be completed
await client.process_task_queue()
# get results
tasks = client.get_completed_tasks()
for task in tasks:
print(f"Task {task['uuid']} completed with result: {task['result']}")
asyncio.run(main())
Asynchronous Resume
import asyncio
from declient import DecompilerClient
base_url = "http://localhost:8000" # Example base URL
output = "my_task_queue.json"
async def main():
client = DecompilerClient(
max_concurrent_requests=50,
persistent_file_path=output,
target_url=base_url,
)
# resume quering tasks
await client.process_task_queue()
# get results
tasks = client.get_completed_tasks()
for task in tasks:
print(f"Task {task['uuid']} completed with result: {task['result']}")
asyncio.run(main())
Synchronous Request
from pathlib import Path
from declient import get_decompilers, decompile
binary_path = Path(__file__).parent / "testcases" / "test.bin.strip"
address_list = ["0x1a00", "0x1b00"]
base_url = "http://localhost:8000"
decompilers = get_decompilers(base_url)
for decompiler in decompilers:
print(decompiler, decompile(binary_path, address_list, decompiler, base_url))
Release files for pydeclient 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pydeclient-1.1.0.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydeclient-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.1 kB
Release files / pydeclient-1.1.0.tar.gz
| Download URL | pydeclient-1.1.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffd8bd1e05242197793b782ce29c7ce69c228b8a0ce54d543d2b0e42cae5c81a
|
|
BLAKE2b-256 checksum How to use checksums |
019ab2a993cd037e37c22991a3dbc2fc1ba087dbb31e3f46b55b7912fa4d04ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.8.19
|
Release files / pydeclient-1.1.0-py3-none-any.whl
| Download URL | pydeclient-1.1.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd0ccb0f62d9e03e3f310b45f99c8dbdbff7caeb9bf81ec4fd73eb04a5af2729
|
|
BLAKE2b-256 checksum How to use checksums |
f8ffa339273048ca85b2c2c3b429cb2a96fe366f9269ebc618205f836371e10d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.8.19
|