⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arp-request.pl

📁 SinFP是一种新的识别对方计算机操作系统类型的工具
💻 PL
字号:
#!/usr/bin/perl## $Id: arp-request.pl,v 1.3.2.2 2006/06/04 13:23:13 gomor Exp $#use strict;use warnings;use Getopt::Std;my %opts;getopts('i:I:M:d:vt', \%opts);die "Usage: $0 -i dstIp [-I srcIp] [-M srcMac] [-d device] ".    "[-v] [-t timeout]\n"   unless $opts{i};use Net::Packet;$Env->dev($opts{d}) if $opts{d};$Env->ip ($opts{I}) if $opts{I};$Env->mac($opts{M}) if $opts{M};$Env->debug(3)      if $opts{v};my $eth = Net::Packet::ETH->new(   type => NP_ETH_TYPE_ARP,);my $arp = Net::Packet::ARP->new(   opCode => NP_ARP_OPCODE_REQUEST,   dstIp  => $opts{i},);my $frame = Net::Packet::Frame->new(l2 => $eth, l3 => $arp);print "Request:\n";print $frame->l2->print, "\n";print $frame->l3->print, "\n";print "padding: ", unpack('H*', $frame->padding), "\n";$frame->send;until ($Env->dump->timeout) {   if ($frame->recv) {      print "\nReply:\n";      print $frame->reply->l2->print, "\n";      print $frame->reply->l3->print, "\n";      print "padding: ", unpack('H*', $frame->reply->padding), "\n";      print "\n", $frame->reply->l3->srcIp, " is-at ", $frame->reply->l3->src,            "\n";      last;   }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -