mikeshinobi 0 Posted January 31, 2020 Report Share Posted January 31, 2020 On older versions of UBot any time I would close and reopen the software, it would clear the cookies for the browser completely. The same is true if I ran multiple instances of a compiled bot, every instance had its own cookies. Now it seems cookies are saved even after closing UBot and even worse, the cookies are shared across multiple instances of UBot or a compiled bot .exe. Additionally the "clear cookies" command doesn't work at all. Am I the only one experiencing this? I do suppose people told me not to upgrade to version 6 for a reason, and I'm glad I kept a backup of 5.9.44. Quote Link to post Share on other sites
SourceUltra 10 Posted January 31, 2020 Report Share Posted January 31, 2020 Hello, I was curious to test this because I have 6.1.1 and wanted to see if this was a problem I was having but unaware of. To test I opened up the Cookies file in \%AppData%\Roaming\UBot Studio\Browser\6.1.1\cookies which happens to be a sqlite database that I believe is being used by ubot to store cookie values for the inbuilt cefsharp browser. I opened it up and saw a table containing all the cookies from sites I had visited recently using the cefsharp browser. I then ran the clear cookies command in ubot and saw that the table had been completely cleared. You may want to open it up and test it for yourself to see if it is working correctly on your end. In testing the external browser, the cookies database is stored in a temporary folder that can be found by navigating to chrome://version/, listed under profile path. each instance of the external browser spawns its own temporary folder path, with its own cookies database. Quote Link to post Share on other sites
sunanto.id 3 Posted February 1, 2020 Report Share Posted February 1, 2020 On older versions of UBot any time I would close and reopen the software, it would clear the cookies for the browser completely. The same is true if I ran multiple instances of a compiled bot, every instance had its own cookies. Now it seems cookies are saved even after closing UBot and even worse, the cookies are shared across multiple instances of UBot or a compiled bot .exe. Additionally the "clear cookies" command doesn't work at all. Am I the only one experiencing this? I do suppose people told me not to upgrade to version 6 for a reason, and I'm glad I kept a backup of 5.9.44.sometimes it works sometimes not 1 Quote Link to post Share on other sites
SourceUltra 10 Posted February 1, 2020 Report Share Posted February 1, 2020 sometimes it works sometimes notCan you prove this? Quote Link to post Share on other sites
sunanto.id 3 Posted February 1, 2020 Report Share Posted February 1, 2020 Can you prove this? Last week i made a simple bot that login to an account and click some link.after i compile the bot and run it, it automatically login to an account that i use to make the bot inside ubot studio interface. i deleted the code and now i use external browser Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted February 2, 2020 Report Share Posted February 2, 2020 Can you prove this?Ya, it's a bug. Use javascript to clear cookies. https://www.elated.com/javascript-and-cookies/ run javascript("document.cookie.split(\";\").forEach(function(c) \{ document.cookie = c.replace(/^ +/, \"\").replace(/=.*/, \"=;expires=\" + new Date().toUTCString() + \";path=/\"); \});") I had to use this in a recent bot because ubot was NOT clearing the cookies in 6.1.1 on a particular site. Try that. Regards,CD Quote Link to post Share on other sites
SourceUltra 10 Posted February 3, 2020 Report Share Posted February 3, 2020 Ya, it's a bug. Use javascript to clear cookies. https://www.elated.com/javascript-and-cookies/ run javascript("document.cookie.split(\";\").forEach(function(c) \{ document.cookie = c.replace(/^ +/, \"\").replace(/=.*/, \"=;expires=\" + new Date().toUTCString() + \";path=/\"); \});") I had to use this in a recent bot because ubot was NOT clearing the cookies in 6.1.1 on a particular site. Try that. Regards,CD Thanks Ubot Docta, that's a good solution. I was also able to confirm it is not working as it should. The evidence is present in the Web Inspector. For anyone that may want proof: Open web inspector in ubot, from main menu > web inspector. In web inspector, navigate from application > cookies. Visit a page that has cookies. Check cookies menu in the Storage menu list. There you see all the cookies and their values from the site. To see if new cookies are being dropped after running the clear cookies command, refresh and check the Value and Expires date values. If the values are the same then the same cookies are being used. So for me it is pretty much 100% confirmed this is not working in 6.1.1. To delete cookies you can run the clear cookies command and then the reset browser command. I confirmed old cookies are being removed in this way. Or run javascript, like Ubot Docta suggested. Quote Link to post Share on other sites
mikeshinobi 0 Posted February 3, 2020 Author Report Share Posted February 3, 2020 Unfortunately I think the biggest problem is that it seems cookies are shared across instances of UBot, or multiple instances of a compiled bot, or even different compiled bots. So even if there's a workaround for clearing the cookies, it would end up clearing the cookies of any other instances of a bot as well. Cookies are also shared if you use the "in new browser" command, which seems a little silly and kind of defeats the purpose of that command at least if you're doing something that requires logging into an account. Quote Link to post Share on other sites
SourceUltra 10 Posted February 5, 2020 Report Share Posted February 5, 2020 I'm not seeing shared cookies when spawning multiple instances with the in external browser command, but yeah, it does look like the built in cefsharp browser is sharing cookies when using the in new browser command. Pretty silly indeed. Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted February 6, 2020 Report Share Posted February 6, 2020 You should be getting and setting your own cookies and save them to your own DB/file. navigate("http://www.html-kit.com/tools/cookietester/","Wait") wait for element(<value="Set Test Cookie">,20,"Appear") comment("set cookie") click(<value="Set Test Cookie">,"Left Click","No") wait(.5) comment("refresh document") click(<value="Refresh">,"Left Click","No") run javascript("var x = document.cookie;") set(#eval,$eval("x"),"Global") alert(#eval) There was a bug in 6.0.1 too Regards,Nick 1 Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted February 6, 2020 Report Share Posted February 6, 2020 more info here https://www.w3schools.com/js/js_cookies.asp Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.