1
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:
bwatters 2023-07-14 12:47:04 -05:00
parent c34779a5f1
commit b15d595de2
No known key found for this signature in database
GPG Key ID: ECC0F0A52E65F268
9 changed files with 4 additions and 4 deletions

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1021 B

After

Width:  |  Height:  |  Size: 1021 B

View File

@ -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)

View File

@ -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)