Final cleanup
This commit is contained in:
parent
fc0683310e
commit
87aae548e6
|
@ -1,7 +1,3 @@
|
|||
##
|
||||
# $Id$
|
||||
##
|
||||
|
||||
##
|
||||
# This file is part of the Metasploit Framework and may be subject to
|
||||
# redistribution and commercial restrictions. Please see the Metasploit
|
||||
|
@ -32,7 +28,7 @@ class Metasploit4 < Msf::Auxiliary
|
|||
# General
|
||||
[ 'URL', 'http://blog.c22.cc' ]
|
||||
],
|
||||
'Author' =>
|
||||
'Author' =>
|
||||
[ 'Chris John Riley', # original msf module
|
||||
'Bruno Morisson <bm[at]integrity.pt>' # bulk file retrieval
|
||||
],
|
||||
|
@ -239,7 +235,7 @@ class Metasploit4 < Msf::Auxiliary
|
|||
if success
|
||||
print_good("#{rhost}:#{rport} [SAP] #{datastore['FILETYPE'].downcase}:#{logfile.downcase} looted")
|
||||
addr = Rex::Socket.getaddress(rhost) # Convert rhost to ip for DB
|
||||
store_loot(
|
||||
p = store_loot(
|
||||
"sap.#{datastore['FILETYPE'].downcase}.file",
|
||||
"text/xml",
|
||||
addr,
|
||||
|
@ -247,6 +243,7 @@ class Metasploit4 < Msf::Auxiliary
|
|||
"sap_#{logfile.downcase}.xml",
|
||||
"SAP Get Logfile"
|
||||
)
|
||||
print_status("Logfile stored in: #{p}")
|
||||
elsif fault
|
||||
print_error("#{rhost}:#{rport} [SAP] Error code: #{faultcode}")
|
||||
return
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
##
|
||||
# This file is part of the Metasploit Framework and may be subject to
|
||||
# redistribution and commercial restrictions. Please see the Metasploit
|
||||
# Framework web site for more information on licensing and terms of use.
|
||||
# http://metasploit.com/framework/
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
|
||||
class Metasploit4 < Msf::Auxiliary
|
||||
|
@ -17,11 +24,10 @@ class Metasploit4 < Msf::Auxiliary
|
|||
# General
|
||||
[ 'URL', 'http://blog.c22.cc' ]
|
||||
],
|
||||
'Author' =>
|
||||
'Author' =>
|
||||
[
|
||||
'Chris John Riley', # most of the code this module is based on
|
||||
'Bruno Morisson <bm[at]integrity.pt>' # request ProcessList and parsing output
|
||||
|
||||
],
|
||||
'License' => MSF_LICENSE
|
||||
)
|
||||
|
@ -91,7 +97,7 @@ class Metasploit4 < Msf::Auxiliary
|
|||
env = []
|
||||
|
||||
if res and res.code == 200
|
||||
|
||||
|
||||
case res.body
|
||||
when /<process>(.*?)<\/process>/i
|
||||
body = []
|
||||
|
@ -99,7 +105,7 @@ class Metasploit4 < Msf::Auxiliary
|
|||
env = body.scan(/<name>(.*?)<\/name><description>(.*?)<\/description><dispstatus>(.*?)<\/dispstatus><textstatus>(.*?)<\/textstatus><starttime>(.*?)<\/starttime><elapsedtime>(.*?)<\/elapsedtime>/i)
|
||||
success = true
|
||||
end
|
||||
elsif res and res.code == 500
|
||||
elsif res and res.code == 500
|
||||
case res.body
|
||||
when /<faultstring>(.*)<\/faultstring>/i
|
||||
faultcode = $1.strip
|
||||
|
@ -114,7 +120,7 @@ class Metasploit4 < Msf::Auxiliary
|
|||
|
||||
if success
|
||||
print_good("#{rhost}:#{rport} [SAP] #{env.length} processes listed")
|
||||
|
||||
|
||||
saptbl = Msf::Ui::Console::Table.new(
|
||||
Msf::Ui::Console::Table::Style::Default,
|
||||
'Header' => "[SAP] Process List",
|
||||
|
|
Loading…
Reference in New Issue