pymetasploit3 icon indicating copy to clipboard operation
pymetasploit3 copied to clipboard

defaut parameters in db.connect() don't work

Open Tudyx opened this issue 5 years ago • 1 comments

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.

Tudyx avatar Jun 22 '20 07:06 Tudyx

send PR

DanMcInerney avatar Jul 06 '20 17:07 DanMcInerney