C# Class Google.SafeBrowsing.API

Google Safe Browsing API v2. Does not support MAC authentication. REKEY not supported. Only supports 32bit key sizes. http://code.google.com/intl/cs-CZ/apis/safebrowsing/developers_guide_v2.html
Afficher le fichier Open project: OndrejStastny/Google-Safe-Browsing-API-2.0-C- Class Usage Examples

Méthodes publiques

Méthode Description
API ( string apiKey ) : System
GenerateCombinations ( CanonicalURL url ) : IEnumerable

Generate valid url combinations that have to be checked againts the database

GetChunkData ( string chunkURL, string listName ) : IEnumerable

This is used by clients who want to get new data for known list types. Step 2/2 - called for each Chunk redirect. Download chunk content.

GetFullHashes ( CanonicalURL targetURL ) : IEnumerable

A client may request the list of full-length hashes for a hash prefix. This usually occurs when a client is about to download content from a url whose calculated hash starts with a prefix listed in a blacklist.

GetListData ( string list, IEnumerable whilelist, IEnumerable blacklist ) : ListData

This is used by clients who want to get new data for known list types. Step 1/2. Get chunk URLs redirects for ALL chunks Only supports data for one list at the time (which is not a problem for our implementation since we always only request from one list)

GetLists ( ) : IEnumerable

This is used by clients to discover the available list types.

Private Methods

Méthode Description
ComputeHash ( CanonicalURL url ) : byte[]
DecodeNumber ( byte buffer, int startPosition, int &endPosition ) : Int32
IsIpAddress ( string hostname ) : bool
ParseChunkData ( Stream stream, string listName ) : IEnumerable
ParseFullHashes ( Stream stream ) : IEnumerable
ParseIntervals ( string input ) : IEnumerable
ParseListData ( Stream stream ) : ListData
PrintIntervals ( IEnumerable list, string listName ) : string
ReadNumber ( byte buffer, int startPosition, int &endPosition ) : Int32
SplitHost ( string url ) : IEnumerable
SplitPath ( string url ) : IEnumerable

Method Details

API() public méthode

public API ( string apiKey ) : System
apiKey string
Résultat System

GenerateCombinations() public méthode

Generate valid url combinations that have to be checked againts the database
public GenerateCombinations ( CanonicalURL url ) : IEnumerable
url CanonicalURL Canonical URL
Résultat IEnumerable

GetChunkData() public méthode

This is used by clients who want to get new data for known list types. Step 2/2 - called for each Chunk redirect. Download chunk content.
public GetChunkData ( string chunkURL, string listName ) : IEnumerable
chunkURL string URL returned from GetListData
listName string
Résultat IEnumerable

GetFullHashes() public méthode

A client may request the list of full-length hashes for a hash prefix. This usually occurs when a client is about to download content from a url whose calculated hash starts with a prefix listed in a blacklist.
public GetFullHashes ( CanonicalURL targetURL ) : IEnumerable
targetURL CanonicalURL
Résultat IEnumerable

GetListData() public méthode

This is used by clients who want to get new data for known list types. Step 1/2. Get chunk URLs redirects for ALL chunks Only supports data for one list at the time (which is not a problem for our implementation since we always only request from one list)
public GetListData ( string list, IEnumerable whilelist, IEnumerable blacklist ) : ListData
list string list name
whilelist IEnumerable
blacklist IEnumerable all blacklist chunks already available localy
Résultat ListData

GetLists() public méthode

This is used by clients to discover the available list types.
public GetLists ( ) : IEnumerable
Résultat IEnumerable