为什么 ping 在没有管理员权限的情况下也能工作? [英] Why does ping work without administrator privileges?

查看:81
本文介绍了为什么 ping 在没有管理员权限的情况下也能工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如您所知,如果没有管理权限,就无法使用 Windows 套接字 创建 RAW 套接字.问题是,我需要发送 ICMP 消息,因此我需要 RAW 套接字.问题:我的程序需要在没有管理权限的情况下运行.

as you may know one is unable to create RAW sockets using Windows Sockets without having administrative priviliges. The problem is, that I need to send ICMP messages, thus I need RAW sockets. The Problem: My program needs to run without administrative privileges.

这就引出了一个问题,ping 工具如何在没有管理权限的情况下发送 ICMP 消息?

推荐答案

尽管 ICMP 使用 RAW 套接字(在 Win2K 及更高版本上需要管理员权限),但 Microsoft 绕过了自己的安全规则以允许其 ICMP API 通过.因此,不要直接使用 RAW 套接字发送您自己的 ICMP ping 消息.使用 IcmpSendEcho()和相关功能.

Although ICMP uses RAW sockets (which require admin rights on Win2K and later), Microsoft circumvents its own security rules to allow its ICMP APIs to get through. As such, don't use RAW sockets directly to send your own ICMP ping messages. Use IcmpSendEcho() and related functions instead.

这篇关于为什么 ping 在没有管理员权限的情况下也能工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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