pyrdp
pyrdp copied to clipboard
Add class for client scripting with asyncio
It would be nice to have a class that simplifies client scripting. The goal is to make it easy to write simple scripts for interacting with an RDP server. I think an API like this would be good:
async def main():
rdp = RDPClient()
await rdp.connect("127.0.0.1", "test", "pass", 3000)
await rdp.setMouse(200, 300) # Pretend this is an icon for a text file
await rdp.doubleClick()
await rdp.type("Hello World!")
await rdp.sendSequence("Ctrl+S")
await rdp.sendSequence("Alt+F4")
The RDPClient class would use the async/await syntax (which works with Twisted with asyncio integration). It would define the high-level interactions one can do with RDP (e.g: move the mouse, send key presses, send mouse clicks, etc.). In addition to these methods, it could be useful if the client exposed the screen as an array of pixels so we can do something with the image.