Jump to content

How to get password for custom break managers


Taco Bell

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 1 year later...
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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