A parser for Apple's proprietary binary cookie storage format.
More...
Go to the source code of this file.
A parser for Apple's proprietary binary cookie storage format.
Based on the Python script by Satishb3 satis.nosp@m.hb3@.nosp@m.secur.nosp@m.ityl.nosp@m.earn..nosp@m.net
◆ bincookie_creation_time
| #define bincookie_creation_time |
( |
|
c | ) |
|
Get the creation time of a cookie.
- Parameters
-
◆ bincookie_domain
| #define bincookie_domain |
( |
|
c | ) |
|
Get the domain of a cookie.
- Parameters
-
◆ bincookie_domain_access_full
| #define bincookie_domain_access_full |
( |
|
cookie_ptr | ) |
|
Check if a cookie can be used on all subdomains of its original domain.
- Parameters
-
◆ bincookie_expiration_time
| #define bincookie_expiration_time |
( |
|
c | ) |
|
Get the expiration time of a cookie.
- Parameters
-
◆ bincookie_is_secure
| #define bincookie_is_secure |
( |
|
cookie_ptr | ) |
|
Check if a cookie has the secure bit enabled (only to be accessed over HTTPS).
- Parameters
-
◆ bincookie_iter_state_init
| #define bincookie_iter_state_init |
( |
|
s | ) |
|
◆ bincookie_name
| #define bincookie_name |
( |
|
c | ) |
|
Get the name of a cookie.
- Parameters
-
◆ bincookie_path
| #define bincookie_path |
( |
|
c | ) |
|
Get the path of a cookie.
- Parameters
-
◆ bincookie_value
| #define bincookie_value |
( |
|
c | ) |
|
Get the value of a cookie.
- Parameters
-
◆ bincookie_flag
Security enabled for a cookie.
A cookie can be either or these values or 2 or more values OR'd together.
| Enumerator |
|---|
| secure | Cookie can only be used with HTTPS
|
| http_only | Cookie cannot be accessed by JavaScript
|
◆ bincookie_init_file()
| static bincookie_t *const bincookie_init_file |
( |
FILE * |
fin | ) |
|
|
inlinestatic |
Read a binarycookies file.
- Parameters
-
- Returns
- Pointer to a bincookie_t structure or
NULL.
◆ bincookie_init_path()
| static bincookie_t *const bincookie_init_path |
( |
const char * |
file_path | ) |
|
|
inlinestatic |
Read a binarycookies file.
- Parameters
-
| file_path | File path string. |
- Returns
- Pointer to a bincookie_t structure or
NULL.
◆ bincookie_iter_cookies()
Iterate cookies of a page.
- Parameters
-
| page | Pointer to bincookie_page_t structure. |
| i | Pointer to an integer to keep track of index. |
- Returns
- Pointer to a bincookie_cookie_t structure or
NULL.
◆ bincookie_iter_pages()
Iterate pages of a binarycookies file.
- Parameters
-
- Returns
- Pointer to a bincookie_page_t structure or
NULL.
◆ bincookie_validate_pages()
| static bool bincookie_validate_pages |
( |
const bincookie_t * |
bc, |
|
|
size_t |
num_bytes |
|
) |
| |
|
inlinestatic |
Validate that every page header, cookie offset table, and cookie referenced by a loaded buffer lies within its bounds.
The fixed header and the byte-swapped page size table must already have been validated by the caller. This routine checks the remaining file-controlled counts and offsets so that subsequent iteration cannot read or write outside the buffer that was read from disk.
- Parameters
-
| bc | Pointer to a fully read bincookie_t buffer. |
| num_bytes | Size of the buffer in bytes. |
- Returns
true when the structure is internally consistent, otherwise false.