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

default password #228

Open
Combinator78 opened this issue Nov 5, 2024 · 5 comments
Open

default password #228

Combinator78 opened this issue Nov 5, 2024 · 5 comments

Comments

@Combinator78
Copy link

There are ASICs with different passwords on the hosting. Is it possible to add the ability to specify in the settings what passwords, in addition to the standard one, to connect to the ASIC if the standard password fails to connect?
For example:

"default_antminer_web_password": "root",
"additional_antminer_web_password": "root2",
"additional_antminer_web_password": "root3",

@olegudff
Copy link

olegudff commented Nov 5, 2024

Yep

from pyasic import settings

settings.update("default_antminer_web_password", password)

@Combinator78
Copy link
Author

Combinator78 commented Nov 5, 2024

Can I specify multiple lines with such parameters?

settings.update("default_antminer_web_password", password1)

settings.update("default_antminer_web_password", password2)

settings.update("default_antminer_web_password", password3)

settings.update("default_antminer_web_password", password4)

The program will try these passwords until it gains access to the device?

@olegudff
Copy link

olegudff commented Nov 5, 2024

I think if you do it in a loop then yes.
But you will have to initialize the class again in a loop each time

@Combinator78
Copy link
Author

I think it would be nice to add such functionality to the library. Now it turns out you need to get data from the entire subnet, remember the IP addresses of devices that did not return the pool and user, then scan these IP addresses one by one with a different password.

@b-rowan
Copy link
Collaborator

b-rowan commented Nov 5, 2024

I'm not opposed to this idea, but it is a bit tricky to implement in a way that makes sense that would do it automatically.

My recommendation would be to keep a dict of IP -> password mappings, or even IP -> {web -> web_pwd, -> rpc -> rpc_pwd}, then you can just set the passwords for those devices using a custom get_miner function, in which you get the miner, then check the IP address against that dict.

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

3 participants