28 <tr><td>None</td></tr> |
28 <tr><td>None</td></tr> |
29 </table> |
29 </table> |
30 <h3>Classes</h3> |
30 <h3>Classes</h3> |
31 <table> |
31 <table> |
32 <tr> |
32 <tr> |
33 <td><a href="#HashPrefixList">HashPrefixList</a></td> |
|
34 <td>Class implementing a container for threat list data.</td> |
|
35 </tr><tr> |
|
36 <td><a href="#SafeBrowsingCache">SafeBrowsingCache</a></td> |
33 <td><a href="#SafeBrowsingCache">SafeBrowsingCache</a></td> |
37 <td>Class implementing a cache for Google Safe Browsing.</td> |
34 <td>Class implementing a cache for Google Safe Browsing.</td> |
38 </tr><tr> |
|
39 <td><a href="#ThreatList">ThreatList</a></td> |
|
40 <td>Class implementing the threat list info.</td> |
|
41 </tr> |
35 </tr> |
42 </table> |
36 </table> |
43 <h3>Functions</h3> |
37 <h3>Functions</h3> |
44 <table> |
38 <table> |
45 <tr><td>None</td></tr> |
39 <tr><td>None</td></tr> |
46 </table> |
40 </table> |
47 <hr /><hr /> |
|
48 <a NAME="HashPrefixList" ID="HashPrefixList"></a> |
|
49 <h2>HashPrefixList</h2> |
|
50 <p> |
|
51 Class implementing a container for threat list data. |
|
52 </p> |
|
53 <h3>Derived from</h3> |
|
54 object |
|
55 <h3>Class Attributes</h3> |
|
56 <table> |
|
57 <tr><td>None</td></tr> |
|
58 </table> |
|
59 <h3>Class Methods</h3> |
|
60 <table> |
|
61 <tr><td>None</td></tr> |
|
62 </table> |
|
63 <h3>Methods</h3> |
|
64 <table> |
|
65 <tr> |
|
66 <td><a href="#HashPrefixList.__init__">HashPrefixList</a></td> |
|
67 <td>Constructor</td> |
|
68 </tr><tr> |
|
69 <td><a href="#HashPrefixList.__iter__">__iter__</a></td> |
|
70 <td>Special method to iterate over the raw hashes.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#HashPrefixList.__len__">__len__</a></td> |
|
73 <td>Special method to calculate the number of entries.</td> |
|
74 </tr> |
|
75 </table> |
|
76 <h3>Static Methods</h3> |
|
77 <table> |
|
78 <tr><td>None</td></tr> |
|
79 </table> |
|
80 <a NAME="HashPrefixList.__init__" ID="HashPrefixList.__init__"></a> |
|
81 <h4>HashPrefixList (Constructor)</h4> |
|
82 <b>HashPrefixList</b>(<i>prefixLength, rawHashes</i>) |
|
83 <p> |
|
84 Constructor |
|
85 </p><dl> |
|
86 <dt><i>prefixLength</i> (int)</dt> |
|
87 <dd> |
|
88 length of each hash prefix |
|
89 </dd><dt><i>rawHashes</i> (str)</dt> |
|
90 <dd> |
|
91 raw hash prefixes of given length concatenated and |
|
92 sorted in lexicographical order |
|
93 </dd> |
|
94 </dl><a NAME="HashPrefixList.__iter__" ID="HashPrefixList.__iter__"></a> |
|
95 <h4>HashPrefixList.__iter__</h4> |
|
96 <b>__iter__</b>(<i></i>) |
|
97 <p> |
|
98 Special method to iterate over the raw hashes. |
|
99 </p><dl> |
|
100 <dt>Returns:</dt> |
|
101 <dd> |
|
102 iterator object |
|
103 </dd> |
|
104 </dl><dl> |
|
105 <dt>Return Type:</dt> |
|
106 <dd> |
|
107 iterator |
|
108 </dd> |
|
109 </dl><a NAME="HashPrefixList.__len__" ID="HashPrefixList.__len__"></a> |
|
110 <h4>HashPrefixList.__len__</h4> |
|
111 <b>__len__</b>(<i></i>) |
|
112 <p> |
|
113 Special method to calculate the number of entries. |
|
114 </p><dl> |
|
115 <dt>Returns:</dt> |
|
116 <dd> |
|
117 length |
|
118 </dd> |
|
119 </dl><dl> |
|
120 <dt>Return Type:</dt> |
|
121 <dd> |
|
122 int |
|
123 </dd> |
|
124 </dl> |
|
125 <div align="right"><a href="#top">Up</a></div> |
|
126 <hr /><hr /> |
41 <hr /><hr /> |
127 <a NAME="SafeBrowsingCache" ID="SafeBrowsingCache"></a> |
42 <a NAME="SafeBrowsingCache" ID="SafeBrowsingCache"></a> |
128 <h2>SafeBrowsingCache</h2> |
43 <h2>SafeBrowsingCache</h2> |
129 <p> |
44 <p> |
130 Class implementing a cache for Google Safe Browsing. |
45 Class implementing a cache for Google Safe Browsing. |
458 <dd> |
373 <dd> |
459 new client state |
374 new client state |
460 </dd> |
375 </dd> |
461 </dl> |
376 </dl> |
462 <div align="right"><a href="#top">Up</a></div> |
377 <div align="right"><a href="#top">Up</a></div> |
463 <hr /><hr /> |
|
464 <a NAME="ThreatList" ID="ThreatList"></a> |
|
465 <h2>ThreatList</h2> |
|
466 <p> |
|
467 Class implementing the threat list info. |
|
468 </p> |
|
469 <h3>Derived from</h3> |
|
470 object |
|
471 <h3>Class Attributes</h3> |
|
472 <table> |
|
473 <tr><td>None</td></tr> |
|
474 </table> |
|
475 <h3>Class Methods</h3> |
|
476 <table> |
|
477 <tr> |
|
478 <td><a href="#ThreatList.fromApiEntry">fromApiEntry</a></td> |
|
479 <td>Class method to instantiate a threat list given a threat list entry dictionary.</td> |
|
480 </tr> |
|
481 </table> |
|
482 <h3>Methods</h3> |
|
483 <table> |
|
484 <tr> |
|
485 <td><a href="#ThreatList.__init__">ThreatList</a></td> |
|
486 <td>Constructor</td> |
|
487 </tr><tr> |
|
488 <td><a href="#ThreatList.__repr__">__repr__</a></td> |
|
489 <td>Special method to generate a printable representation.</td> |
|
490 </tr><tr> |
|
491 <td><a href="#ThreatList.asTuple">asTuple</a></td> |
|
492 <td>Public method to convert the object to a tuple.</td> |
|
493 </tr> |
|
494 </table> |
|
495 <h3>Static Methods</h3> |
|
496 <table> |
|
497 <tr><td>None</td></tr> |
|
498 </table> |
|
499 <a NAME="ThreatList.fromApiEntry" ID="ThreatList.fromApiEntry"></a> |
|
500 <h4>ThreatList.fromApiEntry (class method)</h4> |
|
501 <b>fromApiEntry</b>(<i>entry</i>) |
|
502 <p> |
|
503 Class method to instantiate a threat list given a threat list entry |
|
504 dictionary. |
|
505 </p><dl> |
|
506 <dt><i>entry</i> (dict)</dt> |
|
507 <dd> |
|
508 threat list entry dictionary |
|
509 </dd> |
|
510 </dl><dl> |
|
511 <dt>Returns:</dt> |
|
512 <dd> |
|
513 instantiated object |
|
514 </dd> |
|
515 </dl><dl> |
|
516 <dt>Return Type:</dt> |
|
517 <dd> |
|
518 ThreatList |
|
519 </dd> |
|
520 </dl><a NAME="ThreatList.__init__" ID="ThreatList.__init__"></a> |
|
521 <h4>ThreatList (Constructor)</h4> |
|
522 <b>ThreatList</b>(<i>threatType, platformType, threatEntryType</i>) |
|
523 <p> |
|
524 Constructor |
|
525 </p><dl> |
|
526 <dt><i>threatType</i> (str)</dt> |
|
527 <dd> |
|
528 threat type |
|
529 </dd><dt><i>platformType</i> (str)</dt> |
|
530 <dd> |
|
531 platform type |
|
532 </dd><dt><i>threatEntryType</i> (str)</dt> |
|
533 <dd> |
|
534 threat entry type |
|
535 </dd> |
|
536 </dl><a NAME="ThreatList.__repr__" ID="ThreatList.__repr__"></a> |
|
537 <h4>ThreatList.__repr__</h4> |
|
538 <b>__repr__</b>(<i></i>) |
|
539 <p> |
|
540 Special method to generate a printable representation. |
|
541 </p><dl> |
|
542 <dt>Returns:</dt> |
|
543 <dd> |
|
544 printable representation |
|
545 </dd> |
|
546 </dl><dl> |
|
547 <dt>Return Type:</dt> |
|
548 <dd> |
|
549 str |
|
550 </dd> |
|
551 </dl><a NAME="ThreatList.asTuple" ID="ThreatList.asTuple"></a> |
|
552 <h4>ThreatList.asTuple</h4> |
|
553 <b>asTuple</b>(<i></i>) |
|
554 <p> |
|
555 Public method to convert the object to a tuple. |
|
556 </p><dl> |
|
557 <dt>Returns:</dt> |
|
558 <dd> |
|
559 tuple containing the threat list info |
|
560 </dd> |
|
561 </dl><dl> |
|
562 <dt>Return Type:</dt> |
|
563 <dd> |
|
564 tuple of (str, str, str) |
|
565 </dd> |
|
566 </dl> |
|
567 <div align="right"><a href="#top">Up</a></div> |
|
568 <hr /> |
378 <hr /> |
569 </body></html> |
379 </body></html> |