pymetasploit3
pymetasploit3 copied to clipboard
defaut parameters in db.connect() don't work
The default parameter "localhost" of the function db.connect() don't work. But if i pass the parameter 127.0.0.1 the connection work :
client.db.connect(host='127.0.0.1',username='msf',password='pass123')
I think we can fix this by changing the code of msfrpc.py line 985 to :
def connect(self, username, database='msf', host='127.0.0.1',**kwargs):
runopts = {'username': username, 'database': database, 'host":host}
Moreover, it's seems that the db.connect() function return true even if sometimes the connection failed. Db.status() return the correct status. It could be cool if we can connect to the database through the yml file.
send PR