Skip to content

Instantly share code, notes, and snippets.

@kingbin
Forked from carnal0wnage/export_workspaces.rb
Created November 11, 2016 20:56
Show Gist options
  • Save kingbin/41f0cbd8ffa0e330b50e04ec342aa97a to your computer and use it in GitHub Desktop.
Save kingbin/41f0cbd8ffa0e330b50e04ec342aa97a to your computer and use it in GitHub Desktop.
Export a list of workspaces from metasploit databases and credentials
<ruby>
File.open("/root/workspaces.txt", "r") do |f|
f.each_line do |line|
run_single("workspace #{line}")
run_single("db_export -f xml -a /root/msf_workspace_export/#{line}_export_13Aug2016.xml")
run_single("db_export -f pwdump -a /root/msf_workspace_export/#{line}_export_13Aug2016.pwdump")
end
end
</ruby>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment