Subdomain Posts
Bash | 204 days ago
Bash | 216 days ago
Bash | 216 days ago
Bash | 216 days ago
Bash | 216 days ago
Bash | 220 days ago
Bash | 220 days ago
Bash | 220 days ago
Perl | 221 days ago
Perl | 304 days ago
Recent Posts
HTML | 14 sec ago
HTML | 22 sec ago
C++ | 33 sec ago
JavaScript | 42 sec ago
None | 49 sec ago
PHP | 51 sec ago
None | 55 sec ago
Python | 55 sec ago
PAWN | 1 min ago
Python | 1 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By epixoip on the 10th of Aug 2009 04:42:56 AM
Download |
Raw |
Embed |
Report
#!/usr/bin/perl
# Tue Apr 3 16:42:08 PDT 2007 by epixoip <epixoip@hush.com>
# synping - a tcp syn ping utility
use Net::Ping;
use Time::HiRes;
use Getopt::Std;
my %options = ();
getopts("c:i:t:T",\%options);
our $host = $ARGV[0];
our $port = $ARGV[1];
our $seq = 0;
sub usage {
print "SYN Ping Utility - by epixoip <epixoip\@hush.com>\n";
print "Usage:\t$0 [-citT] <host> <port>\n";
print "\t-c\tStop after \$foo iterations\n";
print "\t-i\tWait \$foo seconds between iterations\n";
print "\t-t\tSet TTL to \$foo\n";
print "\t-T\tTimestamp output\n\n";
}
$p = Net::Ping->new("syn", $options{t});
$p->hires();
$p->{port_num} = $port;
while (1) {
$p->ping($host);
if (($hostn,$rtt,$ip) = $p->ack) {
printf("ack from $host ($ip) port=$port seq=$seq time=%.2f ms\n", $rtt * 1000
);
} else {
my $reason = $p->nack($host);
print "seq $seq: no reply from $host: $reason\n";
}
if ($seq == $options{c} - 1) {
}
}
$seq++;
} else {
}
}
Submit a correction or amendment below.
Make A New Post