NETBinaryCookie 1.1.0

.NET 6.0
dotnet add package NETBinaryCookie --version 1.1.0
NuGet\Install-Package NETBinaryCookie -Version 1.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NETBinaryCookie" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NETBinaryCookie --version 1.1.0
#r "nuget: NETBinaryCookie, 1.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NETBinaryCookie as a Cake Addin
#addin nuget:?package=NETBinaryCookie&version=1.1.0

// Install NETBinaryCookie as a Cake Tool
#tool nuget:?package=NETBinaryCookie&version=1.1.0


A simple, independent Apple binarycookies format read-write package for .NET projects.

Makes Mac cookie forensics without limitations a breeze with .NET!

Supports parsing lists of cookies from an input binarycookies file or stream otherwise. Also supports writing those cookies back to disk or another stream.


The dependency graph for this package is kept intentionally minimal, and concerted effort has been made to keep it dependency-free.


Please submit any bug reports, feature requests, or other concerns on the project's GitHub page (where you can also find a lot more juicy information about the binarycookies file format!).

To drop me a line, feel free to send me a direct email:

Example Usage

Below demonstrates a very rudimentary usage of the read functions within this package.

At some later time, the to-be-implemented write functions will make modifying saved cookie stores much more viable.

using NETBinaryCookie;

// ...

var cookieJar = NETBinaryCookie.ReadFromFile(@"/Users/myuser/Documents/Cookies.binarycookies");

var mySpecificCookies = cookieJar.GetCookies(
    cookie => cookie.Domain.ToLower().Contains("github."));
// ...

var cookiesAfterChristmas = cookieJar.GetCookies(
    cookie => cookie.Creation > new DateTime(2023, 12, 25));

foreach (var cookie in cookiesAfterChristmas)
// ...

// If you're so inclined to do MORE than read the cookies file...
        Creation = DateTime.Now,
        Expiration = DateTime.Now + TimeSpan.FromDays(5),
        Domain = "",
        Name = "HelloFromDotnet",
        Path = "/myurl",
        Value = "Hello, world!",
        Flags = new[] { NetBinaryCookie.CookieFlag.SamesiteLax, NetBinaryCookie.CookieFlag.Secure }

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 188 2/26/2023
1.0.0 187 2/20/2023

Supports writing and parsing lists of cookies from an input binarycookies file or stream otherwise.