16 |
16 |
17 a { color: #BA6D36; } |
17 a { color: #BA6D36; } |
18 |
18 |
19 </style> |
19 </style> |
20 </head> |
20 </head> |
21 <body><a NAME="top" ID="top"></a> |
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
22 <h1>eric6.WebBrowser.SafeBrowsing.SafeBrowsingUrl</h1> |
23 <h1>eric6.WebBrowser.SafeBrowsing.SafeBrowsingUrl</h1> |
|
24 |
23 <p> |
25 <p> |
24 Module implementing an URL representation suitable for Google Safe Browsing. |
26 Module implementing an URL representation suitable for Google Safe Browsing. |
25 </p> |
27 </p> |
26 <h3>Global Attributes</h3> |
28 <h3>Global Attributes</h3> |
|
29 |
27 <table> |
30 <table> |
28 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
29 </table> |
32 </table> |
30 <h3>Classes</h3> |
33 <h3>Classes</h3> |
31 <table> |
34 |
|
35 <table> |
|
36 |
32 <tr> |
37 <tr> |
33 <td><a href="#SafeBrowsingUrl">SafeBrowsingUrl</a></td> |
38 <td><a href="#SafeBrowsingUrl">SafeBrowsingUrl</a></td> |
34 <td>Class implementing an URL representation suitable for Google Safe Browsing.</td> |
39 <td>Class implementing an URL representation suitable for Google Safe Browsing.</td> |
35 </tr> |
40 </tr> |
36 </table> |
41 </table> |
37 <h3>Functions</h3> |
42 <h3>Functions</h3> |
|
43 |
38 <table> |
44 <table> |
39 <tr><td>None</td></tr> |
45 <tr><td>None</td></tr> |
40 </table> |
46 </table> |
41 <hr /><hr /> |
47 <hr /> |
|
48 <hr /> |
42 <a NAME="SafeBrowsingUrl" ID="SafeBrowsingUrl"></a> |
49 <a NAME="SafeBrowsingUrl" ID="SafeBrowsingUrl"></a> |
43 <h2>SafeBrowsingUrl</h2> |
50 <h2>SafeBrowsingUrl</h2> |
|
51 |
44 <p> |
52 <p> |
45 Class implementing an URL representation suitable for Google Safe Browsing. |
53 Class implementing an URL representation suitable for Google Safe Browsing. |
46 </p> |
54 </p> |
47 <h3>Derived from</h3> |
55 <h3>Derived from</h3> |
48 object |
56 object |
49 <h3>Class Attributes</h3> |
57 <h3>Class Attributes</h3> |
|
58 |
50 <table> |
59 <table> |
51 <tr><td>None</td></tr> |
60 <tr><td>None</td></tr> |
52 </table> |
61 </table> |
53 <h3>Class Methods</h3> |
62 <h3>Class Methods</h3> |
|
63 |
54 <table> |
64 <table> |
55 <tr><td>None</td></tr> |
65 <tr><td>None</td></tr> |
56 </table> |
66 </table> |
57 <h3>Methods</h3> |
67 <h3>Methods</h3> |
58 <table> |
68 |
|
69 <table> |
|
70 |
59 <tr> |
71 <tr> |
60 <td><a href="#SafeBrowsingUrl.__init__">SafeBrowsingUrl</a></td> |
72 <td><a href="#SafeBrowsingUrl.__init__">SafeBrowsingUrl</a></td> |
61 <td>Constructor</td> |
73 <td>Constructor</td> |
62 </tr><tr> |
74 </tr> |
|
75 <tr> |
63 <td><a href="#SafeBrowsingUrl.canonical">canonical</a></td> |
76 <td><a href="#SafeBrowsingUrl.canonical">canonical</a></td> |
64 <td>Public method to convert the URL to the canonical form.</td> |
77 <td>Public method to convert the URL to the canonical form.</td> |
65 </tr><tr> |
78 </tr> |
|
79 <tr> |
66 <td><a href="#SafeBrowsingUrl.fullUnescape">fullUnescape</a></td> |
80 <td><a href="#SafeBrowsingUrl.fullUnescape">fullUnescape</a></td> |
67 <td>Method to recursively unescape an URL.</td> |
81 <td>Method to recursively unescape an URL.</td> |
68 </tr><tr> |
82 </tr> |
|
83 <tr> |
69 <td><a href="#SafeBrowsingUrl.hashes">hashes</a></td> |
84 <td><a href="#SafeBrowsingUrl.hashes">hashes</a></td> |
70 <td>Public method to get the hashes of all possible permutations of the URL in canonical form.</td> |
85 <td>Public method to get the hashes of all possible permutations of the URL in canonical form.</td> |
71 </tr><tr> |
86 </tr> |
|
87 <tr> |
72 <td><a href="#SafeBrowsingUrl.hostPermutations">hostPermutations</a></td> |
88 <td><a href="#SafeBrowsingUrl.hostPermutations">hostPermutations</a></td> |
73 <td>Method to generate the permutations of the host name.</td> |
89 <td>Method to generate the permutations of the host name.</td> |
74 </tr><tr> |
90 </tr> |
|
91 <tr> |
75 <td><a href="#SafeBrowsingUrl.pathPermutations">pathPermutations</a></td> |
92 <td><a href="#SafeBrowsingUrl.pathPermutations">pathPermutations</a></td> |
76 <td>Method to generate the permutations of the path.</td> |
93 <td>Method to generate the permutations of the path.</td> |
77 </tr><tr> |
94 </tr> |
|
95 <tr> |
78 <td><a href="#SafeBrowsingUrl.quote">quote</a></td> |
96 <td><a href="#SafeBrowsingUrl.quote">quote</a></td> |
79 <td>Method to quote a string.</td> |
97 <td>Method to quote a string.</td> |
80 </tr> |
98 </tr> |
81 </table> |
99 </table> |
82 <h3>Static Methods</h3> |
100 <h3>Static Methods</h3> |
83 <table> |
101 |
|
102 <table> |
|
103 |
84 <tr> |
104 <tr> |
85 <td><a href="#SafeBrowsingUrl.digest">digest</a></td> |
105 <td><a href="#SafeBrowsingUrl.digest">digest</a></td> |
86 <td>Static method to calculate the SHA256 digest of an URL string.</td> |
106 <td>Static method to calculate the SHA256 digest of an URL string.</td> |
87 </tr><tr> |
107 </tr> |
|
108 <tr> |
88 <td><a href="#SafeBrowsingUrl.permutations">permutations</a></td> |
109 <td><a href="#SafeBrowsingUrl.permutations">permutations</a></td> |
89 <td>Static method to determine all permutations of host name and path which can be applied to blacklisted URLs.</td> |
110 <td>Static method to determine all permutations of host name and path which can be applied to blacklisted URLs.</td> |
90 </tr> |
111 </tr> |
91 </table> |
112 </table> |
|
113 |
92 <a NAME="SafeBrowsingUrl.__init__" ID="SafeBrowsingUrl.__init__"></a> |
114 <a NAME="SafeBrowsingUrl.__init__" ID="SafeBrowsingUrl.__init__"></a> |
93 <h4>SafeBrowsingUrl (Constructor)</h4> |
115 <h4>SafeBrowsingUrl (Constructor)</h4> |
94 <b>SafeBrowsingUrl</b>(<i>url</i>) |
116 <b>SafeBrowsingUrl</b>(<i>url</i>) |
|
117 |
95 <p> |
118 <p> |
96 Constructor |
119 Constructor |
97 </p><dl> |
120 </p> |
|
121 <dl> |
|
122 |
98 <dt><i>url</i> (str)</dt> |
123 <dt><i>url</i> (str)</dt> |
99 <dd> |
124 <dd> |
100 URL to be embedded |
125 URL to be embedded |
101 </dd> |
126 </dd> |
102 </dl><a NAME="SafeBrowsingUrl.canonical" ID="SafeBrowsingUrl.canonical"></a> |
127 </dl> |
|
128 <a NAME="SafeBrowsingUrl.canonical" ID="SafeBrowsingUrl.canonical"></a> |
103 <h4>SafeBrowsingUrl.canonical</h4> |
129 <h4>SafeBrowsingUrl.canonical</h4> |
104 <b>canonical</b>(<i></i>) |
130 <b>canonical</b>(<i></i>) |
|
131 |
105 <p> |
132 <p> |
106 Public method to convert the URL to the canonical form. |
133 Public method to convert the URL to the canonical form. |
107 </p><dl> |
134 </p> |
|
135 <dl> |
108 <dt>Returns:</dt> |
136 <dt>Returns:</dt> |
109 <dd> |
137 <dd> |
110 canonical form of the URL |
138 canonical form of the URL |
111 </dd> |
139 </dd> |
112 </dl><dl> |
140 </dl> |
|
141 <dl> |
113 <dt>Return Type:</dt> |
142 <dt>Return Type:</dt> |
114 <dd> |
143 <dd> |
115 str |
144 str |
116 </dd> |
145 </dd> |
117 </dl><a NAME="SafeBrowsingUrl.fullUnescape" ID="SafeBrowsingUrl.fullUnescape"></a> |
146 </dl> |
|
147 <a NAME="SafeBrowsingUrl.fullUnescape" ID="SafeBrowsingUrl.fullUnescape"></a> |
118 <h4>SafeBrowsingUrl.fullUnescape</h4> |
148 <h4>SafeBrowsingUrl.fullUnescape</h4> |
119 <b>fullUnescape</b>(<i></i>) |
149 <b>fullUnescape</b>(<i></i>) |
|
150 |
120 <p> |
151 <p> |
121 Method to recursively unescape an URL. |
152 Method to recursively unescape an URL. |
122 </p><dl> |
153 </p> |
|
154 <dl> |
|
155 |
123 <dt><i>u</i> (str)</dt> |
156 <dt><i>u</i> (str)</dt> |
124 <dd> |
157 <dd> |
125 URL string to unescape |
158 URL string to unescape |
126 </dd> |
159 </dd> |
127 </dl><dl> |
160 </dl> |
|
161 <dl> |
128 <dt>Returns:</dt> |
162 <dt>Returns:</dt> |
129 <dd> |
163 <dd> |
130 unescaped URL string |
164 unescaped URL string |
131 </dd> |
165 </dd> |
132 </dl><dl> |
166 </dl> |
|
167 <dl> |
133 <dt>Return Type:</dt> |
168 <dt>Return Type:</dt> |
134 <dd> |
169 <dd> |
135 str |
170 str |
136 </dd> |
171 </dd> |
137 </dl><a NAME="SafeBrowsingUrl.hashes" ID="SafeBrowsingUrl.hashes"></a> |
172 </dl> |
|
173 <a NAME="SafeBrowsingUrl.hashes" ID="SafeBrowsingUrl.hashes"></a> |
138 <h4>SafeBrowsingUrl.hashes</h4> |
174 <h4>SafeBrowsingUrl.hashes</h4> |
139 <b>hashes</b>(<i></i>) |
175 <b>hashes</b>(<i></i>) |
|
176 |
140 <p> |
177 <p> |
141 Public method to get the hashes of all possible permutations of the URL |
178 Public method to get the hashes of all possible permutations of the URL |
142 in canonical form. |
179 in canonical form. |
143 </p><dl> |
180 </p> |
|
181 <dl> |
144 <dt>Returns:</dt> |
182 <dt>Returns:</dt> |
145 <dd> |
183 <dd> |
146 generator for the URL hashes |
184 generator for the URL hashes |
147 </dd> |
185 </dd> |
148 </dl><dl> |
186 </dl> |
|
187 <dl> |
149 <dt>Return Type:</dt> |
188 <dt>Return Type:</dt> |
150 <dd> |
189 <dd> |
151 generator of bytes |
190 generator of bytes |
152 </dd> |
191 </dd> |
153 </dl><a NAME="SafeBrowsingUrl.hostPermutations" ID="SafeBrowsingUrl.hostPermutations"></a> |
192 </dl> |
|
193 <a NAME="SafeBrowsingUrl.hostPermutations" ID="SafeBrowsingUrl.hostPermutations"></a> |
154 <h4>SafeBrowsingUrl.hostPermutations</h4> |
194 <h4>SafeBrowsingUrl.hostPermutations</h4> |
155 <b>hostPermutations</b>(<i></i>) |
195 <b>hostPermutations</b>(<i></i>) |
|
196 |
156 <p> |
197 <p> |
157 Method to generate the permutations of the host name. |
198 Method to generate the permutations of the host name. |
158 </p><dl> |
199 </p> |
|
200 <dl> |
|
201 |
159 <dt><i>host</i> (str)</dt> |
202 <dt><i>host</i> (str)</dt> |
160 <dd> |
203 <dd> |
161 host name |
204 host name |
162 </dd> |
205 </dd> |
163 </dl><dl> |
206 </dl> |
|
207 <dl> |
164 <dt>Returns:</dt> |
208 <dt>Returns:</dt> |
165 <dd> |
209 <dd> |
166 generator of permuted host names |
210 generator of permuted host names |
167 </dd> |
211 </dd> |
168 </dl><dl> |
212 </dl> |
|
213 <dl> |
169 <dt>Return Type:</dt> |
214 <dt>Return Type:</dt> |
170 <dd> |
215 <dd> |
171 generator of str |
216 generator of str |
172 </dd> |
217 </dd> |
173 </dl><a NAME="SafeBrowsingUrl.pathPermutations" ID="SafeBrowsingUrl.pathPermutations"></a> |
218 </dl> |
|
219 <a NAME="SafeBrowsingUrl.pathPermutations" ID="SafeBrowsingUrl.pathPermutations"></a> |
174 <h4>SafeBrowsingUrl.pathPermutations</h4> |
220 <h4>SafeBrowsingUrl.pathPermutations</h4> |
175 <b>pathPermutations</b>(<i></i>) |
221 <b>pathPermutations</b>(<i></i>) |
|
222 |
176 <p> |
223 <p> |
177 Method to generate the permutations of the path. |
224 Method to generate the permutations of the path. |
178 </p><dl> |
225 </p> |
|
226 <dl> |
|
227 |
179 <dt><i>path</i> (str)</dt> |
228 <dt><i>path</i> (str)</dt> |
180 <dd> |
229 <dd> |
181 path to be processed |
230 path to be processed |
182 </dd> |
231 </dd> |
183 </dl><dl> |
232 </dl> |
|
233 <dl> |
184 <dt>Returns:</dt> |
234 <dt>Returns:</dt> |
185 <dd> |
235 <dd> |
186 generator of permuted paths |
236 generator of permuted paths |
187 </dd> |
237 </dd> |
188 </dl><dl> |
238 </dl> |
|
239 <dl> |
189 <dt>Return Type:</dt> |
240 <dt>Return Type:</dt> |
190 <dd> |
241 <dd> |
191 generator of str |
242 generator of str |
192 </dd> |
243 </dd> |
193 </dl><a NAME="SafeBrowsingUrl.quote" ID="SafeBrowsingUrl.quote"></a> |
244 </dl> |
|
245 <a NAME="SafeBrowsingUrl.quote" ID="SafeBrowsingUrl.quote"></a> |
194 <h4>SafeBrowsingUrl.quote</h4> |
246 <h4>SafeBrowsingUrl.quote</h4> |
195 <b>quote</b>(<i></i>) |
247 <b>quote</b>(<i></i>) |
|
248 |
196 <p> |
249 <p> |
197 Method to quote a string. |
250 Method to quote a string. |
198 </p><dl> |
251 </p> |
|
252 <dl> |
|
253 |
199 <dt><i>string</i> (str)</dt> |
254 <dt><i>string</i> (str)</dt> |
200 <dd> |
255 <dd> |
201 to be quoted |
256 to be quoted |
202 </dd> |
257 </dd> |
203 </dl><dl> |
258 </dl> |
|
259 <dl> |
204 <dt>Returns:</dt> |
260 <dt>Returns:</dt> |
205 <dd> |
261 <dd> |
206 quoted string |
262 quoted string |
207 </dd> |
263 </dd> |
208 </dl><dl> |
264 </dl> |
|
265 <dl> |
209 <dt>Return Type:</dt> |
266 <dt>Return Type:</dt> |
210 <dd> |
267 <dd> |
211 str |
268 str |
212 </dd> |
269 </dd> |
213 </dl><a NAME="SafeBrowsingUrl.digest" ID="SafeBrowsingUrl.digest"></a> |
270 </dl> |
|
271 <a NAME="SafeBrowsingUrl.digest" ID="SafeBrowsingUrl.digest"></a> |
214 <h4>SafeBrowsingUrl.digest (static)</h4> |
272 <h4>SafeBrowsingUrl.digest (static)</h4> |
215 <b>digest</b>(<i></i>) |
273 <b>digest</b>(<i></i>) |
|
274 |
216 <p> |
275 <p> |
217 Static method to calculate the SHA256 digest of an URL string. |
276 Static method to calculate the SHA256 digest of an URL string. |
218 </p><dl> |
277 </p> |
|
278 <dl> |
|
279 |
219 <dt><i>url</i> (str)</dt> |
280 <dt><i>url</i> (str)</dt> |
220 <dd> |
281 <dd> |
221 URL string |
282 URL string |
222 </dd> |
283 </dd> |
223 </dl><dl> |
284 </dl> |
|
285 <dl> |
224 <dt>Returns:</dt> |
286 <dt>Returns:</dt> |
225 <dd> |
287 <dd> |
226 SHA256 digest of the URL string |
288 SHA256 digest of the URL string |
227 </dd> |
289 </dd> |
228 </dl><dl> |
290 </dl> |
|
291 <dl> |
229 <dt>Return Type:</dt> |
292 <dt>Return Type:</dt> |
230 <dd> |
293 <dd> |
231 bytes |
294 bytes |
232 </dd> |
295 </dd> |
233 </dl><a NAME="SafeBrowsingUrl.permutations" ID="SafeBrowsingUrl.permutations"></a> |
296 </dl> |
|
297 <a NAME="SafeBrowsingUrl.permutations" ID="SafeBrowsingUrl.permutations"></a> |
234 <h4>SafeBrowsingUrl.permutations (static)</h4> |
298 <h4>SafeBrowsingUrl.permutations (static)</h4> |
235 <b>permutations</b>(<i></i>) |
299 <b>permutations</b>(<i></i>) |
|
300 |
236 <p> |
301 <p> |
237 Static method to determine all permutations of host name and path |
302 Static method to determine all permutations of host name and path |
238 which can be applied to blacklisted URLs. |
303 which can be applied to blacklisted URLs. |
239 </p><dl> |
304 </p> |
|
305 <dl> |
|
306 |
240 <dt><i>url</i> (str)</dt> |
307 <dt><i>url</i> (str)</dt> |
241 <dd> |
308 <dd> |
242 URL string to be permuted |
309 URL string to be permuted |
243 </dd> |
310 </dd> |
244 </dl><dl> |
311 </dl> |
|
312 <dl> |
245 <dt>Returns:</dt> |
313 <dt>Returns:</dt> |
246 <dd> |
314 <dd> |
247 generator of permuted URL strings |
315 generator of permuted URL strings |
248 </dd> |
316 </dd> |
249 </dl><dl> |
317 </dl> |
|
318 <dl> |
250 <dt>Return Type:</dt> |
319 <dt>Return Type:</dt> |
251 <dd> |
320 <dd> |
252 generator of str |
321 generator of str |
253 </dd> |
322 </dd> |
254 </dl> |
323 </dl> |