eric7/Documentation/Source/eric7.WebBrowser.SafeBrowsing.SafeBrowsingUrl.html

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

eric ide

mercurial