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