Taco Bell Posted February 22, 2021 Share Posted February 22, 2021 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? Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted February 22, 2021 Share Posted February 22, 2021 (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 February 22, 2021 by Khaleesi Quote Link to comment Share on other sites More sharing options...
Taco Bell Posted February 22, 2021 Author Share Posted February 22, 2021 (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 February 22, 2021 by Taco Bell Quote Link to comment Share on other sites More sharing options...
Explv Posted February 22, 2021 Share Posted February 22, 2021 (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 February 22, 2021 by Explv 1 1 Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted February 22, 2021 Share Posted February 22, 2021 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 ^ 1 Quote Link to comment Share on other sites More sharing options...
Taco Bell Posted February 22, 2021 Author Share Posted February 22, 2021 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. 1 Quote Link to comment Share on other sites More sharing options...
Slick Posted May 9, 2022 Share Posted May 9, 2022 (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 May 9, 2022 by Slick Quote Link to comment Share on other sites More sharing options...