Module implementing a cache for Google Safe Browsing.
None |
HashPrefixList | Class implementing a container for threat list data. |
SafeBrowsingCache | Class implementing a cache for Google Safe Browsing. |
ThreatList | Class implementing the threat list info. |
None |
Class implementing a container for threat list data.
None |
None |
HashPrefixList | Constructor |
__iter__ | Special method to iterate over the raw hashes. |
__len__ | Special method to calculate the number of entries. |
None |
Constructor
Special method to iterate over the raw hashes.
Special method to calculate the number of entries.
Class implementing a cache for Google Safe Browsing.
create_full_hash_cue_idx |
create_full_hash_expires_idx |
create_full_hash_value_idx |
create_full_hashes_stmt |
create_hash_prefix_stmt |
create_threat_list_stmt |
drop_full_hash_cue_idx |
drop_full_hash_expires_idx |
drop_full_hash_value_idx |
drop_full_hashes_stmt |
drop_hash_prefix_stmt |
drop_threat_list_stmt |
maxProcessEventsTime |
None |
SafeBrowsingCache | Constructor |
__openCacheDb | Private method to open the cache database. |
addThreatList | Public method to add a threat list to the cache. |
cleanupFullHashes | Public method to clean up full hash entries expired more than the given time. |
close | Public method to close the database. |
deleteHashPrefixList | Public method to delete hash prefixes for a given threat list. |
deleteThreatList | Public method to delete a threat list from the cache. |
getHashPrefixValuesToRemove | Public method to get the hash prefix values to be removed from the cache. |
getThreatLists | Public method to get the available threat lists. |
hashPrefixListChecksum | Public method to calculate the SHA256 checksum for an alphabetically sorted concatenated list of hash prefixes. |
lookupFullHashes | Public method to get a list of threat lists and expiration flag for the given hashes if a hash is blacklisted. |
lookupHashPrefix | Public method to look up hash prefixes in the local cache. |
populateHashPrefixList | Public method to populate the hash prefixes for a threat list. |
prepareCacheDb | Public method to prepare the cache database. |
removeHashPrefixIndices | Public method to remove hash prefixes from the cache. |
storeFullHash | Public method to store full hash data in the cache database. |
updateHashPrefixExpiration | Public method to update the hash prefix expiration time. |
updateThreatListClientState | Public method to update the client state of a threat list. |
None |
Constructor
Private method to open the cache database.
Public method to add a threat list to the cache.
Public method to clean up full hash entries expired more than the given time.
Public method to close the database.
Public method to delete hash prefixes for a given threat list.
Public method to delete a threat list from the cache.
Public method to get the hash prefix values to be removed from the cache.
Public method to get the available threat lists.
Public method to calculate the SHA256 checksum for an alphabetically sorted concatenated list of hash prefixes.
Public method to get a list of threat lists and expiration flag for the given hashes if a hash is blacklisted.
Public method to look up hash prefixes in the local cache.
Public method to populate the hash prefixes for a threat list.
Public method to prepare the cache database.
Public method to remove hash prefixes from the cache.
Public method to store full hash data in the cache database.
Public method to update the hash prefix expiration time.
Public method to update the client state of a threat list.
Class implementing the threat list info.
None |
fromApiEntry | Class method to instantiate a threat list given a threat list entry dictionary. |
ThreatList | Constructor |
__repr__ | Special method to generate a printable representation. |
asTuple | Public method to convert the object to a tuple. |
None |
Class method to instantiate a threat list given a threat list entry dictionary.
Constructor
Special method to generate a printable representation.
Public method to convert the object to a tuple.