aux -> auxiliary to fix a windows isue

git-svn-id: file:///home/svn/incoming/trunk@3624 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2006-04-27 05:16:03 +00:00
parent db72a04a1a
commit f9b23371b8
4 changed files with 115 additions and 3 deletions

View File

@ -14,7 +14,7 @@ MODULE_ANY = '_any_'
MODULE_ENCODER = 'encoder'
MODULE_EXPLOIT = 'exploit'
MODULE_NOP = 'nop'
MODULE_AUX = 'aux'
MODULE_AUX = 'auxiliary'
MODULE_PAYLOAD = 'payload'
MODULE_TYPES =
[

View File

@ -779,7 +779,7 @@ class Core
show_exploits
when 'payloads'
show_payloads
when 'aux'
when 'auxiliary'
show_auxiliary
when 'options'
if (mod)
@ -821,7 +821,7 @@ class Core
# Tab completion for the show command
#
def cmd_show_tabs(str, words)
res = %w{all encoders nops exploits payloads aux plugins}
res = %w{all encoders nops exploits payloads auxiliary plugins}
if (active_module)
res.concat(%w{ options advanced evasion targets actions })
end

View File

@ -0,0 +1,75 @@
require 'msf/core'
module Msf
class Auxiliary::ReconTest < Msf::Auxiliary
include Auxiliary::Recon
include Exploit::Remote::Tcp
def initialize
super(
'Name' => 'Simple Recon Module Tester',
'Version' => '$Revision$',
'Description' => 'Simple Recon Module Tester',
'Author' => 'hdm',
'License' => MSF_LICENSE,
'Actions' =>
[
['Single Port Probe'],
['Continuous Port Sweep']
],
'PassiveActions' =>
[
'Continuous Port Sweep'
]
)
register_options(
[
Opt::RHOST,
Opt::RPORT,
], self.class)
end
def run
print_status("Running the simple recon module with action #{action.name}")
case action.name
when 'Single Port Probe'
prober()
when 'Continuous Port Sweep'
while (true)
1.upto(65535) do |port|
datastore['RPORT'] = port
prober()
end
end
end
end
def prober
begin
connect
disconnect
report_host(:host => datastore['RHOST'])
report_service(
:host => datastore['RHOST'],
:port => datastore['RPORT'],
:proto => 'tcp'
)
rescue ::Exception => e
case e.to_s
when /connection was refused/
report_host(:host => datastore['RHOST'])
else
print_status(e.to_s)
end
end
end
end
end

37
modules/auxiliary/test.rb Normal file
View File

@ -0,0 +1,37 @@
require 'msf/core'
module Msf
class Auxiliary::Test < Msf::Auxiliary
def initialize
super(
'Name' => 'Simple Auxiliary Module Tester',
'Version' => '$Revision$',
'Description' => 'Simple Auxiliary Module Tester',
'Author' => 'hdm',
'License' => MSF_LICENSE,
'Actions' =>
[
['Default Action'],
['Another Action']
]
)
end
def run
print_status("Running the simple auxiliary module with action #{action.name}")
end
def auxiliary_commands
return { "aux_extra_command" => "Run this auxiliary test commmand" }
end
def cmd_aux_extra_command(*args)
print_status("Running inside aux_extra_command()")
end
end
end