Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Tudyx opened this issue Jun 22, 2020 · 1 comment
Open

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

Tudyx opened this issue Jun 22, 2020 · 1 comment

Comments

@Tudyx
Copy link

Tudyx commented Jun 22, 2020

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.

@DanMcInerney
Copy link
Owner

send PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants