Fixed print_status to use peer instead of ip
parent
7d4982b47b
commit
4276279dd8
|
@ -61,7 +61,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
connect()
|
connect()
|
||||||
smb_login()
|
smb_login()
|
||||||
rescue StandardError => autherror
|
rescue StandardError => autherror
|
||||||
print_error("#{ip} - #{autherror}")
|
print_error("#{peer} - #{autherror}")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
output.each_line { |line| cleanout << line.chomp if line.include?("HKEY") && line.split("-").size == 8 && !line.split("-")[7].include?("_")}
|
output.each_line { |line| cleanout << line.chomp if line.include?("HKEY") && line.split("-").size == 8 && !line.split("-")[7].include?("_")}
|
||||||
return cleanout
|
return cleanout
|
||||||
rescue StandardError => hku_error
|
rescue StandardError => hku_error
|
||||||
print_error("#{ip} - Error runing query against HKU. #{hku_error.class}. #{hku_error}")
|
print_error("#{peer} - Error runing query against HKU. #{hku_error.class}. #{hku_error}")
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -109,7 +109,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
simple.disconnect("\\\\#{ip}\\#{smbshare}")
|
simple.disconnect("\\\\#{ip}\\#{smbshare}")
|
||||||
return output
|
return output
|
||||||
rescue StandardError => output_error
|
rescue StandardError => output_error
|
||||||
print_error("#{ip} - Error getting command output. #{output_error.class}. #{output_error}.")
|
print_error("#{peer} - Error getting command output. #{output_error.class}. #{output_error}.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -160,10 +160,10 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
print_status("#{ip} - Could not determine logged in users")
|
print_status("#{peer} - Could not determine logged in users")
|
||||||
end
|
end
|
||||||
rescue StandardError => check_error
|
rescue StandardError => check_error
|
||||||
print_error("#{ip} - Error checking reg key. #{check_error.class}. #{check_error}")
|
print_error("#{peer} - Error checking reg key. #{check_error.class}. #{check_error}")
|
||||||
return check_error
|
return check_error
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -176,7 +176,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
# Try and do cleanup command
|
# Try and do cleanup command
|
||||||
cleanup = "#{cmd} /C del C:#{text} & del #{bat}"
|
cleanup = "#{cmd} /C del C:#{text} & del #{bat}"
|
||||||
simple.connect(smbshare)
|
simple.connect(smbshare)
|
||||||
print_status("Executing cleanup on host: #{ip}")
|
print_status("Executing cleanup on host: #{peer}")
|
||||||
psexec(smbshare, cleanup)
|
psexec(smbshare, cleanup)
|
||||||
rescue StandardError => cleanuperror
|
rescue StandardError => cleanuperror
|
||||||
print_error("Unable to processes cleanup commands: #{cleanuperror}")
|
print_error("Unable to processes cleanup commands: #{cleanuperror}")
|
||||||
|
|
Loading…
Reference in New Issue