?? gdipping.pl
字號(hào):
#!/usr/bin/perl# This script sends a TCP packet to nowhere and doesn't wait# for a response. The packet should not leave your ISP's routers.# It will get dropped. Try the address you choose with traceroute# to be sure.# Run this as infrequently as possible to keep your connection from# dropping due to inactivity. The objective is to have minimal impact.# set addressmy $address;# sample reserved addresses# - see http://www.iana.org/assignments/ipv4-address-space$address = '197.0.0.1';#$address = '219.0.0.1';#$address = '220.0.0.1';#$address = '221.0.0.1';#$address = '222.0.0.1';#$address = '223.0.0.1';# sample private addresses# - see http://ietf.org/rfc/rfc1918.txt#$address = '172.16.1.1';#$address = '10.1.1.1';#$address = '192.168.1.1';# set portmy $port;$port = 7; # "echo"# Perl modulesuse strict;use Socket;# do the connect in a child processmy $pid = fork;if (!defined($pid)) { die "fork failed\n";}if ($pid eq 0) { # child - connect socket(PING, PF_INET, SOCK_STREAM, getprotobyname('tcp')) || die; connect(PING, sockaddr_in($port, inet_aton($address))); close PING;}; # parent#wait 1 secondmy $secs = 1;select(undef, undef, undef, $secs);# kill the childkill(9, $pid);
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -