C#将Windows消息发送到联网计算机 [英] C# send windows messages to a networked computer

查看:92
本文介绍了C#将Windows消息发送到联网计算机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

i想知道如何:

A.直接在远程机器上启动进程而不使用客户端应用程序

B.将WinAPI消息从本地工作站发送到我在远程PC上的进程

i知道如何向本地计算机上的应用程序发送消息但我不知道如何不知道如何向远程机器(它在同一网络上)发送消息,但是有一个黄金法则:远程机器上不能运行客户端应用程序(这是由于事实上,我试图对远程机器的用户进行恶作剧)

i认为这将由UDP实现吗?

i希望在C#中做得很好.NET(版本4)

我也是标准用户,我没有任何管理员权限(这是在本地机器上)

--UPDATE- -

i下面的两个解决方案我被告知,如果没有在另一台PC上运行的客户端应用程序这样做是不可能的。那么我如何构建一个可以恢复Windows消息并在远程计算机上执行它们的应用程序?

提前感谢您的帮助,

MasterCodeon

hello everyone!
i want to know how to:
A. start a process on a remote machine directly without using a client app.
B. send WinAPI messages from the local workstation to the process i just on the remote pc
i know how to send messages to an app on the local machine but i don't know how to send a message to a remote machine(its on the same network) but there is a golden rule: there can't be a client app running on the remote machine(this due to the fact that i am trying to pull a prank on the user of the remote machine)
i think this would be implemented by UDP right?
i would like to do thin in C#.NET(version 4)
also i am a standard user, and i don't have any administrator privileges(this is on the local machine)
--UPDATE--
i the 2 solutions below i have been told that doing this without a client app running on the other pc is impossible. so how would i build an app that can revive windows messages and execute them on a remote machine?
thank you for your help in advance,
MasterCodeon

推荐答案

假设你没有尝试写病毒......



如果没有你要求的东西是不可能的远程机器上的接收程序。 Windows自动处理套接字并将其作为Windows API调用执行。您需要一个程序来接收数据包并在其中处理命令以将它们转换为适当的调用。
Assuming you're not trying to write a virus...

What you're asking for is impossible without a receiver program on the remote machine. Nowhere does Windows automatically process sockets and execute them as a Windows API call. You'd need a program to receive the packets and them process commands in them to translate them into the appropriate calls.


1)您可以使用WMI启动远程进程,但它不能是一个互动的过程。这意味着登录控制台的用户根本不会看到它正在运行。例如,你可以启动记事本,但它会坐在那里等待输入,它永远不会得到,用户也看不到它。



2)这是不可能的在没有客户端应用程序监听命令的情况下远程执行窗口消息。



...哦,你说你没有admin priv?别忘了这一切,因为没有它们就无法在远程机器上做任何事情。
1) You can launch a remote process using WMI, but it can NOT be an interactive process. This means that the user logged into the console will NOT see it running at all. For example, you can launch Notepad, but it'll sit there waiting for input it'll never get and the user will not see it.

2) It's impossible to remotely execute "window messages" without a client application listening for commands.

... oh, and you say that you don't have admin priv's? Well forget it all because you can't do anything on the remote machine without them.


这篇关于C#将Windows消息发送到联网计算机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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