|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.WebBrowser.VirusTotal.VirusTotalApi</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> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.WebBrowser.VirusTotal.VirusTotalApi</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing the <a href="http://www.virustotal.com">VirusTotal</a> |
|
27 API class. |
|
28 </p> |
|
29 <h3>Global Attributes</h3> |
|
30 |
|
31 <table> |
|
32 <tr><td>None</td></tr> |
|
33 </table> |
|
34 <h3>Classes</h3> |
|
35 |
|
36 <table> |
|
37 |
|
38 <tr> |
|
39 <td><a href="#VirusTotalAPI">VirusTotalAPI</a></td> |
|
40 <td>Class implementing the <a href="http://www.virustotal.com">VirusTotal</a> API.</td> |
|
41 </tr> |
|
42 </table> |
|
43 <h3>Functions</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>None</td></tr> |
|
47 </table> |
|
48 <hr /> |
|
49 <hr /> |
|
50 <a NAME="VirusTotalAPI" ID="VirusTotalAPI"></a> |
|
51 <h2>VirusTotalAPI</h2> |
|
52 |
|
53 <p> |
|
54 Class implementing the <a href="http://www.virustotal.com">VirusTotal</a> |
|
55 API. |
|
56 </p> |
|
57 <h3>Signals</h3> |
|
58 <dl> |
|
59 |
|
60 <dt>checkServiceKeyFinished(bool, str)</dt> |
|
61 <dd> |
|
62 emitted after the service key |
|
63 check has been performed. It gives a flag indicating validity |
|
64 (boolean) and an error message in case of a network error (string). |
|
65 </dd> |
|
66 <dt>fileScanReport(str)</dt> |
|
67 <dd> |
|
68 emitted with the URL of the file scan report |
|
69 page |
|
70 </dd> |
|
71 <dt>submitUrlError(str)</dt> |
|
72 <dd> |
|
73 emitted with the error string, if the URL scan |
|
74 submission returned an error. |
|
75 </dd> |
|
76 <dt>urlScanReport(str)</dt> |
|
77 <dd> |
|
78 emitted with the URL of the URL scan report page |
|
79 </dd> |
|
80 </dl> |
|
81 <h3>Derived from</h3> |
|
82 QObject |
|
83 <h3>Class Attributes</h3> |
|
84 |
|
85 <table> |
|
86 <tr><td>GetDomainReportPattern</td></tr><tr><td>GetFileReportPattern</td></tr><tr><td>GetIpAddressReportPattern</td></tr><tr><td>GetUrlReportPattern</td></tr><tr><td>ScanUrlPattern</td></tr><tr><td>ServiceCode_InvalidKey</td></tr><tr><td>ServiceCode_InvalidPrivilege</td></tr><tr><td>ServiceCode_RateLimitExceeded</td></tr><tr><td>ServiceResult_ItemNotPresent</td></tr><tr><td>ServiceResult_ItemPresent</td></tr><tr><td>ServiceResult_ItemQueued</td></tr><tr><td>TestServiceKeyScanID</td></tr> |
|
87 </table> |
|
88 <h3>Class Methods</h3> |
|
89 |
|
90 <table> |
|
91 <tr><td>None</td></tr> |
|
92 </table> |
|
93 <h3>Methods</h3> |
|
94 |
|
95 <table> |
|
96 |
|
97 <tr> |
|
98 <td><a href="#VirusTotalAPI.__init__">VirusTotalAPI</a></td> |
|
99 <td>Constructor</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#VirusTotalAPI.__checkServiceKeyValidityFinished">__checkServiceKeyValidityFinished</a></td> |
|
103 <td>Private slot to determine the result of the service key validity check.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#VirusTotalAPI.__getDomainReportFinished">__getDomainReportFinished</a></td> |
|
107 <td>Private slot to process the IP address report data.</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#VirusTotalAPI.__getFileScanReportUrl">__getFileScanReportUrl</a></td> |
|
111 <td>Private method to get the report URL for a file scan.</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#VirusTotalAPI.__getFileScanReportUrlFinished">__getFileScanReportUrlFinished</a></td> |
|
115 <td>Private slot to determine the result of the file scan report URL request.</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#VirusTotalAPI.__getIpAddressReportFinished">__getIpAddressReportFinished</a></td> |
|
119 <td>Private slot to process the IP address report data.</td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><a href="#VirusTotalAPI.__getUrlScanReportUrl">__getUrlScanReportUrl</a></td> |
|
123 <td>Private method to get the report URL for a URL scan.</td> |
|
124 </tr> |
|
125 <tr> |
|
126 <td><a href="#VirusTotalAPI.__getUrlScanReportUrlFinished">__getUrlScanReportUrlFinished</a></td> |
|
127 <td>Private slot to determine the result of the URL scan report URL.</td> |
|
128 </tr> |
|
129 <tr> |
|
130 <td><a href="#VirusTotalAPI.__loadSettings">__loadSettings</a></td> |
|
131 <td>Private method to load the settings.</td> |
|
132 </tr> |
|
133 <tr> |
|
134 <td><a href="#VirusTotalAPI.__submitUrlFinished">__submitUrlFinished</a></td> |
|
135 <td>Private slot to determine the result of the URL scan submission.</td> |
|
136 </tr> |
|
137 <tr> |
|
138 <td><a href="#VirusTotalAPI.checkServiceKeyValidity">checkServiceKeyValidity</a></td> |
|
139 <td>Public method to check the validity of the given service key.</td> |
|
140 </tr> |
|
141 <tr> |
|
142 <td><a href="#VirusTotalAPI.close">close</a></td> |
|
143 <td>Public slot to close the API.</td> |
|
144 </tr> |
|
145 <tr> |
|
146 <td><a href="#VirusTotalAPI.getDomainReport">getDomainReport</a></td> |
|
147 <td>Public method to retrieve a report for a domain.</td> |
|
148 </tr> |
|
149 <tr> |
|
150 <td><a href="#VirusTotalAPI.getIpAddressReport">getIpAddressReport</a></td> |
|
151 <td>Public method to retrieve a report for an IP address.</td> |
|
152 </tr> |
|
153 <tr> |
|
154 <td><a href="#VirusTotalAPI.preferencesChanged">preferencesChanged</a></td> |
|
155 <td>Public slot to handle a change of preferences.</td> |
|
156 </tr> |
|
157 <tr> |
|
158 <td><a href="#VirusTotalAPI.submitUrl">submitUrl</a></td> |
|
159 <td>Public method to submit an URL to be scanned.</td> |
|
160 </tr> |
|
161 </table> |
|
162 <h3>Static Methods</h3> |
|
163 |
|
164 <table> |
|
165 <tr><td>None</td></tr> |
|
166 </table> |
|
167 |
|
168 <a NAME="VirusTotalAPI.__init__" ID="VirusTotalAPI.__init__"></a> |
|
169 <h4>VirusTotalAPI (Constructor)</h4> |
|
170 <b>VirusTotalAPI</b>(<i>parent=None</i>) |
|
171 |
|
172 <p> |
|
173 Constructor |
|
174 </p> |
|
175 <dl> |
|
176 |
|
177 <dt><i>parent</i></dt> |
|
178 <dd> |
|
179 reference to the parent object (QObject) |
|
180 </dd> |
|
181 </dl> |
|
182 <a NAME="VirusTotalAPI.__checkServiceKeyValidityFinished" ID="VirusTotalAPI.__checkServiceKeyValidityFinished"></a> |
|
183 <h4>VirusTotalAPI.__checkServiceKeyValidityFinished</h4> |
|
184 <b>__checkServiceKeyValidityFinished</b>(<i>reply</i>) |
|
185 |
|
186 <p> |
|
187 Private slot to determine the result of the service key validity check. |
|
188 </p> |
|
189 <dl> |
|
190 |
|
191 <dt><i>reply</i> (QNetworkReply)</dt> |
|
192 <dd> |
|
193 reference to the network reply |
|
194 </dd> |
|
195 </dl> |
|
196 <a NAME="VirusTotalAPI.__getDomainReportFinished" ID="VirusTotalAPI.__getDomainReportFinished"></a> |
|
197 <h4>VirusTotalAPI.__getDomainReportFinished</h4> |
|
198 <b>__getDomainReportFinished</b>(<i>reply</i>) |
|
199 |
|
200 <p> |
|
201 Private slot to process the IP address report data. |
|
202 </p> |
|
203 <dl> |
|
204 |
|
205 <dt><i>reply</i> (QNetworkReply)</dt> |
|
206 <dd> |
|
207 reference to the network reply |
|
208 </dd> |
|
209 </dl> |
|
210 <a NAME="VirusTotalAPI.__getFileScanReportUrl" ID="VirusTotalAPI.__getFileScanReportUrl"></a> |
|
211 <h4>VirusTotalAPI.__getFileScanReportUrl</h4> |
|
212 <b>__getFileScanReportUrl</b>(<i>scanId</i>) |
|
213 |
|
214 <p> |
|
215 Private method to get the report URL for a file scan. |
|
216 </p> |
|
217 <dl> |
|
218 |
|
219 <dt><i>scanId</i></dt> |
|
220 <dd> |
|
221 ID of the scan to get the report URL for (string) |
|
222 </dd> |
|
223 </dl> |
|
224 <a NAME="VirusTotalAPI.__getFileScanReportUrlFinished" ID="VirusTotalAPI.__getFileScanReportUrlFinished"></a> |
|
225 <h4>VirusTotalAPI.__getFileScanReportUrlFinished</h4> |
|
226 <b>__getFileScanReportUrlFinished</b>(<i>reply</i>) |
|
227 |
|
228 <p> |
|
229 Private slot to determine the result of the file scan report URL |
|
230 request. |
|
231 </p> |
|
232 <dl> |
|
233 |
|
234 <dt><i>reply</i> (QNetworkReply)</dt> |
|
235 <dd> |
|
236 reference to the network reply |
|
237 </dd> |
|
238 </dl> |
|
239 <a NAME="VirusTotalAPI.__getIpAddressReportFinished" ID="VirusTotalAPI.__getIpAddressReportFinished"></a> |
|
240 <h4>VirusTotalAPI.__getIpAddressReportFinished</h4> |
|
241 <b>__getIpAddressReportFinished</b>(<i>reply</i>) |
|
242 |
|
243 <p> |
|
244 Private slot to process the IP address report data. |
|
245 </p> |
|
246 <dl> |
|
247 |
|
248 <dt><i>reply</i> (QNetworkReply)</dt> |
|
249 <dd> |
|
250 reference to the network reply |
|
251 </dd> |
|
252 </dl> |
|
253 <a NAME="VirusTotalAPI.__getUrlScanReportUrl" ID="VirusTotalAPI.__getUrlScanReportUrl"></a> |
|
254 <h4>VirusTotalAPI.__getUrlScanReportUrl</h4> |
|
255 <b>__getUrlScanReportUrl</b>(<i>scanId</i>) |
|
256 |
|
257 <p> |
|
258 Private method to get the report URL for a URL scan. |
|
259 </p> |
|
260 <dl> |
|
261 |
|
262 <dt><i>scanId</i></dt> |
|
263 <dd> |
|
264 ID of the scan to get the report URL for (string) |
|
265 </dd> |
|
266 </dl> |
|
267 <a NAME="VirusTotalAPI.__getUrlScanReportUrlFinished" ID="VirusTotalAPI.__getUrlScanReportUrlFinished"></a> |
|
268 <h4>VirusTotalAPI.__getUrlScanReportUrlFinished</h4> |
|
269 <b>__getUrlScanReportUrlFinished</b>(<i>reply</i>) |
|
270 |
|
271 <p> |
|
272 Private slot to determine the result of the URL scan report URL. |
|
273 </p> |
|
274 <dl> |
|
275 |
|
276 <dt><i>reply</i> (QNetworkReply)</dt> |
|
277 <dd> |
|
278 reference to the network reply |
|
279 request. |
|
280 </dd> |
|
281 </dl> |
|
282 <a NAME="VirusTotalAPI.__loadSettings" ID="VirusTotalAPI.__loadSettings"></a> |
|
283 <h4>VirusTotalAPI.__loadSettings</h4> |
|
284 <b>__loadSettings</b>(<i></i>) |
|
285 |
|
286 <p> |
|
287 Private method to load the settings. |
|
288 </p> |
|
289 <a NAME="VirusTotalAPI.__submitUrlFinished" ID="VirusTotalAPI.__submitUrlFinished"></a> |
|
290 <h4>VirusTotalAPI.__submitUrlFinished</h4> |
|
291 <b>__submitUrlFinished</b>(<i>reply</i>) |
|
292 |
|
293 <p> |
|
294 Private slot to determine the result of the URL scan submission. |
|
295 </p> |
|
296 <dl> |
|
297 |
|
298 <dt><i>reply</i> (QNetworkReply)</dt> |
|
299 <dd> |
|
300 reference to the network reply |
|
301 </dd> |
|
302 </dl> |
|
303 <a NAME="VirusTotalAPI.checkServiceKeyValidity" ID="VirusTotalAPI.checkServiceKeyValidity"></a> |
|
304 <h4>VirusTotalAPI.checkServiceKeyValidity</h4> |
|
305 <b>checkServiceKeyValidity</b>(<i>key, protocol=""</i>) |
|
306 |
|
307 <p> |
|
308 Public method to check the validity of the given service key. |
|
309 </p> |
|
310 <dl> |
|
311 |
|
312 <dt><i>key</i></dt> |
|
313 <dd> |
|
314 service key (string) |
|
315 </dd> |
|
316 <dt><i>protocol</i></dt> |
|
317 <dd> |
|
318 protocol used to access VirusTotal (string) |
|
319 </dd> |
|
320 </dl> |
|
321 <a NAME="VirusTotalAPI.close" ID="VirusTotalAPI.close"></a> |
|
322 <h4>VirusTotalAPI.close</h4> |
|
323 <b>close</b>(<i></i>) |
|
324 |
|
325 <p> |
|
326 Public slot to close the API. |
|
327 </p> |
|
328 <a NAME="VirusTotalAPI.getDomainReport" ID="VirusTotalAPI.getDomainReport"></a> |
|
329 <h4>VirusTotalAPI.getDomainReport</h4> |
|
330 <b>getDomainReport</b>(<i>domain</i>) |
|
331 |
|
332 <p> |
|
333 Public method to retrieve a report for a domain. |
|
334 </p> |
|
335 <dl> |
|
336 |
|
337 <dt><i>domain</i> (str)</dt> |
|
338 <dd> |
|
339 domain name |
|
340 </dd> |
|
341 </dl> |
|
342 <a NAME="VirusTotalAPI.getIpAddressReport" ID="VirusTotalAPI.getIpAddressReport"></a> |
|
343 <h4>VirusTotalAPI.getIpAddressReport</h4> |
|
344 <b>getIpAddressReport</b>(<i>ipAddress</i>) |
|
345 |
|
346 <p> |
|
347 Public method to retrieve a report for an IP address. |
|
348 </p> |
|
349 <dl> |
|
350 |
|
351 <dt><i>ipAddress</i> (str)</dt> |
|
352 <dd> |
|
353 valid IPv4 address in dotted quad notation |
|
354 </dd> |
|
355 </dl> |
|
356 <a NAME="VirusTotalAPI.preferencesChanged" ID="VirusTotalAPI.preferencesChanged"></a> |
|
357 <h4>VirusTotalAPI.preferencesChanged</h4> |
|
358 <b>preferencesChanged</b>(<i></i>) |
|
359 |
|
360 <p> |
|
361 Public slot to handle a change of preferences. |
|
362 </p> |
|
363 <a NAME="VirusTotalAPI.submitUrl" ID="VirusTotalAPI.submitUrl"></a> |
|
364 <h4>VirusTotalAPI.submitUrl</h4> |
|
365 <b>submitUrl</b>(<i>url</i>) |
|
366 |
|
367 <p> |
|
368 Public method to submit an URL to be scanned. |
|
369 </p> |
|
370 <dl> |
|
371 |
|
372 <dt><i>url</i></dt> |
|
373 <dd> |
|
374 url to be scanned (QUrl) |
|
375 </dd> |
|
376 </dl> |
|
377 <div align="right"><a href="#top">Up</a></div> |
|
378 <hr /> |
|
379 </body></html> |