3 ms·
I looked at the iTerm2 example at [2]. The result was: find ~/Library -name '*.binarycookies' -exec binarycookies {} ; | grep -E "GitHub|Slack" | awk '{p
by eesmith 3y ago
I looked at the iTerm2 example at [2]. The result was:
find ~/Library -name '*.binarycookies' -exec binarycookies {} ; |
grep -E "GitHub|Slack" |
awk '{print $NF "\t" $1}'
Isn't that wrong? I mean, set aside how the search pattern also matches "Slackware", but my reading of the binarycookies command at https://github.com/cixtor/binarycookies/blob/master/cmd/binarycookies/main.go https://github.com/cixtor/binarycookies/blob/master/cmd/bina... says the output columns are:
expires domain path name value "Secure"? "HttpOnly"? comment?
so the awk command will get the cookie value (at $NF for most cookies) and the expires (at $1), when the request asked for the cookie name ($4) and value ($5).
The following (assuming no typo) looks like it should actually do the request:
find ~/Library -name '*.binarycookies' -exec binarycookies {} ; |
awk '$4 == "Google" || $4 == "Slack" {print $4 "\t" $5}'
OTOH, I expect the author of the tool to expect best how to parse its output, so perhaps I'm looking at the wrong tool?