2056ff6899
Squashed commit of the following: commit1dcad7c21bMerge:1a2f35d35d29f5Author: OJ <oj@buffered.io> Date: Thu Mar 19 14:43:27 2015 +1000 Land #4953 : Updated POSIX meterpreter binaries commit35d29f5d08Author: Brent Cook <bcook@rapid7.com> Date: Wed Mar 18 22:57:03 2015 -0500 update linux meterpreter bins commit1a2f35d806Merge:076f15f346b1d5Author: OJ <oj@buffered.io> Date: Thu Mar 19 12:41:20 2015 +1000 Land #4951: Dynamic URI generation for Java/Python reverse_http(s) commit076f15f933Merge:b33e7f43f8ed56Author: Spencer McIntyre <zeroSteiner@gmail.com> Date: Wed Mar 18 20:59:54 2015 -0400 Land #4792 @jakxx Publish It PUI file exploit commit3f8ed56a9aAuthor: Spencer McIntyre <zeroSteiner@gmail.com> Date: Wed Mar 18 20:57:58 2015 -0400 Add available space to the payload info commitb33e7f477cMerge:0d1f2055dd718eAuthor: joev <joev@metasploit.com> Date: Wed Mar 18 17:17:34 2015 -0500 Land #4947, h0ng10's TWiki exploit. commit346b1d539fAuthor: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 18 16:24:01 2015 -0500 Revert Java back to static size for cache purposes (less cpu usage on startup) commit33bbf7cb7eAuthor: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 18 16:08:11 2015 -0500 Dynamic URI generation for python/java http(s) stagers commit0d1f2055c5Merge:e943cb5dab4333Author: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 18 15:31:22 2015 -0500 Lands #4949 which fixes #4845 commitdab4333867Author: rwhitcroft <rw81junk@gmail.com> Date: Wed Mar 18 16:07:46 2015 -0400 updated asm in block commit7ae97393e0Author: rwhitcroft <rw81junk@gmail.com> Date: Wed Mar 18 15:34:31 2015 -0400 fix x64/reverse_https stager shellcode commite943cb550fMerge:d152c41d1a2f58Author: OJ <oj@buffered.io> Date: Wed Mar 18 22:34:52 2015 +1000 Land #4585 : CVE-2015-0975 XXE in OpenNMS commitd1a2f58303Author: OJ <oj@buffered.io> Date: Wed Mar 18 22:17:44 2015 +1000 Fix of regex for file capture and format tweaks commit5dd718e4faAuthor: Hans-Martin Münch (h0ng10) <muench@mogwaisecurity.de> Date: Wed Mar 18 09:51:51 2015 +0100 Better description commit00de437918Author: Hans-Martin Münch (h0ng10) <muench@mogwaisecurity.de> Date: Wed Mar 18 09:45:08 2015 +0100 Initial commit commitfa7242388bAuthor: OJ <oj@buffered.io> Date: Wed Mar 18 18:18:54 2015 +1000 Move the module to the correct location commitd152c41826Merge:b46e5f8b62da42Author: OJ <oj@buffered.io> Date: Wed Mar 18 17:42:19 2015 +1000 Land #4934 : Proxy and auth support in reverse_http(s) commitb62da42927Merge:c607cf7b46e5f8Author: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 18 01:51:15 2015 -0500 Merge branch 'master' into feature/add-proxies-to-wininet commitb46e5f8d13Merge:bd4738b97def50Author: OJ <oj@buffered.io> Date: Wed Mar 18 16:49:13 2015 +1000 Land #4295 : Refactory proxy-enabled payload handling commitc607cf7b11Merge:0513852bd4738bAuthor: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 18 01:45:44 2015 -0500 Merging master commit97def50cc2Author: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 18 01:26:59 2015 -0500 Whitespace cleanup commit8d3cb8bde5Author: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 18 01:25:42 2015 -0500 Fix up meterpreter patching arguments and names commitef443c83b9Author: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 18 01:21:53 2015 -0500 Fix overgreed search/replace commit390a704cc7Author: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 18 01:19:05 2015 -0500 Cleanup proxyhost/proxyport arguments to match new names commitf7a06d8e44Author: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 18 01:15:32 2015 -0500 Rework PROXY_{HOST|PORT|TYPE|USERNAME|PASSWORD) to the new syntax commit3aa8cb69a4Author: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 18 01:08:09 2015 -0500 Fix two use cases of PROXYHOST/PROXYPORT commit87a489907cAuthor: HD Moore <hd_moore@rapid7.com> Date: Mon Dec 15 14:48:09 2014 -0600 Place an IPv6 proxy IP between brackets commit259db269bdAuthor: HD Moore <hd_moore@rapid7.com> Date: Tue Dec 2 15:36:14 2014 -0600 Remove user/pass and invalid class from the options commit2ab14e7e79Author: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 18 01:01:10 2015 -0500 Adds IPv6 and option-related issues with the previous patch commit0601946830Author: HD Moore <hd_moore@rapid7.com> Date: Tue Dec 2 13:29:39 2014 -0600 Don't mandate and default PROXY_HOST (miscopy from the proxy stager) commita4df6d539fAuthor: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 18 00:59:59 2015 -0500 Cleanup proxy handling code (consistency & bugs) One subtle bug was that each time a request was received, a null byte was being appended to the datastore options for PROXY_USERNAME and PROXY_PASSWORD. Eventually this would break new sessions. This change centralizes the proxy configuration and cleans up the logic. commit85fb534e63Author: HD Moore <hd_moore@rapid7.com> Date: Tue Dec 2 12:57:30 2014 -0600 Fix up the offset detection again, cleanup redundant code commit2f13988d7bAuthor: HD Moore <hd_moore@rapid7.com> Date: Tue Dec 2 12:33:53 2014 -0600 Use OptPort vs OptInt and cleanup the description commita01be365b0Author: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 18 00:59:13 2015 -0500 Rework PROXYHOST/PROXYPORT to PROXY_HOST/PROXY_PORT This also cleans up the windows reverse_https_proxy stager. commitb197b7aaf0Author: jakxx <jakx.ppr@gmail.com> Date: Tue Mar 17 19:24:13 2015 -0400 Additional Updates -Removed unused mixin -Cleaned up Module name -Cleaned up author name commitbd4738b93eMerge:47a7f99ad7fa0ecAuthor: James Lee <egypt@metasploit.com> Date: Tue Mar 17 17:37:55 2015 -0500 Land #4827, capture and nbns fixups commitd7fa0ec669Author: James Lee <egypt@metasploit.com> Date: Tue Mar 17 17:36:45 2015 -0500 Let IPAddr#hton do the calculating commit47a7f99aaeMerge:d1d63785fd3637Author: Brent Cook <bcook@rapid7.com> Date: Tue Mar 17 16:22:46 2015 -0500 Land #4930, @hmoore-r7 winhttp stager certificate check commit085e6cc815Author: jakxx <jakx.ppr@gmail.com> Date: Tue Mar 17 16:39:56 2015 -0400 Implemented Recommended Changes -corrected spelling error -set only option to required -dumped header data to included file -Used Rex for jmp values commit0490af8ba8Author: jstnkndy <jstnkndy@gmail.com> Date: Tue Mar 17 10:20:22 2015 -0400 Added error checks, randomness, and uuid delimeter commitf3fc4003d0Author: jstnkndy <jstnkndy@gmail.com> Date: Tue Mar 17 10:19:40 2015 -0400 typo commitb92d243c0eMerge:e0a7f53766a07aAuthor: jstnkndy <jstnkndy@gmail.com> Date: Tue Mar 17 10:18:32 2015 -0400 Merge branch 'module-cve-2015-0975' of https://github.com/jstnkndy/metasploit-framework into module-cve-2015-0975 commite0a7f531ccAuthor: jstnkndy <jstnkndy@gmail.com> Date: Tue Mar 17 10:10:51 2015 -0400 Added error checking, randomness, uuid delimiters commit2ea984423bAuthor: HD Moore <hd_moore@rapid7.com> Date: Mon Mar 16 14:08:01 2015 -0500 while(true)->loop, use thread.join commit5fd3637d34Author: HD Moore <hd_moore@rapid7.com> Date: Mon Mar 16 14:00:51 2015 -0500 Remove the i32 size specifier (not needed) commit69d9280748Author: HD Moore <hd_moore@rapid7.com> Date: Mon Mar 16 13:52:13 2015 -0500 Fix yard docs, retries, push.i8 instructions. See commit05138524e3Note that StagerRetryCount is not defined here, but will be in the parent class once #4934 lands commit05138524e3Author: HD Moore <hd_moore@rapid7.com> Date: Mon Mar 16 13:35:36 2015 -0500 Fix yard docs, fix retries, trim bytes, retested and working commit69a808b744Author: HD Moore <hd_moore@rapid7.com> Date: Mon Mar 16 12:14:42 2015 -0500 StagerProxy -> PayloadProxy commitf361e4ee52Author: HD Moore <hd_moore@rapid7.com> Date: Mon Mar 16 00:22:10 2015 -0500 Prefer the new-style proxy datastore options when available commit7e89281485Author: HD Moore <hd_moore@rapid7.com> Date: Mon Mar 16 00:03:31 2015 -0500 Adds proxy (with authentication) support to reverse_http(s) commit8e37342c50Author: HD Moore <hd_moore@rapid7.com> Date: Sat Mar 14 16:52:04 2015 -0500 Comment typo commit0d12ca49a7Author: HD Moore <hd_moore@rapid7.com> Date: Sat Mar 14 16:19:13 2015 -0500 Work around lack of option normalization during size calculation commit03019cf451Author: HD Moore <hd_moore@rapid7.com> Date: Sat Mar 14 15:53:21 2015 -0500 Adds StagerVerifySSLCert support (SHA1 of HandlerSSLCert) commit11593800b6Author: HD Moore <hd_moore@rapid7.com> Date: Sat Mar 14 15:52:23 2015 -0500 Move X509 PEM parsing into Rex::Parser::X509Certificate commit1001061a96Author: HD Moore <hd_moore@rapid7.com> Date: Wed Mar 4 18:52:18 2015 -0600 Initialize @capture_count commit1b1716bcf6Author: HD Moore <hd_moore@rapid7.com> Date: Sun Feb 22 22:01:01 2015 -0600 Fix a handful of bugs that broke this modules. Fixes #4799 commit9730a1655eAuthor: HD Moore <hd_moore@rapid7.com> Date: Sun Feb 22 22:00:42 2015 -0600 Small cleanups to the LLMR responder module commitbdd5276524Author: HD Moore <hd_moore@rapid7.com> Date: Sun Feb 22 21:53:47 2015 -0600 This fixes a number of issues with the Capture mixin * The use of www.metasploit.com in a datastore option results in a DNS lookup (infoleak). Switch to 8.8.8.8 (TTL=1) * The hackey code around #each_packet is no longer necessary in newer Ruby versions * The arp()/probe_gateway() calls to inject_reply() had broken logic leading to early exit and missed replies * The arp() function now tries up to three times to get a reply (helpful with lossy L2) * GC.start is extraneous and should be removed * Increased timeouts commit615d71de6eAuthor: HD Moore <hd_moore@rapid7.com> Date: Sun Feb 22 21:51:33 2015 -0600 Remove extraneous calls to GC.start() commit44a7e7e4bcAuthor: jakxx <jakx.ppr@gmail.com> Date: Wed Feb 18 13:22:54 2015 -0500 publish-it fileformat exploit commit766a07a904Author: jstnkndy <jstnkndy@gmail.com> Date: Tue Jan 13 22:08:08 2015 -0500 Add CVE-2015-0975 XXE for OpenNMS <= 14.0.2
321 lines
8.4 KiB
Ruby
321 lines
8.4 KiB
Ruby
# -*- coding: binary -*-
|
|
|
|
module Msf
|
|
|
|
###
|
|
#
|
|
# This module provides common tools for IPv6
|
|
#
|
|
###
|
|
module Exploit::Remote::Ipv6
|
|
|
|
#
|
|
# Initializes an instance of an exploit module that captures traffic
|
|
#
|
|
def initialize(info = {})
|
|
super
|
|
register_options(
|
|
[
|
|
OptString.new('INTERFACE', [false, 'The name of the interface']),
|
|
OptString.new("SMAC", [ false, "The source MAC address"]),
|
|
OptAddress.new("SHOST", [ false, "The source IPv6 address" ] ),
|
|
OptInt.new("TIMEOUT", [ true, "Timeout when waiting for host response.", 5])
|
|
], Msf::Exploit::Remote::Ipv6
|
|
)
|
|
|
|
begin
|
|
require 'pcaprub'
|
|
@pcaprub_loaded = true
|
|
rescue ::Exception => e
|
|
@pcaprub_loaded = false
|
|
@pcaprub_error = e
|
|
end
|
|
end
|
|
|
|
|
|
#
|
|
# Shortcut method for resolving our local interface name
|
|
#
|
|
def ipv6_interface(opts={})
|
|
opts['INTERFACE'] || datastore['INTERFACE'] || ::Pcap.lookupdev
|
|
end
|
|
|
|
#
|
|
# Shortcut method for determining our link-local address
|
|
#
|
|
def ipv6_link_address(opts={})
|
|
Rex::Socket.ipv6_link_address(ipv6_interface(opts))
|
|
end
|
|
|
|
#
|
|
# Shortcut method for determining our MAC address
|
|
#
|
|
def ipv6_mac(opts={})
|
|
Rex::Socket.ipv6_mac(ipv6_interface(opts))
|
|
end
|
|
|
|
#
|
|
# Opens a pcaprub capture interface to inject packets, and sniff ICMPv6 packets
|
|
#
|
|
|
|
def open_icmp_pcap(opts = {})
|
|
check_pcaprub_loaded
|
|
|
|
dev = ipv6_interface(opts)
|
|
len = 65535
|
|
tim = 0
|
|
@ipv6_icmp6_capture = ::Pcap.open_live(dev, len, true, tim)
|
|
@ipv6_icmp6_capture.setfilter("icmp6")
|
|
end
|
|
|
|
#
|
|
# Close the capture interface
|
|
#
|
|
def close_icmp_pcap()
|
|
check_pcaprub_loaded
|
|
|
|
return if not @ipv6_icmp6_capture
|
|
@ipv6_icmp6_capture = nil
|
|
end
|
|
|
|
#
|
|
# Send out a ICMPv6 neighbor solicitation, and
|
|
# return the associated MAC address
|
|
#
|
|
def solicit_ipv6_mac(dhost, opts = {})
|
|
check_pcaprub_loaded
|
|
|
|
dhost_intf = dhost + '%' + ipv6_interface(opts)
|
|
|
|
smac = opts['SMAC'] || datastore['SMAC'] || ipv6_mac
|
|
shost = opts['SHOST'] || datastore['SHOST'] || Rex::Socket.source_address(dhost_intf)
|
|
timeout = opts['TIMEOUT'] || datastore['TIMEOUT'] || 3
|
|
|
|
open_icmp_pcap()
|
|
|
|
p2 = PacketFu::IPv6Packet.new
|
|
p2.eth_saddr = smac
|
|
p2.eth_daddr = ipv6_soll_mcast_mac(dhost)
|
|
p2.ipv6_saddr = shost
|
|
p2.ipv6_daddr = ipv6_soll_mcast_addr6(dhost)
|
|
p2.ipv6_hop = 255
|
|
p2.ipv6_next = 0x3a
|
|
p2.payload = ipv6_neighbor_solicitation(
|
|
IPAddr.new(dhost).to_i,
|
|
p2.eth_src
|
|
)
|
|
p2.ipv6_len = p2.payload.size
|
|
ipv6_checksum!(p2)
|
|
|
|
@ipv6_icmp6_capture.inject(p2.to_s)
|
|
|
|
# Wait for a response
|
|
max_epoch = ::Time.now.to_i + timeout
|
|
while(::Time.now.to_i < max_epoch)
|
|
pkt_bytes = @ipv6_icmp6_capture.next()
|
|
next if not pkt_bytes
|
|
pkt = PacketFu::Packet.parse(pkt_bytes) rescue nil
|
|
next unless pkt
|
|
next unless pkt.is_ipv6?
|
|
next unless pkt.ipv6_next == 0x3a
|
|
next unless pkt.payload
|
|
next if pkt.payload.empty?
|
|
next unless pkt.payload[0,1] == "\x88" # Neighbor advertisement
|
|
if(IPAddr.new(pkt.ipv6_daddr).to_i == IPAddr.new(shost).to_i and
|
|
IPAddr.new(pkt.ipv6_saddr).to_i == IPAddr.new(dhost).to_i)
|
|
ipv6opts = pkt.payload[24,pkt.payload.size]
|
|
next unless ipv6opts
|
|
parsed_opts = ipv6_parse_options(ipv6opts)
|
|
parsed_opts.each do |opt|
|
|
if opt[0] == 2
|
|
addr = PacketFu::EthHeader.str2mac(opt.last)
|
|
close_icmp_pcap()
|
|
return(addr)
|
|
end
|
|
end
|
|
close_icmp_pcap
|
|
return(pkt.eth_saddr)
|
|
end
|
|
end
|
|
close_icmp_pcap
|
|
return nil
|
|
end
|
|
|
|
#
|
|
# Send a ICMPv6 Echo Request, and wait for the
|
|
# associated ICMPv6 Echo Response
|
|
#
|
|
def ping6(dhost, opts={})
|
|
check_pcaprub_loaded
|
|
|
|
dhost_intf = dhost + '%' + ipv6_interface(opts)
|
|
|
|
smac = opts['SMAC'] || datastore['SMAC'] || ipv6_mac
|
|
shost = opts['SHOST'] || datastore['SHOST'] || Rex::Socket.source_address(dhost_intf)
|
|
dmac = opts['DMAC'] || solicit_ipv6_mac(dhost)
|
|
timeout = opts['TIMEOUT'] || datastore['TIMEOUT']
|
|
wait = opts['WAIT']
|
|
|
|
|
|
if(wait.eql?(nil))
|
|
wait = true
|
|
end
|
|
|
|
dmac.eql?(nil) and return false
|
|
|
|
open_icmp_pcap()
|
|
|
|
# Create ICMPv6 Request
|
|
p = PacketFu::IPv6Packet.new
|
|
p.eth_saddr = smac
|
|
p.eth_daddr = dmac
|
|
p.ipv6_saddr = shost
|
|
p.ipv6_daddr = dhost
|
|
p.ipv6_next = 0x3a
|
|
icmp_id = rand(65000)
|
|
icmp_seq = 1
|
|
icmp_payload = Rex::Text.rand_text(8)
|
|
p.payload = ipv6_icmpv6_echo_request(icmp_id,icmp_seq,icmp_payload)
|
|
p.ipv6_len = p.payload.to_s.size
|
|
ipv6_checksum!(p)
|
|
|
|
@ipv6_icmp6_capture.inject(p.to_s)
|
|
|
|
if(wait.eql?(true))
|
|
print_status("Waiting for ping reply...")
|
|
print_line("")
|
|
# Wait for a response
|
|
max_epoch = ::Time.now.to_i + timeout
|
|
while(::Time.now.to_i < max_epoch)
|
|
pkt = @ipv6_icmp6_capture.next()
|
|
next if not pkt
|
|
response_pkt = PacketFu::Packet.parse(pkt) rescue nil
|
|
next unless response_pkt
|
|
next unless response_pkt.is_ipv6?
|
|
next unless response_pkt.payload
|
|
next if response_pkt.payload.empty?
|
|
next unless response_pkt.payload[0,1] == "\x81" # Echo reply
|
|
if( response_pkt.ipv6_daddr == p.ipv6_saddr and
|
|
response_pkt.ipv6_saddr == p.ipv6_daddr and
|
|
response_pkt.ipv6_daddr == p.ipv6_saddr and
|
|
response_pkt.payload[4,2] == p.payload[4,2] and # Id
|
|
response_pkt.payload[6,2] == p.payload[6,2] # Seq
|
|
)
|
|
close_icmp_pcap()
|
|
return(true)
|
|
end
|
|
|
|
end # End while
|
|
end
|
|
|
|
close_icmp_pcap()
|
|
return(false)
|
|
end
|
|
|
|
#
|
|
# Helper methods that haven't made it upstream yet. Mostly packet data
|
|
# packers, also a checksum calculator.
|
|
#
|
|
|
|
def ipv6_icmpv6_echo_request(id,seq,data)
|
|
type = 0x80
|
|
code = 0
|
|
checksum = 0
|
|
id ||= rand(0x10000)
|
|
seq ||= rand(0x10000)
|
|
[type,code,checksum,id,seq,data].pack("CCnnna*")
|
|
end
|
|
|
|
# Simple tlv parser
|
|
def ipv6_parse_options(data)
|
|
pos = 0
|
|
opts = []
|
|
while pos < data.size
|
|
type, len = data[pos,2].unpack("CC")
|
|
this_opt = [type,len]
|
|
this_opt << data[pos+2, (pos-2 + (len * 8))]
|
|
opts << this_opt
|
|
pos += this_opt.pack("CCa*").size
|
|
end
|
|
opts
|
|
end
|
|
|
|
# From Jon Hart's Racket::L3::Misc#linklocaladdr(), which
|
|
# is from Daniele Bellucci
|
|
def ipv6_linklocaladdr(mac)
|
|
mac = mac.split(":")
|
|
mac[0] = (mac[0].to_i(16) ^ (1 << 1)).to_s(16)
|
|
["fe80", "", mac[0,2].join, mac[2,2].join("ff:fe"), mac[4,2].join].join(":")
|
|
end
|
|
|
|
# From Jon Hart's Racket::L3::Misc#soll_mcast_addr6(),
|
|
# which is from DDniele Belluci
|
|
def ipv6_soll_mcast_addr6(addr)
|
|
h = addr.split(':')[-2, 2]
|
|
m = []
|
|
m << 'ff'
|
|
m << (h[0].to_i(16) & 0xff).to_s(16)
|
|
m << ((h[1].to_i(16) & (0xff << 8)) >> 8).to_s(16)
|
|
m << (h[1].to_i(16) & 0xff).to_s(16)
|
|
'ff02::1:' + [m[0,2].join, m[2,2].join].join(':')
|
|
end
|
|
|
|
# From Jon Hart's Racket::L3::Misc#soll_mcast_mac()
|
|
def ipv6_soll_mcast_mac(addr)
|
|
h = addr.split(':')[-2, 2]
|
|
m = []
|
|
m << 'ff'
|
|
m << (h[0].to_i(16) & 0xff).to_s(16)
|
|
m << ((h[1].to_i(16) & (0xff << 8)) >> 8).to_s(16)
|
|
m << (h[1].to_i(16) & 0xff).to_s(16)
|
|
'33:33:' + m.join(':')
|
|
end
|
|
|
|
# Usual ghetto strategy from PacketFu
|
|
def ipv6_checksum!(pkt)
|
|
check_data = pkt.headers.last[:ipv6_src].to_s.unpack("n8")
|
|
check_data << pkt.headers.last[:ipv6_dst].to_s.unpack("n8")
|
|
check_data << pkt.ipv6_len
|
|
check_data << [0,58]
|
|
check_payload = pkt.payload.size % 2 == 0 ? pkt.payload : pkt.payload + "\x00"
|
|
check_data << check_payload.unpack("n*")
|
|
check_data.flatten!
|
|
checksum = check_data.inject(0) {|sum,x| sum += x}
|
|
checksum = checksum % 0xffff
|
|
checksum = 0xffff - checksum
|
|
checksum == 0 ? 0xffff : checksum
|
|
pkt.payload[2,2] = [checksum].pack("n")
|
|
pkt
|
|
end
|
|
|
|
# Takes a neighbor and smac as arguments, The Neighbor
|
|
# value must be an int, while the smac must be a string.
|
|
# Very rudimentary and temporary.
|
|
def ipv6_neighbor_solicitation(neigh,smac)
|
|
target = neigh.to_s(16).scan(/../).map {|x| x.to_i(16)}.pack("C*")
|
|
type = 135
|
|
code = 0
|
|
checksum = 0
|
|
reserved = 0
|
|
opt_type = 1
|
|
opt_len = 1
|
|
[type, code, checksum, reserved,
|
|
target, opt_type, opt_len, smac
|
|
].pack("CCnNa16CCa6")
|
|
end
|
|
|
|
|
|
def check_pcaprub_loaded
|
|
unless @pcaprub_loaded
|
|
print_status("The Pcaprub module is not available: #{@pcaprub_error}")
|
|
raise RuntimeError, "Pcaprub not available"
|
|
else
|
|
true
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
end
|
|
|