Jump to content

How to get password for custom break managers


Recommended Posts

Posted (edited)
2 minutes ago, Taco Bell said:

I've coded a custom break manager.

 

I'm getting the username with bot.getUsername() but can't figure out how I should be getting my password (the one saved into osbot).

Any suggestions?

You can't, would be a huge data breach in security if a scripter would get access to passwords.
Osbot deals with logging and, all you have to do is specifiy when to logout and when to log back in.

Edited by Khaleesi
Posted (edited)

I got the impression the scripts are vetted to look for third party API calls (big no no).

So getting a password itself wouldn't be a problem.

I'm pretty sure token has a custom break handler on his NMZ script which gets my password (but let me watch when it logs out next time). 

I've disabled randoms for my break handler so I can't rely on the current AUTO LOGIN.

I can hardcode my own passwords for now I guess. Might have to rethink my break handler. 

10 minutes ago, Khaleesi said:

You can't, would be a huge data breach in security if a scripter would get access to passwords.
Osbot deals with logging and, all you have to do is specifiy when to logout and when to log back in.

But if I logout, it tries to run the AUTO LOGIN handler, am I missing something?

Edited by Taco Bell
Posted (edited)
54 minutes ago, Taco Bell said:

I got the impression the scripts are vetted to look for third party API calls (big no no).

So getting a password itself wouldn't be a problem.

I'm pretty sure token has a custom break handler on his NMZ script which gets my password (but let me watch when it logs out next time). 

I've disabled randoms for my break handler so I can't rely on the current AUTO LOGIN.

I can hardcode my own passwords for now I guess. Might have to rethink my break handler. 

But if I logout, it tries to run the AUTO LOGIN handler, am I missing something?

If I recall correctly, you do not need to disable randoms. You can override the break manager in isolation:

getBot().getRandomExecutor().overrideOSBotRandom(customBreakManager)

(Docs - https://osbot.org/api/org/osbot/rs07/event/RandomExecutor.html#overrideOSBotRandom-org.osbot.rs07.script.RandomSolver- )

Where your custom break manager might look something like: https://github.com/Explv/Explvs-AIO/blob/master/src/main/java/tasks/break_task/CustomBreakManager.java

There is no way to get passwords through the API, as it would be a security risk. You have to consider local scripts as well as SDN scripts.

Edited by Explv
  • Like 1
  • Heart 1
Posted
1 hour ago, Taco Bell said:

I got the impression the scripts are vetted to look for third party API calls (big no no).

So getting a password itself wouldn't be a problem.

I'm pretty sure token has a custom break handler on his NMZ script which gets my password (but let me watch when it logs out next time). 

I've disabled randoms for my break handler so I can't rely on the current AUTO LOGIN.

I can hardcode my own passwords for now I guess. Might have to rethink my break handler. 

But if I logout, it tries to run the AUTO LOGIN handler, am I missing something?

You don't have access to getting any passwords from the API. That's just a security risk.
You don't disable randoms, you override the current one and specific when the breakmanager is active and when it's not :)
 

9 minutes ago, Explv said:

If I recall correctly, you do not need to disable randoms. You can override the break manager in isolation:

getBot().getRandomExecutor().overrideOSBotRandom(customBreakManager)

(Docs - https://osbot.org/api/org/osbot/rs07/event/RandomExecutor.html#overrideOSBotRandom-org.osbot.rs07.script.RandomSolver- )

Where your custom break manager might look something like: https://github.com/Explv/Explvs-AIO/blob/master/src/main/java/tasks/break_task/CustomBreakManager.java

There is no way to get passwords through the API, as it would be a security risk. You have to consider local scripts as well as SDN scripts.

Basiscly this ^

  • Heart 1
Posted
8 minutes ago, Explv said:

If I recall correctly, you do not need to disable randoms. You can override the break manager in isolation:

getBot().getRandomExecutor().overrideOSBotRandom(customBreakManager)

(Docs - https://osbot.org/api/org/osbot/rs07/event/RandomExecutor.html#overrideOSBotRandom-org.osbot.rs07.script.RandomSolver- )

Where your custom break manager might look something like: https://github.com/Explv/Explvs-AIO/blob/master/src/main/java/tasks/break_task/CustomBreakManager.java

There is no way to get passwords through the API, as it would be a security risk. You have to consider local scripts as well as SDN scripts.

This is great. I think I can tweak my BreakManager class to extend the RandomSolver class. 

Thanks for your help y'all.

  • Like 1
  • 1 year later...
Posted (edited)
On 2/22/2021 at 10:08 AM, Explv said:

If I recall correctly, you do not need to disable randoms. You can override the break manager in isolation:

getBot().getRandomExecutor().overrideOSBotRandom(customBreakManager)

(Docs - https://osbot.org/api/org/osbot/rs07/event/RandomExecutor.html#overrideOSBotRandom-org.osbot.rs07.script.RandomSolver- )

Where your custom break manager might look something like: https://github.com/Explv/Explvs-AIO/blob/master/src/main/java/tasks/break_task/CustomBreakManager.java

There is no way to get passwords through the API, as it would be a security risk. You have to consider local scripts as well as SDN scripts.

Thanks for sharing the customBreakManager code, it really helps me a lot to write my own

Edited by Slick

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...