JBrowser Source Docs

jbrowser.services.threats

Generated from the source code of JBrowser 1.5.4.

jbrowser/services/threats.py · 136 lines

Phishing & malware protection.

Top-level navigations are checked against a local list of known malicious hosts (URLhaus malware hosts + Phishing Army). The list is refreshed in the background about once a week; lookups never leave the machine. Blocked pages get an interstitial with "Go back" and an explicit "Continue anyway" escape hatch that is remembered only for the current session.

Constants#

Name Value
THREAT_SOURCES [('URLhaus malware hosts (abuse.ch)', 'https://urlhaus.abuse.ch/downloads/hostfile/'), …
REFRESH_SECONDS 7 * 24 * 3600

ThreatService#

class ThreatService(QObject)source
ThreatService(settings: Settings, list_file: Path, parent: QObject | None=None)

Signals

Signal Arguments
updated (int, str)

ThreatService.load#

load() -> Nonesource

ThreatService.enabled#

property enabledsource

ThreatService.match#

match(host: str) -> boolsource

True when host (or a parent domain) is a known phishing / malware host.

ThreatService.allow_for_session#

allow_for_session(host: str) -> Nonesource

ThreatService.add_hosts#

add_hosts(hosts: set[str]) -> Nonesource

Merge extra hosts (used by tests and by the updater).

ThreatService.maybe_refresh#

maybe_refresh() -> Nonesource

ThreatService.refresh#

refresh(proxies: dict | None=None) -> boolsource