#!/opt/homebrew/bin/perl use v5.10; use strict; use warnings; use Mojo::Util qw(dumper); use HTTP::Cookies::Chrome; my $class = 'HTTP::Cookies::Chrome'; #my $path = $class->guess_path; my $path = '/Users/cmv/Library/Application Support/Google/Chrome/Profile 1/Cookies'; my $password = $class->guess_password; say <<~"HERE"; File: $path Pass: $password HERE my $cookies = HTTP::Cookies::Chrome->new( chrome_safe_storage_password => $password, ignore_discard => 0, ); $cookies->load( $path ); $cookies->scan( \&summary ); sub summary { state $previous_domain = ''; my( @cookie ) = @_; say $cookie[4] unless $cookie[4] eq $previous_domain; $previous_domain = $cookie[4]; printf "\t%-5s %-16s %s\n", map { $_ // '' } @cookie[3,1,2]; } #### $ ./chromecookie.pl File: /Users/cmv/Library/Application Support/Google/Chrome/Profile 1/Cookies Pass: XXXXXXXXXXXXXX Encrypted value is unexpected type <1> at ./chromecookie.pl line 27. Encrypted value is unexpected type <1> at ./chromecookie.pl line 27. Encrypted value is unexpected type <1> at ./chromecookie.pl line 27. Encrypted value is unexpected type <1> at ./chromecookie.pl line 27. ... Argument "v10?M-\f??ʷM-^EM-^T>^YM-^EdtM-^F^Y??kM-\0&dkYh!M-^Q??M-^F..." isn't numeric in division (/) at /Users/cmv/perl5/lib/perl5/HTTP/Cookies/Chrome.pm line 451. Argument "v108M-^Q-^D<-?^Z?^K?vM-\r%M-^[K?7%?M-^\^UM-^_?3եM-^[۠?..." isn't numeric in division (/) at /Users/cmv/perl5/lib/perl5/HTTP/Cookies/Chrome.pm line 451. Argument "v10????BA^G^D?dM-^TM-^A^Z???$^H]\n0??^^?:F?g??"^[G?EM-^H..." isn't numeric in division (/) at /Users/cmv/perl5/lib/perl5/HTTP/Cookies/Chrome.pm line 451. ...