PRC
Python Remote Console - PRC
Python Remote Console client and server communicate via sockets. PRCClient connects to PRCServer and gains access to its Python console. Everything what PRCClient types is sent and executed on PRCServer.
This can have several applications including:
Access to remote machine resources like files on hard drives, computation power.
Runtime debugging of complex Python scripts. PRCServer can be configured to access script internal variables, objects, states.
Remote Procedure Call (RPC). PRCClient can remotely start processes, applications, other executables on PRCServer.
PRC is writen in Python 2.7 and Python 3.x and works on Windows and Linux. Source code can be found here: https://github.com/0x1001/PRC
PRCServer usage example
PRCServer runs socket server that spawns Python console for each PRCClient.
example_server.py:
from prc import PRCServer
import time
# Creates PRCServer object
server = PRCServer()
# Example of a mutable variable
counter = [0]
# This will allow access to counter variable in PRC
server.add_variable("counter",counter)
# Starts PRCServer. Non blocking!
server.start()
# Example of worker thread that increments counter
while True:
counter[0] += 1
time.sleep(1)
PRCClient usage example
PRCClient connects to PRCServer console and acts as a proxy.
example_client.py:
from prc import PRCClient # Starts PRCClient # # Only stderr is redirected to RPCClient output # To redirect stdout type following code in PRCClient console: # import sys # sys.stdout = __prcconsole__ # # Type exit() for exit. PRCClient().start()
PRCClient client console looks like this:
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(PRCConsole)
>>> import sys
>>> sys.stdout = __prcconsole__
>>> counter
[62]
>>> counter
[64]
>>> import subprocess
>>> subprocess.call("start notepad",shell=True)
>>> exit()
PRCClient constructor accepts two input paramiters: server address and port.
Contribution
Anyone is welcome to contribute to this project. Source code is available on GitHub. https://github.com/0x1001/PRC
Metadata
Release files for PRC 1.0.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 | Provenance | |
|---|---|---|---|---|
| PRC-1.0.0.zip | 23.3 kB | Without provenance | Details |
Release files / PRC-1.0.0.zip
| Download URL | PRC-1.0.0.zip |
|---|---|
| Size | 23.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ac6260c0d956528b88ff12926c4f5bf5cf6278b0adb191a91d3e0ccc6670a6c
|
|
BLAKE2b-256 checksum How to use checksums |
585ff956c4aece89a32a00b77d871287d599b45c1d781f6537673937625a568a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1
|
Security for PRC 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.