Added new whoami module and some fixes

GSoC/Meterpreter_Web_Console
AlbertoCoding 2018-06-01 02:57:03 +02:00
parent 6df8e28f7e
commit 96cd65a205
3 changed files with 30 additions and 3 deletions

View File

@ -32,6 +32,5 @@ class MetasploitModule < Msf::Post
cat_result.each do |line|
print_line(line)
end
print_line("\n")
end
end

View File

@ -30,12 +30,11 @@ class MetasploitModule < Msf::Post
if dir == ""
print_status("Doing ls without ls command in current session path DIR")
else
print_status("Doing ls without ls command in DIR: #{dir}")
print_status("Doing ls without ls command in DIR: #{dir}")
end
ls_result=pepa_ls(dir)
ls_result.each do |line|
print_line(line)
end
print_line("\n")
end
end

View File

@ -0,0 +1,29 @@
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
class MetasploitModule < Msf::Post
include Msf::Post::File
include Msf::Post::Linux::Pepa
def initialize
super(
'Name' => 'PEPA Whoami (whoami without whoami)',
'Description' => %q{
This module will be applied on a session connected to a shell. It will
extract current username.
},
'Author' => 'Alberto Rafael Rodriguez Iglesias <security[at]vulnerateca.com> <albertocysec[at]gmail.com>',
'License' => MSF_LICENSE,
'Platform' => ['linux'],
'SessionTypes' => ['shell']
)
end
def run
print_status("Doing whoami without whoami command")
whoami_result=pepa_whoami()[0]
print_line(whoami_result)
end
end