thewh1teagle / rookie

Load cookies from your web browsers
https://crates.io/crates/rookie
MIT License
207 stars 18 forks source link

[Bug]: Custom path fails #71

Closed SomePersonOk closed 3 weeks ago

SomePersonOk commented 3 weeks ago

What happened?

Custom path doesn't work and throws error, while using rookiepy.chrome() works fine

Steps to reproduce

here's the code i used for the output above:

for profile in profile_list:
        try:
            cookie_db = os.path.join(chrome_path, profile, 'Network', 'Cookies')
            print(cookie_db)
            cookiesdic = rookiepy.any_browser(db_path=cookie_db)

What browsers are you seeing the problem on?

No response

Relevant log output

C:\Users\rdayy\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies
Can't find any cookies

Location:
    rookie-rs\src/lib.rs:475:3
SomePersonOk commented 3 weeks ago

it apears i had to give the optional arguments, after giving the key path and domains=None, it works. except only for the first profile:

here is the output:

C:\Users\rdayy\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies
C:\Users\rdayy\AppData\Local\Google\Chrome\User Data\Profile 7\Network\Cookies
Can't find any cookies

Location:
    rookie-rs\src/lib.rs:475:3
C:\Users\rdayy\AppData\Local\Google\Chrome\User Data\Profile 15\Network\Cookies
Can't find any cookies

Location:
    rookie-rs\src/lib.rs:475:3
C:\Users\rdayy\AppData\Local\Google\Chrome\User Data\Profile 16\Network\Cookies
Can't find any cookies

Location:
    rookie-rs\src/lib.rs:475:3
C:\Users\rdayy\AppData\Local\Google\Chrome\User Data\Profile 23\Network\Cookies
C:\Users\rdayy\AppData\Local\Google\Chrome\User Data\'Default'\Network\Cookies
Unlocking Chrome database... This may take a while (sometimes up to a minute)
Can't find any cookies

Location:
    rookie-rs\src/lib.rs:475:3

edit: after opening the profiles( since they were not opened for a long time) then the script would work just fine, i'm assuming they were still using old encryption and by opening the profiles the cookies get latest encryption? if that so, do you have support for old encrypted cookies?

thewh1teagle commented 3 weeks ago

Fixed in https://github.com/thewh1teagle/rookie/issues/75 See the commit there. there error should tell why it happens.