Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

That lead me to the question, how does the ping tool send ICMP messages w/o administrative privileges?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
729 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...