Is it possible to send an ICMP echo request from a swf?
ActionScript 3 can send UDP packets via flash.net.DatagramSocket. Is their any way to send an ICMP packet? I'd also like to set the开发者_如何学编程 TTL flag so I can implement traceroute in an SWF.
UDP is not available on Flash Player, only on Adobe AIR runtime. So if you are not targeting a browser, you can use it. I don't know if you can send an ICMP packet with DatagramSocket - but you could try to set the TTL like this example: http://blog.debit.nl/2010/06/mdns-daap-announce-air-2-0/
And you might be interested to see the flash.net.dns package: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/dns/package-detail.html
精彩评论