invisible-core 18.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- invisible_core/__init__.py +109 -0
- invisible_core/__main__.py +759 -0
- invisible_core/_fpforge/__init__.py +26 -0
- invisible_core/_fpforge/_network.py +144 -0
- invisible_core/_fpforge/_sampler.py +349 -0
- invisible_core/_fpforge/data/browsing_pool.json +64 -0
- invisible_core/_fpforge/data/cpt_audio_given_class.json +61 -0
- invisible_core/_fpforge/data/cpt_browsing_given_class.json +138 -0
- invisible_core/_fpforge/data/cpt_codec_given_class.json +78 -0
- invisible_core/_fpforge/data/cpt_hwc_given_class.json +50 -0
- invisible_core/_fpforge/data/cpt_hwc_given_class_tier.json +386 -0
- invisible_core/_fpforge/data/cpt_intra_tier_given_class.json +17 -0
- invisible_core/_fpforge/data/cpt_msaa_given_class.json +16 -0
- invisible_core/_fpforge/data/cpt_msaa_given_class_screen.json +47 -0
- invisible_core/_fpforge/data/cpt_screen_given_class.json +54 -0
- invisible_core/_fpforge/data/cpt_screen_given_class_tier.json +987 -0
- invisible_core/_fpforge/data/cpt_storage_given_class.json +60 -0
- invisible_core/_fpforge/data/cpt_storage_given_class_tier.json +473 -0
- invisible_core/_fpforge/data/ff_win_distributions.json +650 -0
- invisible_core/_fpforge/data/prior_audio.json +17 -0
- invisible_core/_fpforge/data/priors_independent.json +14 -0
- invisible_core/_fpforge/data/webgl_gpu_pool.json +476 -0
- invisible_core/_fpforge/data/webgl_renderer_pool.json +1782 -0
- invisible_core/_fpforge/data/win_hw_marginals.json +469 -0
- invisible_core/_fpforge/profile.py +257 -0
- invisible_core/_geo.py +268 -0
- invisible_core/_headless.py +178 -0
- invisible_core/_pin.py +844 -0
- invisible_core/_proxy.py +56 -0
- invisible_core/_version.py +17 -0
- invisible_core/_webgl_personas.py +202 -0
- invisible_core/config.py +112 -0
- invisible_core/constants.py +98 -0
- invisible_core/data/font-map.json +1846 -0
- invisible_core/download.py +558 -0
- invisible_core/launch.py +153 -0
- invisible_core/prefs.py +664 -0
- invisible_core/py.typed +0 -0
- invisible_core/seal.json +1 -0
- invisible_core/seal.py +648 -0
- invisible_core-18.0.0.dist-info/METADATA +58 -0
- invisible_core-18.0.0.dist-info/RECORD +45 -0
- invisible_core-18.0.0.dist-info/WHEEL +4 -0
- invisible_core-18.0.0.dist-info/entry_points.txt +2 -0
- invisible_core-18.0.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"""invisible_core - pure config for a patched Firefox stealth profile.
|
|
2
|
+
|
|
3
|
+
Zero Playwright dependency: seed -> fingerprint profile -> Firefox prefs,
|
|
4
|
+
binary download, proxy config, geo/timezone resolution. This is the shared
|
|
5
|
+
foundation used by both:
|
|
6
|
+
- invisible_playwright (the Playwright automation wrapper), and
|
|
7
|
+
- invisible_firefox (the antidetect profile manager, launches the binary directly).
|
|
8
|
+
|
|
9
|
+
Quickstart:
|
|
10
|
+
|
|
11
|
+
from invisible_core import generate_profile, translate_profile_to_prefs, ensure_binary
|
|
12
|
+
|
|
13
|
+
profile = generate_profile(seed=42)
|
|
14
|
+
prefs = translate_profile_to_prefs(profile) # dict for firefox user prefs
|
|
15
|
+
binary = ensure_binary() # path to the patched Firefox
|
|
16
|
+
"""
|
|
17
|
+
from ._fpforge import (
|
|
18
|
+
AudioProfile,
|
|
19
|
+
CodecProfile,
|
|
20
|
+
GPUProfile,
|
|
21
|
+
HardwareProfile,
|
|
22
|
+
Profile,
|
|
23
|
+
ScreenProfile,
|
|
24
|
+
WebGLProfile,
|
|
25
|
+
generate_profile,
|
|
26
|
+
)
|
|
27
|
+
from ._webgl_personas import forced_gpu_class, select_persona, render_noise_seed
|
|
28
|
+
from .prefs import translate_profile_to_prefs
|
|
29
|
+
from .download import ensure_binary, ensure_geoip_mmdb
|
|
30
|
+
from ._geo import (
|
|
31
|
+
GeoTimezoneError,
|
|
32
|
+
discover_egress_ip,
|
|
33
|
+
ip_to_timezone,
|
|
34
|
+
prepare_session_geo,
|
|
35
|
+
resolve_session_locale,
|
|
36
|
+
resolve_session_timezone,
|
|
37
|
+
)
|
|
38
|
+
from ._headless import cloak_prefs, make_virtual_display
|
|
39
|
+
from ._proxy import configure_proxy
|
|
40
|
+
from .config import get_default_args, get_default_stealth_prefs
|
|
41
|
+
from .constants import BINARY_VERSION, FIREFOX_UPSTREAM_VERSION
|
|
42
|
+
from .launch import LaunchPlan, build_launch_env, build_launch_plan, write_user_js
|
|
43
|
+
|
|
44
|
+
# One headline version, and it is the honest one.
|
|
45
|
+
#
|
|
46
|
+
# `__version__` is DERIVED from the seal this package ships (invisible_core/
|
|
47
|
+
# seal.json -> _version.py), so it describes the code that is about to run. That
|
|
48
|
+
# is the number to put in a bug report, and the number both consumers pin with
|
|
49
|
+
# `invisible-core==`.
|
|
50
|
+
#
|
|
51
|
+
# `__install_record_version__` is a different fact: what the installer wrote into
|
|
52
|
+
# the .dist-info when the distribution was put there. It can disagree - measured
|
|
53
|
+
# in this tree: record 0.1.0, files 18.0.0 - and when it does, the record is the
|
|
54
|
+
# stale one while the files are what executes. It is kept because `pip`, `pip
|
|
55
|
+
# check` and the doctor's "STALE RECORD" line all read it, and diagnosing that
|
|
56
|
+
# skew needs both numbers. It is named so it cannot be mistaken for the version.
|
|
57
|
+
from ._version import __version__
|
|
58
|
+
|
|
59
|
+
from importlib.metadata import PackageNotFoundError, version as _pkg_version
|
|
60
|
+
|
|
61
|
+
try:
|
|
62
|
+
__install_record_version__ = _pkg_version("invisible-core")
|
|
63
|
+
except PackageNotFoundError:
|
|
64
|
+
# Running from a source checkout with no install record at all.
|
|
65
|
+
__install_record_version__ = ""
|
|
66
|
+
|
|
67
|
+
__all__ = [
|
|
68
|
+
# fingerprint generation
|
|
69
|
+
"generate_profile",
|
|
70
|
+
"Profile",
|
|
71
|
+
"GPUProfile",
|
|
72
|
+
"ScreenProfile",
|
|
73
|
+
"HardwareProfile",
|
|
74
|
+
"AudioProfile",
|
|
75
|
+
"CodecProfile",
|
|
76
|
+
"WebGLProfile",
|
|
77
|
+
# webgl personas
|
|
78
|
+
"forced_gpu_class",
|
|
79
|
+
"select_persona",
|
|
80
|
+
"render_noise_seed",
|
|
81
|
+
# prefs
|
|
82
|
+
"translate_profile_to_prefs",
|
|
83
|
+
"get_default_stealth_prefs",
|
|
84
|
+
"get_default_args",
|
|
85
|
+
# binary + geoip
|
|
86
|
+
"ensure_binary",
|
|
87
|
+
"ensure_geoip_mmdb",
|
|
88
|
+
# geo / timezone
|
|
89
|
+
"resolve_session_timezone",
|
|
90
|
+
"resolve_session_locale",
|
|
91
|
+
"prepare_session_geo",
|
|
92
|
+
"discover_egress_ip",
|
|
93
|
+
"ip_to_timezone",
|
|
94
|
+
"GeoTimezoneError",
|
|
95
|
+
# proxy + headless helpers
|
|
96
|
+
"configure_proxy",
|
|
97
|
+
"cloak_prefs",
|
|
98
|
+
"make_virtual_display",
|
|
99
|
+
# direct-launch helpers (shared by the wrapper + the profile manager)
|
|
100
|
+
"build_launch_plan",
|
|
101
|
+
"LaunchPlan",
|
|
102
|
+
"build_launch_env",
|
|
103
|
+
"write_user_js",
|
|
104
|
+
# constants
|
|
105
|
+
"BINARY_VERSION",
|
|
106
|
+
"FIREFOX_UPSTREAM_VERSION",
|
|
107
|
+
"__version__",
|
|
108
|
+
"__install_record_version__",
|
|
109
|
+
]
|