descriptionEffortlessly transmit Python objects on trusted wire
owneralralr@buaa.edu.cn
last changeThu, 26 Jan 2023 14:24:05 +0000 (26 22:24 +0800)
content tags
add:
README.md

Ma Liang (马良)

Transmit Python objects over a trusted connection (such as SSH) simply and easily, without any external dependencies.

Caution

THIS TOOL INVOLVES UNPICKLING UNVALIDATED STREAMS FROM THE NETWORK. REMOTE CODE EXECUTION IS POSSIBLE WHEN THE TRAFFIC IS UNINSPECTED ON THE RECEIVING END.

DO NOT USE IT OVER UNTRUSTED CONNECTIONS. DO NOT USE IT IF YOU DO NOT KNOW WHAT THIS TOOL IS FOR.

Usage

Suppose we transmit an object from server to wimp. wimp has the port 8848 open to server, either by WireGuard virtual LAN or SSH port forwarding.

In their Python REPLs:

wimp >>> server = maliang.Server('0.0.0.0', 8848)
wimp >>> obj = server.recv()
server >>> client = maliang.Client('0.0.0.0', 8848)
server >>> client.send(obj)

Et voila! Now do anything you want with obj on wimp.

Multiple values?

Use tuples.

wimp >>> server = maliang.Server('0.0.0.0', 8848)
wimp >>> mouse, cow, tiger, rabbit = server.recv()
server >>> client = maliang.Client('0.0.0.0', 8848)
server >>> client.send((mouse, cow, tiger, rabbit))

Why?

Ma Liang (马良 in Simplified Chinese) is a figure from Chinese folklore with magical painting talent, which was purportedly sent to him by a god of arts. In one version of this folklore, he eventually constructed an ideal world using his paint alone under threat of life from a local landowner, never returning.

This project is originally developed for sending data on a beefy, remote machine to a weaker client for analysis, without which the client cannot visualize. Hence the name.

shortlog
2023-01-26 alralrMove license to LICENSEmaster
2022-01-13 alralrfix README
2022-01-13 alralrmodify README
2022-01-13 alralrAdd .gitignore
2022-01-13 alralrAdd README
2022-01-13 alralrinitial commit
heads
15 months ago master