Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gitee.com/spm_mirror/BinaryCookies

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitee.com/spm_mirror/BinaryCookies

  • v0.0.0-20190305030255-8f942818b31c
  • Go
  • Socket score

Version published
Created
Source

BinaryCookies

Read and write Apple's .binarycookies files


Includes the BinaryCookies library and the dumpcookies executable.

Install dumpcookies with brew install interstateone/formulae/dump-cookies or build from source.

I've tested the BinaryCookies library with real-world .binarycookies files and generated files using the HTTPCookieStorage APIs. It's able to decode and re-encode these files with full fidelity, although there are currently two flags with unknown meanings.

File Format

File

FieldEndiannessTypeSizeDescription
MagicBEUTF-84"cook", no terminator
Number of pagesBEUnsigned Int4
Page N sizeBEUnsigned Int4Repeat for N pages
Page NPage N sizePage N content
ChecksumBEUnsigned Int4Sum every 4th byte for each page
FooterBE80x071720050000004b
MetadataBinary Property ListContains NSHTTPCookieAcceptPolicy value

Page

FieldEndiannessTypeSizeDescription
HeaderBE40x00000100
Number of cookiesLEUnsigned Int4
Cookie N offsetLEUnsigned Int4Repeat for N cookies
Footer40x00000000
Cookie NCookie N sizeCookie N content
FieldEndiannessTypeSizeDescription
SizeLEUnsigned Int4Size in bytes
VersionLEUnsigned Int40 or 1
FlagsLEBit field4isSecure = 1, isHTTPOnly = 1 << 2, unknown1 = 1 << 3, unknown2 = 1 << 4
Has portLEUnsigned Int40 or 1
URL OffsetLEUnsigned Int4Offset from the start of the cookie
Name OffsetLEUnsigned Int4Offset from the start of the cookie
Path OffsetLEUnsigned Int4Offset from the start of the cookie
Value OffsetLEUnsigned Int4Offset from the start of the cookie
Comment OffsetLEUnsigned Int4Offset from the start of the cookie, 0x00000000 if not present
Comment URL OffsetLEUnsigned Int4Offset from the start of the cookie, 0x00000000 if not present
ExpirationLEDouble8Number of seconds since 00:00:00 UTC on 1 January 2001
CreationLEDouble8Number of seconds since 00:00:00 UTC on 1 January 2001
PortLEUnsigned Int2Only present if the "Has port" field is 1
CommentLEStringNull-terminated, optional
Comment URLLEStringNull-terminated, optional
URLLEStringNull-terminated
NameLEStringNull-terminated
PathLEStringNull-terminated
ValueLEStringNull-terminated

Reference

FAQs

Package last updated on 05 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc