|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.WebBrowser.SafeBrowsing.SafeBrowsingThreatList</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.WebBrowser.SafeBrowsing.SafeBrowsingThreatList</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the threat list info class. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#HashPrefixList">HashPrefixList</a></td> |
|
25 <td>Class implementing a container for threat list data.</td> |
|
26 </tr> |
|
27 <tr> |
|
28 <td><a href="#ThreatList">ThreatList</a></td> |
|
29 <td>Class implementing the threat list info.</td> |
|
30 </tr> |
|
31 </table> |
|
32 <h3>Functions</h3> |
|
33 |
|
34 <table> |
|
35 <tr><td>None</td></tr> |
|
36 </table> |
|
37 <hr /> |
|
38 <hr /> |
|
39 <a NAME="HashPrefixList" ID="HashPrefixList"></a> |
|
40 <h2>HashPrefixList</h2> |
|
41 |
|
42 <p> |
|
43 Class implementing a container for threat list data. |
|
44 </p> |
|
45 <h3>Derived from</h3> |
|
46 None |
|
47 <h3>Class Attributes</h3> |
|
48 |
|
49 <table> |
|
50 <tr><td>None</td></tr> |
|
51 </table> |
|
52 <h3>Class Methods</h3> |
|
53 |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Methods</h3> |
|
58 |
|
59 <table> |
|
60 |
|
61 <tr> |
|
62 <td><a href="#HashPrefixList.__init__">HashPrefixList</a></td> |
|
63 <td>Constructor</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#HashPrefixList.__iter__">__iter__</a></td> |
|
67 <td>Special method to iterate over the raw hashes.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#HashPrefixList.__len__">__len__</a></td> |
|
71 <td>Special method to calculate the number of entries.</td> |
|
72 </tr> |
|
73 </table> |
|
74 <h3>Static Methods</h3> |
|
75 |
|
76 <table> |
|
77 <tr><td>None</td></tr> |
|
78 </table> |
|
79 |
|
80 <a NAME="HashPrefixList.__init__" ID="HashPrefixList.__init__"></a> |
|
81 <h4>HashPrefixList (Constructor)</h4> |
|
82 <b>HashPrefixList</b>(<i>prefixLength, rawHashes</i>) |
|
83 |
|
84 <p> |
|
85 Constructor |
|
86 </p> |
|
87 <dl> |
|
88 |
|
89 <dt><i>prefixLength</i> (int)</dt> |
|
90 <dd> |
|
91 length of each hash prefix |
|
92 </dd> |
|
93 <dt><i>rawHashes</i> (str)</dt> |
|
94 <dd> |
|
95 raw hash prefixes of given length concatenated and |
|
96 sorted in lexicographical order |
|
97 </dd> |
|
98 </dl> |
|
99 <a NAME="HashPrefixList.__iter__" ID="HashPrefixList.__iter__"></a> |
|
100 <h4>HashPrefixList.__iter__</h4> |
|
101 <b>__iter__</b>(<i></i>) |
|
102 |
|
103 <p> |
|
104 Special method to iterate over the raw hashes. |
|
105 </p> |
|
106 <dl> |
|
107 <dt>Return:</dt> |
|
108 <dd> |
|
109 iterator object |
|
110 </dd> |
|
111 </dl> |
|
112 <dl> |
|
113 <dt>Return Type:</dt> |
|
114 <dd> |
|
115 iterator |
|
116 </dd> |
|
117 </dl> |
|
118 <a NAME="HashPrefixList.__len__" ID="HashPrefixList.__len__"></a> |
|
119 <h4>HashPrefixList.__len__</h4> |
|
120 <b>__len__</b>(<i></i>) |
|
121 |
|
122 <p> |
|
123 Special method to calculate the number of entries. |
|
124 </p> |
|
125 <dl> |
|
126 <dt>Return:</dt> |
|
127 <dd> |
|
128 length |
|
129 </dd> |
|
130 </dl> |
|
131 <dl> |
|
132 <dt>Return Type:</dt> |
|
133 <dd> |
|
134 int |
|
135 </dd> |
|
136 </dl> |
|
137 <div align="right"><a href="#top">Up</a></div> |
|
138 <hr /> |
|
139 <hr /> |
|
140 <a NAME="ThreatList" ID="ThreatList"></a> |
|
141 <h2>ThreatList</h2> |
|
142 |
|
143 <p> |
|
144 Class implementing the threat list info. |
|
145 </p> |
|
146 <h3>Derived from</h3> |
|
147 None |
|
148 <h3>Class Attributes</h3> |
|
149 |
|
150 <table> |
|
151 <tr><td>None</td></tr> |
|
152 </table> |
|
153 <h3>Class Methods</h3> |
|
154 |
|
155 <table> |
|
156 |
|
157 <tr> |
|
158 <td><a href="#ThreatList.fromApiEntry">fromApiEntry</a></td> |
|
159 <td>Class method to instantiate a threat list given a threat list entry dictionary.</td> |
|
160 </tr> |
|
161 </table> |
|
162 <h3>Methods</h3> |
|
163 |
|
164 <table> |
|
165 |
|
166 <tr> |
|
167 <td><a href="#ThreatList.__init__">ThreatList</a></td> |
|
168 <td>Constructor</td> |
|
169 </tr> |
|
170 <tr> |
|
171 <td><a href="#ThreatList.__repr__">__repr__</a></td> |
|
172 <td>Special method to generate a printable representation.</td> |
|
173 </tr> |
|
174 <tr> |
|
175 <td><a href="#ThreatList.asTuple">asTuple</a></td> |
|
176 <td>Public method to convert the object to a tuple.</td> |
|
177 </tr> |
|
178 </table> |
|
179 <h3>Static Methods</h3> |
|
180 |
|
181 <table> |
|
182 <tr><td>None</td></tr> |
|
183 </table> |
|
184 |
|
185 <a NAME="ThreatList.fromApiEntry" ID="ThreatList.fromApiEntry"></a> |
|
186 <h4>ThreatList.fromApiEntry (class method)</h4> |
|
187 <b>fromApiEntry</b>(<i>entry</i>) |
|
188 |
|
189 <p> |
|
190 Class method to instantiate a threat list given a threat list entry |
|
191 dictionary. |
|
192 </p> |
|
193 <dl> |
|
194 |
|
195 <dt><i>entry</i> (dict)</dt> |
|
196 <dd> |
|
197 threat list entry dictionary |
|
198 </dd> |
|
199 </dl> |
|
200 <dl> |
|
201 <dt>Return:</dt> |
|
202 <dd> |
|
203 instantiated object |
|
204 </dd> |
|
205 </dl> |
|
206 <dl> |
|
207 <dt>Return Type:</dt> |
|
208 <dd> |
|
209 ThreatList |
|
210 </dd> |
|
211 </dl> |
|
212 <a NAME="ThreatList.__init__" ID="ThreatList.__init__"></a> |
|
213 <h4>ThreatList (Constructor)</h4> |
|
214 <b>ThreatList</b>(<i>threatType, platformType, threatEntryType</i>) |
|
215 |
|
216 <p> |
|
217 Constructor |
|
218 </p> |
|
219 <dl> |
|
220 |
|
221 <dt><i>threatType</i> (str)</dt> |
|
222 <dd> |
|
223 threat type |
|
224 </dd> |
|
225 <dt><i>platformType</i> (str)</dt> |
|
226 <dd> |
|
227 platform type |
|
228 </dd> |
|
229 <dt><i>threatEntryType</i> (str)</dt> |
|
230 <dd> |
|
231 threat entry type |
|
232 </dd> |
|
233 </dl> |
|
234 <a NAME="ThreatList.__repr__" ID="ThreatList.__repr__"></a> |
|
235 <h4>ThreatList.__repr__</h4> |
|
236 <b>__repr__</b>(<i></i>) |
|
237 |
|
238 <p> |
|
239 Special method to generate a printable representation. |
|
240 </p> |
|
241 <dl> |
|
242 <dt>Return:</dt> |
|
243 <dd> |
|
244 printable representation |
|
245 </dd> |
|
246 </dl> |
|
247 <dl> |
|
248 <dt>Return Type:</dt> |
|
249 <dd> |
|
250 str |
|
251 </dd> |
|
252 </dl> |
|
253 <a NAME="ThreatList.asTuple" ID="ThreatList.asTuple"></a> |
|
254 <h4>ThreatList.asTuple</h4> |
|
255 <b>asTuple</b>(<i></i>) |
|
256 |
|
257 <p> |
|
258 Public method to convert the object to a tuple. |
|
259 </p> |
|
260 <dl> |
|
261 <dt>Return:</dt> |
|
262 <dd> |
|
263 tuple containing the threat list info |
|
264 </dd> |
|
265 </dl> |
|
266 <dl> |
|
267 <dt>Return Type:</dt> |
|
268 <dd> |
|
269 tuple of (str, str, str) |
|
270 </dd> |
|
271 </dl> |
|
272 <div align="right"><a href="#top">Up</a></div> |
|
273 <hr /> |
|
274 </body></html> |