A pure Python 3 package containing hooks for running remote python consoles to interact with running scripts in real time.
Project description
PyRemoteConsole
PyRemoteConsole contains hooks for connecting to running python scripts remotely. It contains a pure-python "encryption" scheme that is used to obfuscate communication between the client and the server.
The key file that comes with PyRemoteConsole will work
but you should generate a new key by running the
obfuscation.py
file. You should see the following
text:
Generating key...
Key generated.
Validating key for prosperity...
Key is valid. Encryptor working successfully!
A key should never fail, but it's validated anyway.
Even repeating words and patterns will generate unique cipher-text:
hello hello hello hello hello hello hello hello
̬ĮʀÀ
(ŬNJɢʷMfDZċǚϺ-éȼ˭̕ȿïɐDžƹ{əʺʙΦΑțϾɚɛ͜ǙʡƽǛť
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ΧϬʸΟϫ«͚ǣϱȐ˩ȍ3͜p̚ĺ̒bĘʇɅ͋Ƚďɏ͛ʬƥƏƼʌˢ͊ǝͅ#ȇƄƩŨ϶Ǖ³¾
Anything sent and received while using the built-in encryption should be considered un-readable, but not necessarily secure.
If you have script_A.py
and want to be able to connect
to it while it's running you need to include code from
the client.py
file.
from PyRemoteConsole.client import Client, run_command_client
run_command_client
should be launched in an additional
thread.
from threading import Thread
from time import sleep
host = '10.0.0.2'
port = 12347
includes = {'a': 'Some object'}
t = Thread(target=run_command_client, args=[host, port], kwargs={'includes': includes})
t.start()
use the includes
kwarg to pass whatever objects you want to
have access to remotely. i.e. includes = {'some_obj': 'obj_val'}
Client
tracks events that happen in the run_command_client
thread and also allows you to shut down the run_command_client
loop safely.
Client.restart = True
Client.shutdown = True
while Client.alive:
sleep(0.05)
t.join()
To connect to the script running the run_command_client
thread
you need to import run_server
from the server.py
file.
from PyRemoteConsole.server import run_server
host = 10.0.0.2
port = 12347
run_server(host, port)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file PyRemoteConsole-0.0.1.tar.gz
.
File metadata
- Download URL: PyRemoteConsole-0.0.1.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 819d2ce1d2cdcf5fedf68dd218026f80a8cb4e36bc79d5295c8c47fdce35a6ba |
|
MD5 | 8676f2192eccf33ab7d17988d9233a68 |
|
BLAKE2b-256 | ba50713be711edb3eb2d3b88ad7123fab3e06b91562c6fb7ef5d870962f04ea3 |
File details
Details for the file PyRemoteConsole-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: PyRemoteConsole-0.0.1-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac7404abb3bcf4d503c0a9b4d9414a35619f5d4092fe318b542ffbfb43ab2417 |
|
MD5 | 696b1a3a8d34f90e14a49453b3b7156f |
|
BLAKE2b-256 | 79337dc75939ccce48b0e8ea4fcf15eb0df84d1ad9e7e9c9df149c9f18839e38 |