Use create_credential when importing XML files
parent
d3eb71e8e5
commit
35f52a129c
|
@ -452,10 +452,17 @@ module Msf::DBManager::Import::MetasploitFramework::XML
|
||||||
pass = cred.at('pass').try(:text)
|
pass = cred.at('pass').try(:text)
|
||||||
pass = "" if pass == "*MASKED*"
|
pass = "" if pass == "*MASKED*"
|
||||||
|
|
||||||
private = create_credential_private(private_data: pass, private_type: :password)
|
cred_opts = {
|
||||||
public = create_credential_public(username: username)
|
workspace: wspace.name,
|
||||||
core = create_credential_core(private: private, public: public, origin: origin, workspace_id: wspace.id)
|
username: username,
|
||||||
|
private_data: pass,
|
||||||
|
private_type: 'Metasploit::Credential::Password',
|
||||||
|
service_name: sname,
|
||||||
|
protocol: proto,
|
||||||
|
port: port,
|
||||||
|
origin: origin
|
||||||
|
}
|
||||||
|
core = create_credential(cred_opts)
|
||||||
create_credential_login(core: core,
|
create_credential_login(core: core,
|
||||||
workspace_id: wspace.id,
|
workspace_id: wspace.id,
|
||||||
address: hobj.address,
|
address: hobj.address,
|
||||||
|
|
Loading…
Reference in New Issue