From 557424d2ec7d934c2f88af4df38146c9e452bc42 Mon Sep 17 00:00:00 2001 From: OJ Date: Tue, 1 Nov 2016 01:46:58 +1000 Subject: [PATCH] Small tidy of the multiport_egress_traffic module --- .../multi/recon/multiport_egress_traffic.rb | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/post/multi/recon/multiport_egress_traffic.rb b/modules/post/multi/recon/multiport_egress_traffic.rb index 2cd75bef02..82cb63d935 100644 --- a/modules/post/multi/recon/multiport_egress_traffic.rb +++ b/modules/post/multi/recon/multiport_egress_traffic.rb @@ -11,27 +11,27 @@ require 'rex' class MetasploitModule < Msf::Post def initialize(info = {}) super(update_info(info, - 'Name' => 'Generate TCP/UDP Outbound Traffic On Multiple Ports', - 'Description' => %q( - This module generates TCP or UDP traffic across a - sequence of ports, and is useful for finding firewall - holes and egress filtering. It only generates traffic - on the port range you specify. It is up to you to - run a responder or packet capture tool on a remote - endpoint to determine which ports are open. - ), - 'License' => MSF_LICENSE, - 'Author' => 'Stuart Morgan ', - 'Platform' => [ 'linux', 'osx', 'unix', 'solaris', 'bsd', 'windows' ], - 'SessionTypes' => ['meterpreter'] - )) + 'Name' => 'Generate TCP/UDP Outbound Traffic On Multiple Ports', + 'Description' => %q( + This module generates TCP or UDP traffic across a + sequence of ports, and is useful for finding firewall + holes and egress filtering. It only generates traffic + on the port range you specify. It is up to you to + run a responder or packet capture tool on a remote + endpoint to determine which ports are open. + ), + 'License' => MSF_LICENSE, + 'Author' => 'Stuart Morgan ', + 'Platform' => ['linux', 'osx', 'unix', 'solaris', 'bsd', 'windows'], + 'SessionTypes' => ['meterpreter'] + )) register_options( [ - OptAddress.new('TARGET', [ true, 'Destination IP address.']), + OptAddress.new('TARGET', [true, 'Destination IP address.']), OptString.new('PORTS', [true, 'Ports to test.', '22,23,53,80,88,443,445,33434-33534']), - OptEnum.new('PROTOCOL', [ true, 'Protocol to use.', 'TCP', [ 'TCP', 'UDP', 'ALL' ]]), - OptEnum.new('METHOD', [ true, 'The mechanism by which the packets are generated. Can be NATIVE or WINAPI (Windows only).', 'NATIVE', [ 'NATIVE', 'WINAPI' ]]), + OptEnum.new('PROTOCOL', [true, 'Protocol to use.', 'TCP', [ 'TCP', 'UDP', 'ALL' ]]), + OptEnum.new('METHOD', [true, 'The mechanism by which the packets are generated. Can be NATIVE or WINAPI (Windows only).', 'NATIVE', [ 'NATIVE', 'WINAPI']]), OptInt.new('THREADS', [true, 'Number of simultaneous threads/connections to try.', '20']) ], self.class) end @@ -98,7 +98,7 @@ class MetasploitModule < Msf::Post end end - if client.arch != ARCH_X64 && client.argc != ARCH_X86 + unless [ARCH_X64, ARCH_X86].include?(client.arch) print_error("This module cannot be used without native meterpreter at present") return end