一个纯python 3包,包含用于运行远程python控制台的钩子,以便与正在运行的脚本进行实时交互。
PyRemoteConsole的Python项目详细描述
遥控控制台
pyremoteconsole包含用于连接到运行的挂钩 远程python脚本。它包含一条纯Python 用于obfuscate的“加密”方案 客户端和服务器之间的通信。
安装
pip install PyRemoteConsole
设置和使用
pyremoteconsole附带的密钥文件可以工作
但是您应该通过运行
obfuscation.py
文件。你应该看看下面
文本:
Generating key...
Key generated.
Validating key for prosperity...
Key is valid. Encryptor working successfully!
密钥不应该失败,但无论如何都是经过验证的。
即使重复的单词和模式也会产生独特的 密码文本:
hello hello hello hello hello hello hello hello
̬ĮʀÀ
(ŬNJɢʷMfDZċǚϺ-éȼ˭̕ȿïɐDžƹ{əʺ?ʙ?ΦΑțϾɚɛ͜ǙʡƽǛť
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ΧϬʸΟϫ«͚ǣϱȐ˩ȍ?3͜p̚ĺ̒bĘʇɅ͋Ƚďɏ͛ʬƥƏƼʌˢ͊ǝͅ#ȇƄƩŨ϶Ǖ³¾
使用内置程序时发送和接收的任何内容 加密应该被认为是不可读的,但不是 必须安全。
客户机和服务器
如果您有script_A.py
并且希望能够连接
在它运行时,您需要包含
client.py
文件。
fromPyRemoteConsole.clientimportClient,run_command_client
run_command_client
应该另外启动
线。
fromthreadingimportThreadfromtimeimportsleephost='10.0.0.2'port=12347includes={'a':'Some object'}t=Thread(target=run_command_client,args=[host,port],kwargs={'includes':includes})t.start()
使用includes
Kwarg传递您想要的任何对象
可以远程访问。即includes = {'some_obj': 'obj_val'}
Client
跟踪在run_command_client
中发生的事件。
线程,还允许您关闭run_command_client
安全循环。
Client.restart=TrueClient.shutdown=TruewhileClient.alive:sleep(0.05)t.join()
连接到运行run_command_client
线程的脚本
您需要从server.py
文件导入run_server
。
fromPyRemoteConsole.serverimportrun_serverhost=10.0.0.2port=12347run_server(host,port)