42 <hr /><hr /> |
42 <hr /><hr /> |
43 <a NAME="VirusTotalAPI" ID="VirusTotalAPI"></a> |
43 <a NAME="VirusTotalAPI" ID="VirusTotalAPI"></a> |
44 <h2>VirusTotalAPI</h2> |
44 <h2>VirusTotalAPI</h2> |
45 <p> |
45 <p> |
46 Class implementing the <a href="http://www.virustotal.com">VirusTotal</a> API. |
46 Class implementing the <a href="http://www.virustotal.com">VirusTotal</a> API. |
47 </p> |
47 </p><h4>Signals</h4> |
|
48 <dl> |
|
49 <dt>checkServiceKeyFinished(bool, str)</dt> |
|
50 <dd> |
|
51 emitted after the service key check |
|
52 has been performed. It gives a flag indicating validity (boolean) and |
|
53 an error message in case of a network error (string). |
|
54 </dd><dt>fileScanReport(str)</dt> |
|
55 <dd> |
|
56 emitted with the URL of the file scan report page |
|
57 </dd><dt>submitUrlError(str)</dt> |
|
58 <dd> |
|
59 emitted with the error string, if the URL scan |
|
60 submission returned an error. |
|
61 </dd><dt>urlScanReport(str)</dt> |
|
62 <dd> |
|
63 emitted with the URL of the URL scan report page |
|
64 </dd> |
|
65 </dl> |
48 <h3>Derived from</h3> |
66 <h3>Derived from</h3> |
49 QObject |
67 QObject |
50 <h3>Class Attributes</h3> |
68 <h3>Class Attributes</h3> |
51 <table> |
69 <table> |
52 <tr><td>GetFileReportPattern</td></tr><tr><td>GetUrlReportPattern</td></tr><tr><td>ReportFileScanPagePattern</td></tr><tr><td>ReportUrlScanPagePattern</td></tr><tr><td>ScanUrlPattern</td></tr><tr><td>SearchUrl</td></tr><tr><td>ServiceResult_InvalidServiceKey</td></tr><tr><td>ServiceResult_ItemNotPresent</td></tr><tr><td>ServiceResult_ItemPresent</td></tr><tr><td>ServiceResult_RequestLimitReached</td></tr><tr><td>TestServiceKeyScanID</td></tr> |
70 <tr><td>GetFileReportPattern</td></tr><tr><td>GetUrlReportPattern</td></tr><tr><td>ReportFileScanPagePattern</td></tr><tr><td>ReportUrlScanPagePattern</td></tr><tr><td>ScanUrlPattern</td></tr><tr><td>SearchUrl</td></tr><tr><td>ServiceResult_InvalidServiceKey</td></tr><tr><td>ServiceResult_ItemNotPresent</td></tr><tr><td>ServiceResult_ItemPresent</td></tr><tr><td>ServiceResult_RequestLimitReached</td></tr><tr><td>TestServiceKeyScanID</td></tr> |
55 <table> |
73 <table> |
56 <tr> |
74 <tr> |
57 <td><a href="#VirusTotalAPI.__init__">VirusTotalAPI</a></td> |
75 <td><a href="#VirusTotalAPI.__init__">VirusTotalAPI</a></td> |
58 <td>Constructor</td> |
76 <td>Constructor</td> |
59 </tr><tr> |
77 </tr><tr> |
|
78 <td><a href="#VirusTotalAPI.__checkServiceKeyValidityFinished">__checkServiceKeyValidityFinished</a></td> |
|
79 <td>Private slot to determine the result of the service key validity check.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#VirusTotalAPI.__getFileScanReportUrl">__getFileScanReportUrl</a></td> |
|
82 <td>Private method to get the report URL for a file scan.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#VirusTotalAPI.__getFileScanReportUrlFinished">__getFileScanReportUrlFinished</a></td> |
|
85 <td>Private slot to determine the result of the file scan report URL request.</td> |
|
86 </tr><tr> |
60 <td><a href="#VirusTotalAPI.__loadSettings">__loadSettings</a></td> |
87 <td><a href="#VirusTotalAPI.__loadSettings">__loadSettings</a></td> |
61 <td>Private method to load the settings.</td> |
88 <td>Private method to load the settings.</td> |
62 </tr><tr> |
89 </tr><tr> |
|
90 <td><a href="#VirusTotalAPI.__submitUrlFinished">__submitUrlFinished</a></td> |
|
91 <td>Private slot to determine the result of the URL scan submission.</td> |
|
92 </tr><tr> |
63 <td><a href="#VirusTotalAPI.checkServiceKeyValidity">checkServiceKeyValidity</a></td> |
93 <td><a href="#VirusTotalAPI.checkServiceKeyValidity">checkServiceKeyValidity</a></td> |
64 <td>Public method to check the validity of the given service key.</td> |
94 <td>Public method to check the validity of the given service key.</td> |
65 </tr><tr> |
95 </tr><tr> |
66 <td><a href="#VirusTotalAPI.getFileScanReportUrl">getFileScanReportUrl</a></td> |
|
67 <td>Public method to get the report URL for a file scan.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#VirusTotalAPI.getSearchRequestData">getSearchRequestData</a></td> |
96 <td><a href="#VirusTotalAPI.getSearchRequestData">getSearchRequestData</a></td> |
70 <td></td> |
97 <td>Class method to assemble the search request data structure.</td> |
71 </tr><tr> |
98 </tr><tr> |
72 <td><a href="#VirusTotalAPI.getUrlScanReportUrl">getUrlScanReportUrl</a></td> |
99 <td><a href="#VirusTotalAPI.preferencesChanged">preferencesChanged</a></td> |
73 <td>Public method to get the report URL for a URL scan.</td> |
100 <td>Public slot to handle a change of preferences.</td> |
74 </tr><tr> |
101 </tr><tr> |
75 <td><a href="#VirusTotalAPI.submitUrl">submitUrl</a></td> |
102 <td><a href="#VirusTotalAPI.submitUrl">submitUrl</a></td> |
76 <td>Public method to submit an URL to be scanned.</td> |
103 <td>Public method to submit an URL to be scanned.</td> |
77 </tr> |
104 </tr> |
78 </table> |
105 </table> |
84 </p><dl> |
111 </p><dl> |
85 <dt><i>parent</i></dt> |
112 <dt><i>parent</i></dt> |
86 <dd> |
113 <dd> |
87 reference to the parent object (QObject) |
114 reference to the parent object (QObject) |
88 </dd> |
115 </dd> |
89 </dl><a NAME="VirusTotalAPI.__loadSettings" ID="VirusTotalAPI.__loadSettings"></a> |
116 </dl><a NAME="VirusTotalAPI.__checkServiceKeyValidityFinished" ID="VirusTotalAPI.__checkServiceKeyValidityFinished"></a> |
|
117 <h4>VirusTotalAPI.__checkServiceKeyValidityFinished</h4> |
|
118 <b>__checkServiceKeyValidityFinished</b>(<i></i>) |
|
119 <p> |
|
120 Private slot to determine the result of the service key validity check. |
|
121 </p><a NAME="VirusTotalAPI.__getFileScanReportUrl" ID="VirusTotalAPI.__getFileScanReportUrl"></a> |
|
122 <h4>VirusTotalAPI.__getFileScanReportUrl</h4> |
|
123 <b>__getFileScanReportUrl</b>(<i>scanId</i>) |
|
124 <p> |
|
125 Private method to get the report URL for a file scan. |
|
126 </p><dl> |
|
127 <dt><i>scanId</i></dt> |
|
128 <dd> |
|
129 ID of the scan to get the report URL for (string) |
|
130 </dd> |
|
131 </dl><dl> |
|
132 <dt>Returns:</dt> |
|
133 <dd> |
|
134 file scan report URL (string) |
|
135 </dd> |
|
136 </dl><a NAME="VirusTotalAPI.__getFileScanReportUrlFinished" ID="VirusTotalAPI.__getFileScanReportUrlFinished"></a> |
|
137 <h4>VirusTotalAPI.__getFileScanReportUrlFinished</h4> |
|
138 <b>__getFileScanReportUrlFinished</b>(<i></i>) |
|
139 <p> |
|
140 Private slot to determine the result of the file scan report URL request. |
|
141 </p><a NAME="VirusTotalAPI.__loadSettings" ID="VirusTotalAPI.__loadSettings"></a> |
90 <h4>VirusTotalAPI.__loadSettings</h4> |
142 <h4>VirusTotalAPI.__loadSettings</h4> |
91 <b>__loadSettings</b>(<i></i>) |
143 <b>__loadSettings</b>(<i></i>) |
92 <p> |
144 <p> |
93 Private method to load the settings. |
145 Private method to load the settings. |
|
146 </p><a NAME="VirusTotalAPI.__submitUrlFinished" ID="VirusTotalAPI.__submitUrlFinished"></a> |
|
147 <h4>VirusTotalAPI.__submitUrlFinished</h4> |
|
148 <b>__submitUrlFinished</b>(<i></i>) |
|
149 <p> |
|
150 Private slot to determine the result of the URL scan submission. |
94 </p><a NAME="VirusTotalAPI.checkServiceKeyValidity" ID="VirusTotalAPI.checkServiceKeyValidity"></a> |
151 </p><a NAME="VirusTotalAPI.checkServiceKeyValidity" ID="VirusTotalAPI.checkServiceKeyValidity"></a> |
95 <h4>VirusTotalAPI.checkServiceKeyValidity</h4> |
152 <h4>VirusTotalAPI.checkServiceKeyValidity</h4> |
96 <b>checkServiceKeyValidity</b>(<i>key, protocol=""</i>) |
153 <b>checkServiceKeyValidity</b>(<i>key, protocol=""</i>) |
97 <p> |
154 <p> |
98 Public method to check the validity of the given service key. |
155 Public method to check the validity of the given service key. |
108 <dt>Returns:</dt> |
165 <dt>Returns:</dt> |
109 <dd> |
166 <dd> |
110 flag indicating validity (boolean) and an error message in |
167 flag indicating validity (boolean) and an error message in |
111 case of a network error (string) |
168 case of a network error (string) |
112 </dd> |
169 </dd> |
113 </dl><a NAME="VirusTotalAPI.getFileScanReportUrl" ID="VirusTotalAPI.getFileScanReportUrl"></a> |
|
114 <h4>VirusTotalAPI.getFileScanReportUrl</h4> |
|
115 <b>getFileScanReportUrl</b>(<i>scanId</i>) |
|
116 <p> |
|
117 Public method to get the report URL for a file scan. |
|
118 </p><dl> |
|
119 <dt><i>scanId</i></dt> |
|
120 <dd> |
|
121 ID of the scan to get the report URL for (string) |
|
122 </dd> |
|
123 </dl><dl> |
|
124 <dt>Returns:</dt> |
|
125 <dd> |
|
126 file scan report URL (string) |
|
127 </dd> |
|
128 </dl><a NAME="VirusTotalAPI.getSearchRequestData" ID="VirusTotalAPI.getSearchRequestData"></a> |
170 </dl><a NAME="VirusTotalAPI.getSearchRequestData" ID="VirusTotalAPI.getSearchRequestData"></a> |
129 <h4>VirusTotalAPI.getSearchRequestData</h4> |
171 <h4>VirusTotalAPI.getSearchRequestData</h4> |
130 <b>getSearchRequestData</b>(<i>term</i>) |
172 <b>getSearchRequestData</b>(<i>term</i>) |
131 <p> |
173 <p> |
132 |
174 Class method to assemble the search request data structure. |
133 </p><p> |
175 </p><dl> |
134 |
176 <dt><i>term</i></dt> |
135 </p><a NAME="VirusTotalAPI.getUrlScanReportUrl" ID="VirusTotalAPI.getUrlScanReportUrl"></a> |
177 <dd> |
136 <h4>VirusTotalAPI.getUrlScanReportUrl</h4> |
178 search term (string) |
137 <b>getUrlScanReportUrl</b>(<i>scanId</i>) |
179 </dd> |
138 <p> |
180 </dl><dl> |
139 Public method to get the report URL for a URL scan. |
181 <dt>Returns:</dt> |
140 </p><dl> |
182 <dd> |
141 <dt><i>scanId</i></dt> |
183 tuple of network request object, operation and parameters |
142 <dd> |
184 (QNetworkRequest, QNetworkAccessManager.Operation, QByteArray) |
143 ID of the scan to get the report URL for (string) |
185 </dd> |
144 </dd> |
186 </dl><a NAME="VirusTotalAPI.preferencesChanged" ID="VirusTotalAPI.preferencesChanged"></a> |
145 </dl><dl> |
187 <h4>VirusTotalAPI.preferencesChanged</h4> |
146 <dt>Returns:</dt> |
188 <b>preferencesChanged</b>(<i></i>) |
147 <dd> |
189 <p> |
148 URL scan report URL (string) |
190 Public slot to handle a change of preferences. |
149 </dd> |
191 </p><a NAME="VirusTotalAPI.submitUrl" ID="VirusTotalAPI.submitUrl"></a> |
150 </dl><a NAME="VirusTotalAPI.submitUrl" ID="VirusTotalAPI.submitUrl"></a> |
|
151 <h4>VirusTotalAPI.submitUrl</h4> |
192 <h4>VirusTotalAPI.submitUrl</h4> |
152 <b>submitUrl</b>(<i>url</i>) |
193 <b>submitUrl</b>(<i>url</i>) |
153 <p> |
194 <p> |
154 Public method to submit an URL to be scanned. |
195 Public method to submit an URL to be scanned. |
155 </p><dl> |
196 </p><dl> |