Deal with other osql banners and responses
Not sure where those other banners come from, but keeping them as positive responses regardless. [FixRM #7862]unstable
parent
bafb50a173
commit
ac858c81a5
|
@ -182,12 +182,9 @@ class Metasploit3 < Msf::Post
|
||||||
services_array1 = running_services1.split("\n")
|
services_array1 = running_services1.split("\n")
|
||||||
|
|
||||||
# Check for osql
|
# Check for osql
|
||||||
services_array1.each do |service1|
|
if services_array1.join =~ /(SQL Server Command Line Tool)|(usage: osql)/
|
||||||
if service1 =~ /SQL Server Command Line Tool/ then
|
print_good("OSQL client was found")
|
||||||
print_good("OSQL client was found")
|
return "osql"
|
||||||
return "osql"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Get Data - sqlcmd
|
# Get Data - sqlcmd
|
||||||
running_services = run_cmd("sqlcmd -?")
|
running_services = run_cmd("sqlcmd -?")
|
||||||
|
@ -252,11 +249,11 @@ class Metasploit3 < Msf::Post
|
||||||
end
|
end
|
||||||
|
|
||||||
# check for success/fail
|
# check for success/fail
|
||||||
if add_login_result == ""
|
if add_login_result.empty? or add_login_result =~ /New login created./
|
||||||
print_good("Successfully added login \"#{dbuser}\" with password \"#{dbpass}\"")
|
print_good("Successfully added login \"#{dbuser}\" with password \"#{dbpass}\"")
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
print_error("Unabled to add login #{dbuser}")
|
print_error("Unable to add login #{dbuser}")
|
||||||
print_error("Database Error:\n #{add_login_result}")
|
print_error("Database Error:\n #{add_login_result}")
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue