P2P RDP使用Python [英] P2P RDP with Python

查看:589
本文介绍了P2P RDP使用Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要写一个简单的P2P RDP客户端和服务器在Python。 这是我如何勾勒出来。

I want to write a Simple P2P RDP Client and Server in Python. This is how I Sketched it out.

  1. 在采取截图在短的时间间隔
  2. 的COM preSS它们发送到服务器应用程序
  3. 在获取键盘,从服务器应用程序的鼠标事件。序列化它们发送给客户端。客户将反序列化它们,将使用SendInput呼吁,以反映它们

和我需要知道的是

  1. 请存在和RDP图书馆在Python,我可以用它来简化我的工作?
  2. 如何获得键盘或鼠标事件从服务器操作员使用Python?
  3. 请告诉我的事件序列化的最简单,最简单的方法是什么?
  4. 如何测量相对X,Y的MouseEvent的坐标?
  5. 可以为您提供任何例如多数民众赞成便于理解吗?
  6. 我听说这将是比较容易,如果两个平台都使用微软操作系统的衍生物做在.net中的最后一个问题。是真的吗?

我的客户端应用程序将在Windows XP上运行,Vista中,7和服务器应用程序将运行在Windows / Linux的 也请注明如果我失去了一些东西。

My Client Application will run in Windows XP,Vista,7 and the server Application will run on Windows/Linux and also Please mention If I am missing something.

推荐答案

前一段时间我写了一些所谓的 easyrfb 其中,太,是基于蟒蛇,VNC查看器,但我从来没有出版它。它不包括你问什么,但它是非常相似的。在希望它可能会有所帮助,它的一部分,现在可以在 http://hydra.geht.net/发现easyrfb /

Some time ago I wrote something called easyrfb which, too, is based on python-vnc-viewer, but I never published it. It does not cover exactly what you asked, but it is very similar. In the hope it might be helpful, parts of it now can be found at http://hydra.geht.net/easyrfb/

请注意,该文件也并不总是处于工作状态,因为文件被直接链接到我的工作拷贝。但我不经常编辑

Note that the files there are not always in a working state, because the files are directly linked to my working copy. But I am not editing often.

这一点,它的作用在我身边:

This it what it does at my side:

  • 连接到本地运行的Xvnc(技术上任何VNC服务器都可以)
  • 在连续写入当前屏幕内容到一个高度COM pressed test.jpg放在
  • 在一些网页抓取,使用AJAX和更新的图像
  • 在鼠标点击的图像转发到VNC服务器鼠标点击
  • 在键盘输入可以使用的形式来模拟
  • ,人们可以采取无损PNG截图
  • 有一个edit.html做基础上,PNG截图模糊匹配(称为模板)
  • 在Shell脚本可以检查,如果这样的模板匹配或者等待它们相匹配。

内部通信是使用TCP,类Unix套接字和一些文件,所以它不是很难改变这样的,每一个组件运行在不同的位置:

The internal communication is done using TCP, Unix-Sockets and some files, so it's not difficult to change it such, that every component runs at a different location:

  • 的VNC服务器(屏幕显示)
  • rfbimg.py (这确实VNC - >图像,并提供控制 .sock
  • 的shell脚本(如果需要的话,使用 sendsock.py .sock
  • Web服务( AJAX GET 图像)存根(转发命令 .sock
  • 的控制Web客户端(任何浏览器,甚至猞猁的telnet 可以做)
  • The VNC server (the screen to show)
  • rfbimg.py (which does VNC -> image and offers the control .sock)
  • The shell scripts (if needed, using sendsock.py to talk to .sock)
  • The web service (AJAX, and GET image) with stubs (forwarding commands to .sock)
  • The controlling web client (any browser, even lynx or telnet can do)

请不要问我的文档!使用源,卢克!

心理健康警告!完整的画面是一个又大又丑的成长不洁一堆头痛诱导,facepalm的创造大多是不相关的随机放置的复杂脚本有错误的和误导性的名称,不洁份,取消注释位和未完成一半的编辑,一切都很难coded到只有一个单独的机器,可能需要一些无证当地10岁的微调,以nonupgraded包,甚至是旧的东西。所以我不会把手伸到一切。 (即使这听起来很熟悉,不,我不是在为微软工作。)

Mental health warning! The complete picture is a big and ugly grown unclean pile of headache-inducing-facepalm creating bits of mostly unrelated randomly placed complex scripts with wrong and misleading names, unclean copies, uncommented and unfinished half-edits, everything hardcoded to exactly one single machine, probably needing some undocumented local 10 year old tweaks to nonupgraded packages, or even older stuff. So I will not hand out everything. (And even if this sounds familiar, nope, I am not working for Microsoft.)

这篇关于P2P RDP使用Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆