1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
|
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb', line 1130
def cmd_run_tabs(str, words)
tabs = []
if(not words[1] or not words[1].match(/^\//))
begin
if (msf_loaded?)
tabs += tab_complete_postmods
end
[
::Msf::Sessions::Meterpreter.script_base,
::Msf::Sessions::Meterpreter.user_script_base
].each do |dir|
next if not ::File.exist? dir
tabs += ::Dir.new(dir).find_all { |e|
path = dir + ::File::SEPARATOR + e
::File.file?(path) and ::File.readable?(path)
}
end
rescue Exception
end
end
return tabs.map { |e| e.sub(/\.rb$/, '') }
end
|