Fix windows enum modules
parent
834c0e594a
commit
656e6f5c73
|
@ -29,7 +29,6 @@ class Metasploit3 < Msf::Post
|
|||
def run
|
||||
print_status("Running module against #{sysinfo['Computer']}") if not sysinfo.nil?
|
||||
domain = get_domain()
|
||||
|
||||
if not domain.empty?
|
||||
hostname_list = get_domain_computers()
|
||||
list_computers(domain, hostname_list)
|
||||
|
@ -49,7 +48,7 @@ class Metasploit3 < Msf::Post
|
|||
def get_domain_computers()
|
||||
computer_list = []
|
||||
devisor = "-------------------------------------------------------------------------------\r\n"
|
||||
raw_list = client.shell_command_token("net view").split(devisor)[1]
|
||||
raw_list = cmd_exec('net view').split(devisor)[1]
|
||||
if raw_list =~ /The command completed successfully/
|
||||
raw_list.sub!(/The command completed successfully\./,'')
|
||||
raw_list.gsub!(/\\\\/,'')
|
||||
|
|
|
@ -58,7 +58,7 @@ class Metasploit3 < Msf::Post
|
|||
# List local group members
|
||||
def list_group_mem(group)
|
||||
devisor = "-------------------------------------------------------------------------------\r\n"
|
||||
raw_list = client.shell_command_token("net localgroup #{group}").split(devisor)[1]
|
||||
raw_list = cmd_exec("net localgroup #{group}").split(devisor)[1]
|
||||
account_list = raw_list.split("\r\n")
|
||||
account_list.delete("The command completed successfully.")
|
||||
return account_list
|
||||
|
@ -68,7 +68,7 @@ class Metasploit3 < Msf::Post
|
|||
def list_domain_group_mem(group)
|
||||
account_list = []
|
||||
devisor = "-------------------------------------------------------------------------------\r\n"
|
||||
raw_list = client.shell_command_token("net groups \"#{group}\" /domain").split(devisor)[1]
|
||||
raw_list = cmd_exec("net groups \"#{group}\" /domain").split(devisor)[1]
|
||||
raw_list.split(" ").each do |m|
|
||||
account_list << m
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue