Is it possible to send an ICMP echo request from a swf?

你离开我真会死。 提交于 2019-12-22 12:40:01

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/6598296/is-it-possible-to-send-an-icmp-echo-request-from-a-swf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!