traceroute

Is it possible to do a traceroute in the browser?

独自空忆成欢 提交于 2019-12-02 21:42:57
I'm looking for a way to do a traceroute client-side, i.e. in a browser. As far as I know, it's not possible to send ICMP, UDP or TCP packets with arbitrary TTL values via Javascript or Flash. I know Flash allows TCP connections via the Socket class in Actionscript but it doesn't seem useful for a traceroute implementation. Is the only solution to develop a browser plug-in ? EDIT : I just found out that it has been done with a Java applet: http://www.codefromthe70s.org/traceroute.aspx The bad news is that this applet requires to be signed code because it actually parses the output from the

Parsing data from traceroute command

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 10:14:33
问题 I am trying to parse the "number of hops" value from the traceroute command and output it with a bash script. Any hints? Very new so thanks. My script looks like this so far: #!/bin/bash #parse traceroute for hops and output to stdout. echo -n "Enter a host name(like www.google.com): " read hostname traceroute 2>&1 $hostname|grep "hops" echo "number of hops are " 回答1: Are you looking for the number of hops it took, or the "64 hops max" value? If it's the former, use tail to get the last line

Parsing data from traceroute command

谁都会走 提交于 2019-12-02 04:11:44
I am trying to parse the "number of hops" value from the traceroute command and output it with a bash script. Any hints? Very new so thanks. My script looks like this so far: #!/bin/bash #parse traceroute for hops and output to stdout. echo -n "Enter a host name(like www.google.com): " read hostname traceroute 2>&1 $hostname|grep "hops" echo "number of hops are " Are you looking for the number of hops it took, or the "64 hops max" value? If it's the former, use tail to get the last line of output, then awk to print the first column: traceroute "$hostname" 2>/dev/null | tail -1 | awk '{print $1

Read ICMP payload from a recvmsg with MSG_ERRQUEUE flag

懵懂的女人 提交于 2019-12-01 12:36:10
问题 I'm using BSD sockets to build an advanced traceroute program that doesn't need root privileges (like tracepath). Using UDP and a bound socket, I call: recvmsg(socket, header, MSG_ERRQUEUE) I receive info about the supposed ICMP notification that a previously sent packet has triggered. Do you know if it's possible to access the ICMP payload (which should be the previously-sent packet)? I read from recvmsg man page: [..] The payload of the original packet that caused the error is passed as

How can I perform a ping or traceroute using native python?

喜欢而已 提交于 2019-12-01 05:11:18
I would like to be able to perform a ping and traceroute from within Python without having to execute the corresponding shell commands so I'd prefer a native python solution. Running interpreters as root is often frowned upon on security grounds (and of course you DO need to have root permission to access the "raw" socked as needed by the ICMP specs of ping and traceroute!), but if you have no problems with that it's not hard -- e.g., this post gives a workable ping, and Jeremy Hylton's old page has still-usable underlying code for ICMP (both ping and traceroute) though it's written for very

How can I perform a ping or traceroute using native python?

妖精的绣舞 提交于 2019-12-01 02:11:46
问题 I would like to be able to perform a ping and traceroute from within Python without having to execute the corresponding shell commands so I'd prefer a native python solution. 回答1: Running interpreters as root is often frowned upon on security grounds (and of course you DO need to have root permission to access the "raw" socked as needed by the ICMP specs of ping and traceroute!), but if you have no problems with that it's not hard -- e.g., this post gives a workable ping, and Jeremy Hylton's

Traceroute on android

☆樱花仙子☆ 提交于 2019-11-30 15:39:46
I am a beginner on android platform, and i want to build a tracerouting app. So these are some my queries that I want to ask: Is it possible to make such application in Android? if possible then guide me the way that I follow. Does Android support low level programming to capture ICMP packets? or do I need to add some kind of JAR (in java) or some other libraries to support this application. In Java there are JPCAP and docjar etc kind of libraries that we can import in our IDE or Eclipse so that Java support for making such kind of api's? I need valuable suggestions. The simplest way I can

【问题】This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

烂漫一生 提交于 2019-11-28 20:46:14
ping [root@51cto /]# ping www.baidu.com PING www.a.shifen.com (61.135.169.121) 56(84) bytes of data. 64 bytes from 61.135.169.121: icmp_seq=1 ttl=128 time=71.7 ms 64 bytes from 61.135.169.121: icmp_seq=2 ttl=128 time=72.1 ms 64 bytes from 61.135.169.121: icmp_seq=3 ttl=128 time=133 ms 64 bytes from 61.135.169.121: icmp_seq=4 ttl=128 time=119 ms ^C --- www.a.shifen.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3676ms rtt min/avg/max/mdev = 71.735/99.181/133.310/27.659 ms 与Windows环境下ping不同,Linux环境下,如果不按Ctrl+C会一直ping下去。Windows ping只发4个数据包完事。 ttl生存时间,每过一个路由器ttl减一

ping, tracert和traceroute命令详解

给你一囗甜甜゛ 提交于 2019-11-28 15:58:57
ping命令详解 使 用 ping可以测试计算机名和计算机的 ip 地址,验证与远程计算机的连接,通过将 icmp 回显数据包发送到计算机并侦听回显回复数据包来验证与一台或多台远程计算机的连接,该命令只有在安装了 tcp/ip 协议后才可以使用。 现在打开你的ms-dos(开始→程序→ms-dos),用win2000的朋友打开cmd.exe(这是win2000下的ms-dos,开始→程序→ 附件→"命令提示符" 或 开始→搜索文件或文件夹→"填入cmd.exe",找到后双击运行就可以了。) 下面我们来看看他的命令: ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-v tos] [-r count] [-s count] [[-j computer-list] | [-k computer-list]] [-w timeout] destination-list 参数 -t ping 指定的计算机直到中断。ctrl+c停止 -a 将地址解析为计算机名。例:c:\\>ping -a 127.0.0.1 pinging china-hacker [127.0.0.1] with 32 bytes of data:(china-hacker就是他的计算机名) reply from 127.0.0.1: bytes=32 time

网络实用命令——traceroute/tracert

你。 提交于 2019-11-28 07:55:10
  或许大家都用过ping命令了,可以用它来测试两个网络之间是否连通,比如测试本机到百度:    ok,没问题,但今天我想给给大家讲讲网络中常用的另一个命令:linux下的traceroute命令,对应于windows下的tracert命令,即路由追踪;在了解其原理之前,先带大家了解几个网络技术名称:      IP协议 IP协议是TCP/IP协议族中最核心的部分,它的作用是在两台主机之间传输数据,所有上层协议的数据(HTTP、TCP、UDP等)都会被封装在一个个的IP数据包中被发送到网络上。 ICMP ICMP全称为 互联网控制报文协议 ,它常用于传递错误信息,ICMP协议是IP层的一部分,它的报文也是通过IP数据包来传输的。 TTL TTL(time-to-live)是IP数据包中的一个字段,它指定了数据包最多能经过几次路由器。从我们源主机发出去的数据包在到达目的主机的路上要经过许多个路由器的转发,在发送数据包的时候源主机会设置一个TTL的值,每经过一个路由器TTL就会被减去一,当TTL为0的时候该数据包会被直接丢弃(不再继续转发),并发送一个超时ICMP报文给源主机   首先在ubuntu下使用traceroute跟踪百度:   嗯,好嘛,只走了一跳后面都超时了,考虑到是使用虚拟机的原因