The Console Shell now allows you to drop into an IRB (and then play with the BeEF object if you want) Issue #627

This commit is contained in:
Christian Frichot
2012-03-03 14:59:59 +08:00
parent 302bb27212
commit 63805d943d

View File

@@ -31,6 +31,7 @@ class Core
"back" => "Move back from the current context",
"exit" => "Exit the console",
"help" => "Help menu",
"irb" => "Drops into an interactive Ruby environment",
"jobs" => "Print jobs",
"online" => "List online hooked browsers",
"offline" => "List previously hooked browsers",
@@ -236,6 +237,28 @@ class Core
print_status("Target a particular online, hooked browser")
print_status(" Usage: target <id>")
end
def cmd_irb(*args)
@@bare_opts.parse(args) {|opt, idx, val|
case opt
when "-h"
cmd_irb_help
return false
end
}
print_status("Starting IRB shell...\n")
begin
Rex::Ui::Text::IrbShell.new(binding).run
rescue
print_error("Error during IRB: #{$!}\n\n#{$@.join("\n")}")
end
end
def cmd_irb_help(*args)
print_status("Load the IRB, Interative Ruby Shell")
end
def cmd_review(*args)
@@bare_opts.parse(args) {|opt, idx, val|