findmy.reports.anisette¶
Module for Anisette header providers.
Classes¶
Abstract base class for Anisette providers. |
|
Anisette provider. Fetches headers from a remote Anisette server. |
|
Anisette provider. Generates headers without a remote server using pyprovision. |
Module Contents¶
- class findmy.reports.anisette.BaseAnisetteProvider(loop: asyncio.AbstractEventLoop | None = None)¶
Bases:
findmy.util.closable.Closable
,abc.ABC
Abstract base class for Anisette providers.
Generously derived from https://github.com/nythepegasus/grandslam/blob/main/src/grandslam/gsa.py#L41.
- property otp: str¶
- Abstractmethod:
A seemingly random base64 string containing 28 bytes.
TODO: Figure out how to generate this.
- property machine: str¶
- Abstractmethod:
A base64 encoded string of 60 ‘random’ bytes.
We’re not sure how this is generated, we have to rely on the server. TODO: Figure out how to generate this.
- property timestamp: str¶
Current timestamp in ISO 8601 format.
- property timezone: str¶
Abbreviation of the timezone of the device.
- property locale: str¶
Locale of the device (e.g. en_US).
- property router: str¶
A number, either 17106176 or 50660608.
It doesn’t seem to matter which one we use. - 17106176 is used by Sideloadly and Provision (android) based servers. - 50660608 is used by Windows iCloud based servers.
- property client: str¶
Client string.
The format is as follows: <%MODEL%> <%OS%;%MAJOR%.%MINOR%(%SPMAJOR%,%SPMINOR%);%BUILD%>
<%AUTHKIT_BUNDLE_ID%/%AUTHKIT_VERSION% (%APP_BUNDLE_ID%/%APP_VERSION%)>
- Where:
MODEL: The model of the device (e.g. MacBookPro15,1 or ‘PC’ OS: The OS of the device (e.g. Mac OS X or Windows) MAJOR: The major version of the OS (e.g. 10) MINOR: The minor version of the OS (e.g. 15) SPMAJOR: The major version of the service pack (e.g. 0) (Windows only) SPMINOR: The minor version of the service pack (e.g. 0) (Windows only) BUILD: The build number of the OS (e.g. 19C57) AUTHKIT_BUNDLE_ID: The bundle ID of the AuthKit framework (e.g. com.apple.AuthKit) AUTHKIT_VERSION: The version of the AuthKit framework (e.g. 1) APP_BUNDLE_ID: The bundle ID of the app (e.g. com.apple.dt.Xcode) APP_VERSION: The version of the app (e.g. 3594.4.19)
- async get_headers(user_id: str, device_id: str, serial: str = '0', with_client_info: bool = False) dict[str, str] ¶
Generate a complete dictionary of Anisette headers.
Consider using BaseAppleAccount.get_anisette_headers instead.
- async get_cpd(user_id: str, device_id: str, serial: str = '0') dict[str, str] ¶
Generate a complete dictionary of CPD data.
Intended for internal use.
- class findmy.reports.anisette.RemoteAnisetteProvider(server_url: str)¶
Bases:
BaseAnisetteProvider
Anisette provider. Fetches headers from a remote Anisette server.
- property otp: str¶
- property machine: str¶
- async get_headers(user_id: str, device_id: str, serial: str = '0', with_client_info: bool = False) dict[str, str] ¶
- async close() None ¶
See AnisetteProvider.close.
- class findmy.reports.anisette.LocalAnisetteProvider(loop: asyncio.AbstractEventLoop | None = None)¶
Bases:
BaseAnisetteProvider
Anisette provider. Generates headers without a remote server using pyprovision.
- property otp: str¶
- Abstractmethod:
- property machine: str¶
- Abstractmethod:
- async close() None ¶