Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a number of issues found in
Msf::RPC::RPC_Db
.Fix a number of incorrect method comments and examples
Update
db.notes
(Msf::RPC::RPC_Db#rpc_notes
) anddb.vulns
(Msf::RPC::RPC_Db#rpc_vulns
) opts usage to match the method comment (:address
rather than:addresses
)Fix
db.get_service
(Msf::RPC::RPC_Db#rpc_get_service
) finding a service to returnRoot cause:
Mdm::Service::ActiveRecord_Associations_CollectionProxy
is returned in some situations, however, the method only expects to process::Mdm::Service
orArray
. This was fixed by converting the returned object to an Array.Before fix:
After fix:
Fix Cannot delete vuln from DB via MSF RPC #11756 -
db.del_vuln
(Msf::RPC::RPC_Db#rpc_del_vuln
) deleting a vulnRoot cause:
Mdm::Vuln::ActiveRecord_Associations_CollectionProxy
is returned in some situations, however, the code only expects to process::Mdm::Vuln
orArray
. This was fixed by converting the returned object to an Array.Before fix:
After fix:
Verification
msfconsole
or preferred method to create services and vulns in the database./msfrpcd -P complex_password -f
./msfrpc -P complex_password -a 127.0.0.1
db.notes
RPC calldb.notes
returns the correct notes based on the options provideddb.vulns
RPC calldb.vulns
returns the correct notes based on the options provideddb.get_service
RPC call (see above for test cases)db.get_service
returns the correct service based on the options provideddb.del_vuln
RPC call (see above for test cases)db.del_vuln
deletes the correct vuln based on the options provided