mithwire 0.50.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. mithwire/__init__.py +32 -0
  2. mithwire/cdp/README.md +4 -0
  3. mithwire/cdp/__init__.py +6 -0
  4. mithwire/cdp/accessibility.py +668 -0
  5. mithwire/cdp/animation.py +494 -0
  6. mithwire/cdp/audits.py +1995 -0
  7. mithwire/cdp/autofill.py +292 -0
  8. mithwire/cdp/background_service.py +215 -0
  9. mithwire/cdp/bluetooth_emulation.py +626 -0
  10. mithwire/cdp/browser.py +821 -0
  11. mithwire/cdp/cache_storage.py +311 -0
  12. mithwire/cdp/cast.py +172 -0
  13. mithwire/cdp/console.py +107 -0
  14. mithwire/cdp/crash_report_context.py +55 -0
  15. mithwire/cdp/css.py +2750 -0
  16. mithwire/cdp/database.py +179 -0
  17. mithwire/cdp/debugger.py +1405 -0
  18. mithwire/cdp/device_access.py +141 -0
  19. mithwire/cdp/device_orientation.py +45 -0
  20. mithwire/cdp/dom.py +2257 -0
  21. mithwire/cdp/dom_debugger.py +321 -0
  22. mithwire/cdp/dom_snapshot.py +876 -0
  23. mithwire/cdp/dom_storage.py +222 -0
  24. mithwire/cdp/emulation.py +1779 -0
  25. mithwire/cdp/event_breakpoints.py +56 -0
  26. mithwire/cdp/extensions.py +238 -0
  27. mithwire/cdp/fed_cm.py +283 -0
  28. mithwire/cdp/fetch.py +507 -0
  29. mithwire/cdp/file_system.py +115 -0
  30. mithwire/cdp/headless_experimental.py +115 -0
  31. mithwire/cdp/heap_profiler.py +401 -0
  32. mithwire/cdp/indexed_db.py +528 -0
  33. mithwire/cdp/input_.py +701 -0
  34. mithwire/cdp/inspector.py +95 -0
  35. mithwire/cdp/io.py +101 -0
  36. mithwire/cdp/layer_tree.py +464 -0
  37. mithwire/cdp/log.py +190 -0
  38. mithwire/cdp/media.py +313 -0
  39. mithwire/cdp/memory.py +305 -0
  40. mithwire/cdp/network.py +5342 -0
  41. mithwire/cdp/overlay.py +1468 -0
  42. mithwire/cdp/page.py +3972 -0
  43. mithwire/cdp/performance.py +124 -0
  44. mithwire/cdp/performance_timeline.py +200 -0
  45. mithwire/cdp/preload.py +575 -0
  46. mithwire/cdp/profiler.py +420 -0
  47. mithwire/cdp/pwa.py +278 -0
  48. mithwire/cdp/py.typed +0 -0
  49. mithwire/cdp/runtime.py +1589 -0
  50. mithwire/cdp/schema.py +50 -0
  51. mithwire/cdp/security.py +518 -0
  52. mithwire/cdp/service_worker.py +401 -0
  53. mithwire/cdp/smart_card_emulation.py +891 -0
  54. mithwire/cdp/storage.py +1573 -0
  55. mithwire/cdp/system_info.py +327 -0
  56. mithwire/cdp/target.py +829 -0
  57. mithwire/cdp/tethering.py +65 -0
  58. mithwire/cdp/tracing.py +377 -0
  59. mithwire/cdp/util.py +18 -0
  60. mithwire/cdp/web_audio.py +606 -0
  61. mithwire/cdp/web_authn.py +598 -0
  62. mithwire/cdp/web_mcp.py +293 -0
  63. mithwire/core/_contradict.py +142 -0
  64. mithwire/core/browser.py +923 -0
  65. mithwire/core/cf_templates/cf_dark_checkbox.png +0 -0
  66. mithwire/core/cf_templates/cf_light_checkbox.png +0 -0
  67. mithwire/core/config.py +323 -0
  68. mithwire/core/connection.py +564 -0
  69. mithwire/core/element.py +1205 -0
  70. mithwire/core/tab.py +2202 -0
  71. mithwire/core/util.py +5063 -0
  72. mithwire-0.50.3.dist-info/METADATA +1049 -0
  73. mithwire-0.50.3.dist-info/RECORD +76 -0
  74. mithwire-0.50.3.dist-info/WHEEL +5 -0
  75. mithwire-0.50.3.dist-info/licenses/LICENSE.txt +619 -0
  76. mithwire-0.50.3.dist-info/top_level.txt +1 -0
mithwire/core/util.py ADDED
@@ -0,0 +1,5063 @@
1
+ # Copyright 2024 by UltrafunkAmsterdam (https://github.com/UltrafunkAmsterdam)
2
+ # All rights reserved.
3
+ # This file is part of the mithwire package.
4
+ # and is released under the "GNU AFFERO GENERAL PUBLIC LICENSE".
5
+ # Please see the LICENSE.txt file that should have been included as part of this package.
6
+
7
+
8
+ from __future__ import annotations
9
+
10
+ import asyncio
11
+ import logging
12
+ import re
13
+ import shutil
14
+ import types
15
+ from ssl import SSLContext
16
+ from typing import (TYPE_CHECKING, Any, Callable, Dict, Generator, List,
17
+ Optional, Set, Tuple, TypeVar, Union)
18
+
19
+ from .element import Element
20
+
21
+ if TYPE_CHECKING:
22
+ from .browser import Browser, PathLike
23
+
24
+ from .. import cdp
25
+ from .config import Config
26
+
27
+ __registered__instances__: Set[Browser] = set()
28
+
29
+ logger = logging.getLogger(__name__)
30
+ T = TypeVar("T")
31
+
32
+
33
+ async def start(
34
+ config: Optional[Config] = None,
35
+ *,
36
+ user_data_dir: Optional[PathLike] = None,
37
+ headless: Optional[bool] = False,
38
+ browser_executable_path: Optional[PathLike] = None,
39
+ browser_args: Optional[List[str]] = None,
40
+ sandbox: Optional[bool] = True,
41
+ lang: Optional[str] = None,
42
+ host: Optional[str] = None,
43
+ port: Optional[int] = None,
44
+ expert: Optional[bool] = None,
45
+ **kwargs: Optional[dict],
46
+ ) -> Browser:
47
+ """
48
+ helper function to launch a browser. it accepts several keyword parameters.
49
+ conveniently, you can just call it bare (no parameters) to quickly launch an instance
50
+ with best practice defaults.
51
+ note: this should be called ```await start()```
52
+
53
+
54
+ :param user_data_dir:
55
+ :type user_data_dir: PathLike
56
+
57
+ :param headless:
58
+ :type headless: bool
59
+
60
+ :param browser_executable_path:
61
+ :type browser_executable_path: PathLike
62
+
63
+ :param browser_args: ["--some-chromeparam=somevalue", "some-other-param=someval"]
64
+ :type browser_args: List[str]
65
+
66
+ :param sandbox: default True, but when set to False it adds --no-sandbox to the params, also
67
+ when using linux under a root user, it adds False automatically (else chrome won't start
68
+ :type sandbox: bool
69
+
70
+ :param lang: language string
71
+ :type lang: str
72
+
73
+ :param port: if you connect to an existing debuggable session, you can specify the port here
74
+ if both host and port are provided, mithwire will not start a local chrome browser!
75
+ :type port: int
76
+
77
+ :param host: if you connect to an existing debuggable session, you can specify the host here
78
+ if both host and port are provided, mithwire will not start a local chrome browser!
79
+ :type host: str
80
+
81
+ :param expert: when set to True, enabled "expert" mode.
82
+ This conveys, the inclusion of parameters: --disable-web-security ----disable-site-isolation-trials,
83
+ as well as some scripts and patching useful for debugging (for example, ensuring shadow-root is always in "open" mode)
84
+ :type expert: bool
85
+
86
+ :return:
87
+ """
88
+ if not config:
89
+ config = Config(
90
+ user_data_dir,
91
+ headless,
92
+ browser_executable_path,
93
+ browser_args,
94
+ sandbox,
95
+ lang,
96
+ host=host,
97
+ port=port,
98
+ expert=expert,
99
+ **kwargs,
100
+ )
101
+ from .browser import Browser
102
+
103
+ return await Browser.create(config)
104
+
105
+
106
+ async def create_from_undetected_chromedriver(
107
+ driver: "undetected_chromedriver.Chrome",
108
+ ) -> Browser:
109
+ """
110
+ create a mithwire.Browser instance from a running undetected_chromedriver.Chrome instance.
111
+ """
112
+ from .config import Config
113
+
114
+ conf = Config()
115
+
116
+ host, port = driver.options.debugger_address.split(":")
117
+ conf.host, conf.port = host, int(port)
118
+
119
+ # create mithwire Browser instance
120
+ browser = await start(conf)
121
+
122
+ browser._process_pid = driver.browser_pid
123
+ # stop chromedriver binary
124
+ driver.service.stop()
125
+ driver.browser_pid = -1
126
+ driver.user_data_dir = None
127
+ return browser
128
+
129
+
130
+ def get_registered_instances():
131
+ return __registered__instances__
132
+
133
+
134
+ def free_port() -> int:
135
+ """
136
+ Determines a free port using sockets.
137
+ """
138
+ import socket
139
+
140
+ free_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
141
+ free_socket.bind(("127.0.0.1", 0))
142
+ free_socket.listen(5)
143
+ port: int = free_socket.getsockname()[1]
144
+ free_socket.close()
145
+ return port
146
+
147
+
148
+ def deconstruct_browser(browser: Browser = None):
149
+ """
150
+ deconstructs all sessions and cleans up any leftover temp files (profile)
151
+ it requires no params.
152
+ if however, a browser instance is passed as argument, then run an async cleanup
153
+ routine for that instance only. (this is used for :py:class:`browser.BrowserContext` context manager)
154
+
155
+ :param browser: optional - the browser instance to cleanup the single instance
156
+ :ptype browser: browser.Browser
157
+ """
158
+ import time
159
+
160
+ if browser is not None:
161
+
162
+ async def deconstruct(b: Browser):
163
+ if not b.stopped:
164
+ b.stop()
165
+ config = b.config
166
+ if not config.uses_custom_data_dir:
167
+ for _ in range(3):
168
+ try:
169
+ shutil.rmtree(config.user_data_dir, ignore_errors=False)
170
+ logger.info(
171
+ "successfully removed temp profile %s"
172
+ % config.user_data_dir
173
+ )
174
+ break
175
+ except (Exception,):
176
+ await asyncio.sleep(0.250)
177
+
178
+ return asyncio.get_running_loop().create_task(deconstruct(browser))
179
+
180
+ for _ in __registered__instances__:
181
+ if not _.stopped:
182
+ _.stop()
183
+ for attempt in range(5):
184
+ try:
185
+ if _.config and not _.config.uses_custom_data_dir:
186
+ shutil.rmtree(_.config.user_data_dir, ignore_errors=False)
187
+ logger.info(
188
+ "successfully removed temp profile %s" % _.config.user_data_dir
189
+ )
190
+ except FileNotFoundError as e:
191
+ break
192
+ except (PermissionError, OSError) as e:
193
+ if attempt == 4:
194
+ logger.debug(
195
+ "problem removing data dir %s\nConsider checking whether it's there and remove it by hand\nerror: %s",
196
+ _.config.user_data_dir,
197
+ e,
198
+ )
199
+ break
200
+ time.sleep(0.15)
201
+ continue
202
+ __registered__instances__.clear()
203
+
204
+
205
+ def filter_recurse_all(
206
+ doc: T, predicate: Callable[[cdp.dom.Node, Element], bool]
207
+ ) -> List[T]:
208
+ """
209
+ test each child using predicate(child), and return all children for which predicate(child) == True
210
+
211
+ :param doc: the cdp.dom.Node object or :py:class:`mithwire.Element`
212
+ :param predicate: a function which takes a node as first parameter and returns a boolean, where True means include
213
+ :return:
214
+ :rtype:
215
+ """
216
+ if not hasattr(doc, "children"):
217
+ raise TypeError("object should have a .children attribute")
218
+ out = []
219
+ if doc and doc.children:
220
+ for child in doc.children:
221
+ if predicate(child):
222
+ # if predicate is True
223
+ out.append(child)
224
+ if child.shadow_roots is not None:
225
+ out.extend(filter_recurse_all(child.shadow_roots[0], predicate))
226
+ out.extend(filter_recurse_all(child, predicate))
227
+
228
+ return out
229
+
230
+
231
+ def filter_recurse(doc: T, predicate: Callable[[cdp.dom.Node, Element], bool]) -> T:
232
+ """
233
+ test each child using predicate(child), and return the first child of which predicate(child) == True
234
+
235
+ :param doc: the cdp.dom.Node object or :py:class:`mithwire.Element`
236
+ :param predicate: a function which takes a node as first parameter and returns a boolean, where True means include
237
+
238
+ """
239
+ if not hasattr(doc, "children"):
240
+ raise TypeError("object should have a .children attribute")
241
+
242
+ if doc and doc.children:
243
+ for child in doc.children:
244
+ if predicate(child):
245
+ # if predicate is True
246
+ return child
247
+ if child.shadow_roots:
248
+ shadow_root_result = filter_recurse(child.shadow_roots[0], predicate)
249
+ if shadow_root_result:
250
+ return shadow_root_result
251
+ result = filter_recurse(child, predicate)
252
+ if result:
253
+ return result
254
+
255
+
256
+ def flatten_frame_tree(
257
+ tree: Union[cdp.page.FrameResourceTree, cdp.page.FrameTree],
258
+ ) -> Generator[cdp.page.Frame, None, None]:
259
+ yield tree.frame
260
+ if tree.child_frames:
261
+ for child in tree.child_frames:
262
+ yield from flatten_frame_tree(child)
263
+
264
+
265
+ def flatten_frame_tree_resources(
266
+ tree: cdp.page.FrameResourceTree,
267
+ ) -> Generator[Tuple[cdp.page.Frame, cdp.page.FrameResource], None, None]:
268
+ for res in tree.resources:
269
+ yield tree.frame, res
270
+ if tree.child_frames:
271
+ for child in tree.child_frames:
272
+ yield from flatten_frame_tree(child)
273
+
274
+
275
+ def get_all_param_names(cls):
276
+ comp = cls.mro()
277
+ ret = []
278
+ for c in comp:
279
+ if not hasattr(c, "__annotations__"):
280
+ continue
281
+ for ann in c.__annotations__:
282
+ if ann not in ret:
283
+ ret.append(ann)
284
+ return ret
285
+
286
+
287
+ def circle(
288
+ x, y=None, radius=10, num=10, dir=0
289
+ ) -> Generator[Tuple[float, float], None, None]:
290
+ """
291
+ a generator will calculate coordinates around a circle.
292
+
293
+ :param x: start x position
294
+ :type x: int
295
+ :param y: start y position
296
+ :type y: int
297
+ :param radius: size of the circle
298
+ :type radius: int
299
+ :param num: the amount of points calculated (higher => slower, more cpu, but more detailed)
300
+ :type num: int
301
+ :return:
302
+ :rtype:
303
+ """
304
+ import math
305
+
306
+ r = radius
307
+ w = num
308
+ if not y:
309
+ y = x
310
+ a = int(x - r * 2)
311
+ b = int(y - r * 2)
312
+ m = (2 * math.pi) / w
313
+ if dir == 0:
314
+ # regular direction
315
+ ran = 0, w + 1, 1
316
+ else:
317
+ # opposite ?
318
+ ran = w + 1, 0, -1
319
+
320
+ for i in range(*ran):
321
+ x = a + r * math.sin(m * i)
322
+ y = b + r * math.cos(m * i)
323
+
324
+ yield x, y
325
+
326
+
327
+ def remove_from_tree(tree: cdp.dom.Node, node: cdp.dom.Node) -> cdp.dom.Node:
328
+ if not hasattr(tree, "children"):
329
+ raise TypeError("object should have a .children attribute")
330
+
331
+ if tree and tree.children:
332
+ for child in tree.children:
333
+ if child.backend_node_id == node.backend_node_id:
334
+ tree.children.remove(child)
335
+ remove_from_tree(child, node)
336
+ return tree
337
+
338
+
339
+ async def html_from_tree(tree: Union[cdp.dom.Node, Element], target: "mithwire.Tab"):
340
+ if not hasattr(tree, "children"):
341
+ raise TypeError("object should have a .children attribute")
342
+ out = ""
343
+ if tree and tree.children:
344
+ for child in tree.children:
345
+ if isinstance(child, Element):
346
+ out += await child.get_html()
347
+ else:
348
+ out += await target.send(
349
+ cdp.dom.get_outer_html(backend_node_id=child.backend_node_id)
350
+ )
351
+ out += await html_from_tree(child, target)
352
+ return out
353
+
354
+
355
+ def compare_target_info(
356
+ info1: cdp.target.TargetInfo, info2: cdp.target.TargetInfo
357
+ ) -> List[Tuple[str, Any, Any]]:
358
+ """
359
+ when logging mode is set to debug, browser object will log when target info
360
+ is changed. To provide more meaningful log messages, this function is called to
361
+ check what has actually changed between the 2 (by simple dict comparison).
362
+ it returns a list of tuples [ ... ( key_which_has_changed, old_value, new_value) ]
363
+
364
+ :param info1:
365
+ :type info1:
366
+ :param info2:
367
+ :type info2:
368
+ :return:
369
+ :rtype:
370
+ """
371
+ d1 = info1.__dict__
372
+ d2 = info2.__dict__
373
+ return [(k, v, d2[k]) for (k, v) in d1.items() if d2[k] != v]
374
+
375
+
376
+ def loop():
377
+ loop = asyncio.new_event_loop()
378
+ asyncio.set_event_loop(loop)
379
+ return loop
380
+
381
+
382
+ def to_camel(s: str):
383
+ """turn snake-case to camel"""
384
+ return re.sub("(.*?)_([a-zA-Z])", lambda m: m.group(1) + m.group(2).upper(), s, 0)
385
+
386
+
387
+ def cdp_get_module(domain: Union[str, types.ModuleType]):
388
+ """
389
+ get cdp module by given string
390
+
391
+ :param domain:
392
+ :type domain:
393
+ :return:
394
+ :rtype:
395
+ """
396
+ import importlib
397
+
398
+ if isinstance(domain, types.ModuleType):
399
+ # you get what you ask for
400
+ domain_mod = domain
401
+ else:
402
+ try:
403
+ if domain in ("input",):
404
+ domain = "input_"
405
+
406
+ # fallback if someone passes a str
407
+ domain_mod = getattr(cdp, domain)
408
+ if not domain_mod:
409
+ raise AttributeError
410
+ except AttributeError:
411
+ try:
412
+ domain_mod = importlib.import_module(domain)
413
+ except ModuleNotFoundError:
414
+ raise ModuleNotFoundError(
415
+ "could not find cdp module from input '%s'" % domain
416
+ )
417
+ return domain_mod
418
+
419
+
420
+ async def get_browser_version_info(browser: "mithwire.Browser") -> Dict[str, str]:
421
+
422
+ tab = await browser.get("chrome://version", new_tab=True)
423
+ rows = await tab.select_all("tr")
424
+ data = {}
425
+
426
+ for row in rows:
427
+ try:
428
+ ch1, ch2, *_ = row.children
429
+ data[ch1.text] = ch2.text
430
+ except (Exception,) as e:
431
+ logger.debug("get_browser_version_info", exc_info=True)
432
+ continue
433
+ await tab.close()
434
+ return data
435
+
436
+
437
+ def get_cf_template() -> bytearray:
438
+ """
439
+ this returns a template image (of a checkbox)
440
+ like this: https://ultrafunkamsterdam.github.io/nodriver/_images/template_example.png
441
+ didn't bother the hassle to include image files in my package.
442
+ :return:
443
+ :rtype:
444
+ """
445
+ return bytearray(
446
+ [
447
+ 137,
448
+ 80,
449
+ 78,
450
+ 71,
451
+ 13,
452
+ 10,
453
+ 26,
454
+ 10,
455
+ 0,
456
+ 0,
457
+ 0,
458
+ 13,
459
+ 73,
460
+ 72,
461
+ 68,
462
+ 82,
463
+ 0,
464
+ 0,
465
+ 0,
466
+ 111,
467
+ 0,
468
+ 0,
469
+ 0,
470
+ 73,
471
+ 8,
472
+ 6,
473
+ 0,
474
+ 0,
475
+ 0,
476
+ 51,
477
+ 48,
478
+ 120,
479
+ 75,
480
+ 0,
481
+ 0,
482
+ 0,
483
+ 1,
484
+ 115,
485
+ 82,
486
+ 71,
487
+ 66,
488
+ 0,
489
+ 174,
490
+ 206,
491
+ 28,
492
+ 233,
493
+ 0,
494
+ 0,
495
+ 0,
496
+ 4,
497
+ 103,
498
+ 65,
499
+ 77,
500
+ 65,
501
+ 0,
502
+ 0,
503
+ 177,
504
+ 143,
505
+ 11,
506
+ 252,
507
+ 97,
508
+ 5,
509
+ 0,
510
+ 0,
511
+ 0,
512
+ 9,
513
+ 112,
514
+ 72,
515
+ 89,
516
+ 115,
517
+ 0,
518
+ 0,
519
+ 14,
520
+ 195,
521
+ 0,
522
+ 0,
523
+ 14,
524
+ 195,
525
+ 1,
526
+ 199,
527
+ 111,
528
+ 168,
529
+ 100,
530
+ 0,
531
+ 0,
532
+ 15,
533
+ 213,
534
+ 73,
535
+ 68,
536
+ 65,
537
+ 84,
538
+ 120,
539
+ 94,
540
+ 237,
541
+ 92,
542
+ 105,
543
+ 172,
544
+ 85,
545
+ 213,
546
+ 25,
547
+ 93,
548
+ 119,
549
+ 158,
550
+ 223,
551
+ 192,
552
+ 123,
553
+ 128,
554
+ 96,
555
+ 9,
556
+ 210,
557
+ 2,
558
+ 162,
559
+ 17,
560
+ 67,
561
+ 109,
562
+ 165,
563
+ 145,
564
+ 161,
565
+ 32,
566
+ 134,
567
+ 65,
568
+ 69,
569
+ 193,
570
+ 52,
571
+ 237,
572
+ 175,
573
+ 214,
574
+ 214,
575
+ 214,
576
+ 136,
577
+ 52,
578
+ 105,
579
+ 171,
580
+ 5,
581
+ 106,
582
+ 210,
583
+ 212,
584
+ 90,
585
+ 192,
586
+ 40,
587
+ 21,
588
+ 19,
589
+ 127,
590
+ 52,
591
+ 246,
592
+ 159,
593
+ 65,
594
+ 165,
595
+ 166,
596
+ 150,
597
+ 198,
598
+ 161,
599
+ 168,
600
+ 37,
601
+ 14,
602
+ 209,
603
+ 130,
604
+ 3,
605
+ 56,
606
+ 80,
607
+ 177,
608
+ 104,
609
+ 20,
610
+ 172,
611
+ 32,
612
+ 195,
613
+ 147,
614
+ 65,
615
+ 129,
616
+ 55,
617
+ 220,
618
+ 121,
619
+ 236,
620
+ 90,
621
+ 251,
622
+ 220,
623
+ 253,
624
+ 184,
625
+ 128,
626
+ 76,
627
+ 245,
628
+ 62,
629
+ 251,
630
+ 110,
631
+ 223,
632
+ 89,
633
+ 186,
634
+ 57,
635
+ 231,
636
+ 236,
637
+ 121,
638
+ 127,
639
+ 107,
640
+ 127,
641
+ 223,
642
+ 254,
643
+ 246,
644
+ 57,
645
+ 251,
646
+ 62,
647
+ 79,
648
+ 133,
649
+ 192,
650
+ 151,
651
+ 136,
652
+ 227,
653
+ 27,
654
+ 243,
655
+ 84,
656
+ 175,
657
+ 39,
658
+ 197,
659
+ 73,
660
+ 11,
661
+ 20,
662
+ 25,
663
+ 188,
664
+ 76,
665
+ 103,
666
+ 16,
667
+ 60,
668
+ 5,
669
+ 231,
670
+ 90,
671
+ 9,
672
+ 56,
673
+ 215,
674
+ 19,
675
+ 158,
676
+ 245,
677
+ 143,
678
+ 202,
679
+ 168,
680
+ 66,
681
+ 31,
682
+ 42,
683
+ 42,
684
+ 103,
685
+ 226,
686
+ 148,
687
+ 175,
688
+ 204,
689
+ 16,
690
+ 50,
691
+ 255,
692
+ 86,
693
+ 107,
694
+ 35,
695
+ 114,
696
+ 12,
697
+ 122,
698
+ 98,
699
+ 121,
700
+ 22,
701
+ 241,
702
+ 120,
703
+ 148,
704
+ 90,
705
+ 230,
706
+ 173,
707
+ 223,
708
+ 41,
709
+ 86,
710
+ 225,
711
+ 51,
712
+ 111,
713
+ 242,
714
+ 204,
715
+ 163,
716
+ 92,
717
+ 254,
718
+ 146,
719
+ 210,
720
+ 249,
721
+ 236,
722
+ 115,
723
+ 106,
724
+ 8,
725
+ 150,
726
+ 249,
727
+ 204,
728
+ 114,
729
+ 21,
730
+ 62,
731
+ 43,
732
+ 197,
733
+ 103,
734
+ 98,
735
+ 85,
736
+ 190,
737
+ 218,
738
+ 108,
739
+ 73,
740
+ 55,
741
+ 94,
742
+ 20,
743
+ 153,
744
+ 93,
745
+ 233,
746
+ 65,
747
+ 197,
748
+ 153,
749
+ 177,
750
+ 150,
751
+ 249,
752
+ 95,
753
+ 17,
754
+ 69,
755
+ 143,
756
+ 218,
757
+ 41,
758
+ 33,
759
+ 144,
760
+ 103,
761
+ 164,
762
+ 215,
763
+ 135,
764
+ 130,
765
+ 46,
766
+ 1,
767
+ 95,
768
+ 111,
769
+ 255,
770
+ 84,
771
+ 166,
772
+ 79,
773
+ 200,
774
+ 43,
775
+ 179,
776
+ 227,
777
+ 30,
778
+ 143,
779
+ 135,
780
+ 2,
781
+ 170,
782
+ 152,
783
+ 123,
784
+ 191,
785
+ 223,
786
+ 143,
787
+ 66,
788
+ 161,
789
+ 128,
790
+ 64,
791
+ 160,
792
+ 42,
793
+ 200,
794
+ 186,
795
+ 64,
796
+ 221,
797
+ 183,
798
+ 67,
799
+ 17,
800
+ 244,
801
+ 44,
802
+ 212,
803
+ 14,
804
+ 79,
805
+ 56,
806
+ 85,
807
+ 30,
808
+ 225,
809
+ 104,
810
+ 92,
811
+ 175,
812
+ 96,
813
+ 13,
814
+ 78,
815
+ 150,
816
+ 183,
817
+ 250,
818
+ 92,
819
+ 205,
820
+ 108,
821
+ 133,
822
+ 231,
823
+ 169,
824
+ 222,
825
+ 84,
826
+ 170,
827
+ 21,
828
+ 216,
829
+ 103,
830
+ 155,
831
+ 231,
832
+ 104,
833
+ 189,
834
+ 85,
835
+ 28,
836
+ 159,
837
+ 95,
838
+ 255,
839
+ 244,
840
+ 150,
841
+ 17,
842
+ 201,
843
+ 106,
844
+ 135,
845
+ 114,
846
+ 236,
847
+ 157,
848
+ 156,
849
+ 199,
850
+ 214,
851
+ 99,
852
+ 238,
853
+ 235,
854
+ 77,
855
+ 158,
856
+ 37,
857
+ 204,
858
+ 231,
859
+ 115,
860
+ 230,
861
+ 154,
862
+ 139,
863
+ 190,
864
+ 195,
865
+ 151,
866
+ 98,
867
+ 54,
868
+ 51,
869
+ 153,
870
+ 140,
871
+ 33,
872
+ 213,
873
+ 235,
874
+ 245,
875
+ 34,
876
+ 20,
877
+ 10,
878
+ 85,
879
+ 99,
880
+ 93,
881
+ 124,
882
+ 81,
883
+ 244,
884
+ 41,
885
+ 121,
886
+ 210,
887
+ 192,
888
+ 82,
889
+ 169,
890
+ 132,
891
+ 131,
892
+ 7,
893
+ 15,
894
+ 34,
895
+ 24,
896
+ 12,
897
+ 26,
898
+ 2,
899
+ 115,
900
+ 57,
901
+ 173,
902
+ 37,
903
+ 46,
904
+ 234,
905
+ 129,
906
+ 186,
907
+ 147,
908
+ 39,
909
+ 194,
910
+ 4,
911
+ 173,
912
+ 121,
913
+ 34,
914
+ 78,
915
+ 218,
916
+ 214,
917
+ 209,
918
+ 209,
919
+ 129,
920
+ 65,
921
+ 131,
922
+ 6,
923
+ 153,
924
+ 120,
925
+ 173,
926
+ 127,
927
+ 46,
928
+ 234,
929
+ 131,
930
+ 62,
931
+ 213,
932
+ 60,
933
+ 145,
934
+ 167,
935
+ 181,
936
+ 111,
937
+ 215,
938
+ 174,
939
+ 93,
940
+ 24,
941
+ 49,
942
+ 98,
943
+ 132,
944
+ 209,
945
+ 60,
946
+ 23,
947
+ 245,
948
+ 195,
949
+ 151,
950
+ 66,
951
+ 222,
952
+ 135,
953
+ 31,
954
+ 126,
955
+ 136,
956
+ 81,
957
+ 163,
958
+ 70,
959
+ 245,
960
+ 106,
961
+ 165,
962
+ 139,
963
+ 250,
964
+ 160,
965
+ 238,
966
+ 228,
967
+ 169,
968
+ 58,
969
+ 153,
970
+ 204,
971
+ 218,
972
+ 251,
973
+ 237,
974
+ 219,
975
+ 183,
976
+ 99,
977
+ 244,
978
+ 232,
979
+ 209,
980
+ 134,
981
+ 76,
982
+ 155,
983
+ 230,
984
+ 226,
985
+ 139,
986
+ 163,
987
+ 207,
988
+ 200,
989
+ 147,
990
+ 150,
991
+ 105,
992
+ 189,
993
+ 19,
994
+ 246,
995
+ 236,
996
+ 217,
997
+ 131,
998
+ 161,
999
+ 67,
1000
+ 135,
1001
+ 154,
1002
+ 231,
1003
+ 58,
1004
+ 55,
1005
+ 55,
1006
+ 160,
1007
+ 81,
1008
+ 187,
1009
+ 3,
1010
+ 117,
1011
+ 209,
1012
+ 96,
1013
+ 112,
1014
+ 201,
1015
+ 107,
1016
+ 96,
1017
+ 184,
1018
+ 228,
1019
+ 53,
1020
+ 48,
1021
+ 92,
1022
+ 242,
1023
+ 26,
1024
+ 24,
1025
+ 46,
1026
+ 121,
1027
+ 13,
1028
+ 12,
1029
+ 151,
1030
+ 188,
1031
+ 6,
1032
+ 134,
1033
+ 75,
1034
+ 94,
1035
+ 3,
1036
+ 195,
1037
+ 37,
1038
+ 175,
1039
+ 129,
1040
+ 225,
1041
+ 146,
1042
+ 215,
1043
+ 192,
1044
+ 112,
1045
+ 201,
1046
+ 107,
1047
+ 96,
1048
+ 184,
1049
+ 228,
1050
+ 53,
1051
+ 48,
1052
+ 92,
1053
+ 242,
1054
+ 26,
1055
+ 24,
1056
+ 46,
1057
+ 121,
1058
+ 13,
1059
+ 12,
1060
+ 151,
1061
+ 188,
1062
+ 6,
1063
+ 134,
1064
+ 75,
1065
+ 94,
1066
+ 3,
1067
+ 163,
1068
+ 223,
1069
+ 125,
1070
+ 207,
1071
+ 83,
1072
+ 186,
1073
+ 190,
1074
+ 190,
1075
+ 247,
1076
+ 244,
1077
+ 244,
1078
+ 32,
1079
+ 30,
1080
+ 143,
1081
+ 155,
1082
+ 51,
1083
+ 47,
1084
+ 170,
1085
+ 43,
1086
+ 155,
1087
+ 205,
1088
+ 226,
1089
+ 177,
1090
+ 199,
1091
+ 30,
1092
+ 195,
1093
+ 214,
1094
+ 173,
1095
+ 91,
1096
+ 81,
1097
+ 44,
1098
+ 22,
1099
+ 77,
1100
+ 80,
1101
+ 252,
1102
+ 241,
1103
+ 31,
1104
+ 119,
1105
+ 109,
1106
+ 155,
1107
+ 39,
1108
+ 131,
1109
+ 202,
1110
+ 68,
1111
+ 34,
1112
+ 17,
1113
+ 83,
1114
+ 191,
1115
+ 14,
1116
+ 69,
1117
+ 77,
1118
+ 158,
1119
+ 60,
1120
+ 25,
1121
+ 243,
1122
+ 230,
1123
+ 205,
1124
+ 235,
1125
+ 45,
1126
+ 167,
1127
+ 179,
1128
+ 165,
1129
+ 58,
1130
+ 237,
1131
+ 22,
1132
+ 14,
1133
+ 135,
1134
+ 209,
1135
+ 217,
1136
+ 217,
1137
+ 137,
1138
+ 214,
1139
+ 214,
1140
+ 86,
1141
+ 83,
1142
+ 38,
1143
+ 159,
1144
+ 207,
1145
+ 155,
1146
+ 182,
1147
+ 244,
1148
+ 65,
1149
+ 57,
1150
+ 26,
1151
+ 141,
1152
+ 154,
1153
+ 60,
1154
+ 246,
1155
+ 120,
1156
+ 163,
1157
+ 202,
1158
+ 40,
1159
+ 77,
1160
+ 117,
1161
+ 170,
1162
+ 220,
1163
+ 169,
1164
+ 160,
1165
+ 50,
1166
+ 182,
1167
+ 30,
1168
+ 29,
1169
+ 198,
1170
+ 82,
1171
+ 93,
1172
+ 221,
1173
+ 221,
1174
+ 221,
1175
+ 72,
1176
+ 36,
1177
+ 18,
1178
+ 166,
1179
+ 15,
1180
+ 26,
1181
+ 151,
1182
+ 160,
1183
+ 113,
1184
+ 171,
1185
+ 77,
1186
+ 93,
1187
+ 21,
1188
+ 167,
1189
+ 186,
1190
+ 219,
1191
+ 218,
1192
+ 218,
1193
+ 204,
1194
+ 249,
1195
+ 87,
1196
+ 139,
1197
+ 126,
1198
+ 71,
1199
+ 158,
1200
+ 242,
1201
+ 168,
1202
+ 131,
1203
+ 246,
1204
+ 160,
1205
+ 146,
1206
+ 6,
1207
+ 169,
1208
+ 65,
1209
+ 172,
1210
+ 95,
1211
+ 191,
1212
+ 222,
1213
+ 4,
1214
+ 9,
1215
+ 77,
1216
+ 121,
1217
+ 20,
1218
+ 212,
1219
+ 142,
1220
+ 173,
1221
+ 79,
1222
+ 247,
1223
+ 138,
1224
+ 19,
1225
+ 201,
1226
+ 167,
1227
+ 130,
1228
+ 210,
1229
+ 37,
1230
+ 48,
1231
+ 9,
1232
+ 89,
1233
+ 249,
1234
+ 37,
1235
+ 184,
1236
+ 89,
1237
+ 179,
1238
+ 102,
1239
+ 97,
1240
+ 246,
1241
+ 236,
1242
+ 217,
1243
+ 38,
1244
+ 62,
1245
+ 157,
1246
+ 78,
1247
+ 155,
1248
+ 124,
1249
+ 186,
1250
+ 183,
1251
+ 7,
1252
+ 133,
1253
+ 107,
1254
+ 15,
1255
+ 12,
1256
+ 235,
1257
+ 94,
1258
+ 125,
1259
+ 18,
1260
+ 241,
1261
+ 42,
1262
+ 47,
1263
+ 168,
1264
+ 142,
1265
+ 88,
1266
+ 44,
1267
+ 102,
1268
+ 136,
1269
+ 169,
1270
+ 21,
1271
+ 238,
1272
+ 231,
1273
+ 65,
1274
+ 99,
1275
+ 209,
1276
+ 241,
1277
+ 71,
1278
+ 229,
1279
+ 85,
1280
+ 61,
1281
+ 130,
1282
+ 37,
1283
+ 74,
1284
+ 109,
1285
+ 107,
1286
+ 194,
1287
+ 234,
1288
+ 170,
1289
+ 186,
1290
+ 21,
1291
+ 175,
1292
+ 124,
1293
+ 106,
1294
+ 91,
1295
+ 227,
1296
+ 84,
1297
+ 254,
1298
+ 90,
1299
+ 249,
1300
+ 245,
1301
+ 59,
1302
+ 242,
1303
+ 212,
1304
+ 217,
1305
+ 84,
1306
+ 42,
1307
+ 101,
1308
+ 102,
1309
+ 162,
1310
+ 58,
1311
+ 43,
1312
+ 97,
1313
+ 171,
1314
+ 220,
1315
+ 138,
1316
+ 21,
1317
+ 43,
1318
+ 176,
1319
+ 119,
1320
+ 239,
1321
+ 94,
1322
+ 172,
1323
+ 92,
1324
+ 185,
1325
+ 210,
1326
+ 12,
1327
+ 94,
1328
+ 65,
1329
+ 241,
1330
+ 202,
1331
+ 99,
1332
+ 219,
1333
+ 82,
1334
+ 80,
1335
+ 249,
1336
+ 211,
1337
+ 193,
1338
+ 230,
1339
+ 223,
1340
+ 183,
1341
+ 111,
1342
+ 31,
1343
+ 150,
1344
+ 47,
1345
+ 95,
1346
+ 142,
1347
+ 246,
1348
+ 246,
1349
+ 118,
1350
+ 44,
1351
+ 89,
1352
+ 178,
1353
+ 228,
1354
+ 24,
1355
+ 65,
1356
+ 89,
1357
+ 225,
1358
+ 218,
1359
+ 62,
1360
+ 52,
1361
+ 53,
1362
+ 53,
1363
+ 25,
1364
+ 1,
1365
+ 75,
1366
+ 107,
1367
+ 53,
1368
+ 129,
1369
+ 116,
1370
+ 21,
1371
+ 105,
1372
+ 186,
1373
+ 74,
1374
+ 131,
1375
+ 84,
1376
+ 159,
1377
+ 202,
1378
+ 137,
1379
+ 212,
1380
+ 83,
1381
+ 65,
1382
+ 132,
1383
+ 72,
1384
+ 139,
1385
+ 68,
1386
+ 182,
1387
+ 234,
1388
+ 179,
1389
+ 117,
1390
+ 74,
1391
+ 187,
1392
+ 236,
1393
+ 132,
1394
+ 210,
1395
+ 189,
1396
+ 100,
1397
+ 168,
1398
+ 62,
1399
+ 232,
1400
+ 94,
1401
+ 245,
1402
+ 170,
1403
+ 156,
1404
+ 142,
1405
+ 80,
1406
+ 218,
1407
+ 83,
1408
+ 120,
1409
+ 194,
1410
+ 169,
1411
+ 109,
1412
+ 204,
1413
+ 255,
1414
+ 8,
1415
+ 26,
1416
+ 128,
1417
+ 160,
1418
+ 78,
1419
+ 235,
1420
+ 94,
1421
+ 131,
1422
+ 234,
1423
+ 234,
1424
+ 234,
1425
+ 50,
1426
+ 179,
1427
+ 82,
1428
+ 66,
1429
+ 212,
1430
+ 192,
1431
+ 53,
1432
+ 24,
1433
+ 165,
1434
+ 73,
1435
+ 216,
1436
+ 34,
1437
+ 82,
1438
+ 87,
1439
+ 13,
1440
+ 86,
1441
+ 196,
1442
+ 156,
1443
+ 42,
1444
+ 212,
1445
+ 66,
1446
+ 19,
1447
+ 74,
1448
+ 144,
1449
+ 121,
1450
+ 212,
1451
+ 100,
1452
+ 177,
1453
+ 103,
1454
+ 75,
1455
+ 149,
1456
+ 79,
1457
+ 132,
1458
+ 168,
1459
+ 13,
1460
+ 213,
1461
+ 173,
1462
+ 118,
1463
+ 85,
1464
+ 183,
1465
+ 21,
1466
+ 166,
1467
+ 37,
1468
+ 213,
1469
+ 106,
1470
+ 134,
1471
+ 210,
1472
+ 149,
1473
+ 79,
1474
+ 218,
1475
+ 122,
1476
+ 58,
1477
+ 136,
1478
+ 20,
1479
+ 65,
1480
+ 229,
1481
+ 212,
1482
+ 231,
1483
+ 230,
1484
+ 230,
1485
+ 102,
1486
+ 67,
1487
+ 160,
1488
+ 202,
1489
+ 170,
1490
+ 110,
1491
+ 171,
1492
+ 249,
1493
+ 154,
1494
+ 48,
1495
+ 186,
1496
+ 87,
1497
+ 63,
1498
+ 212,
1499
+ 150,
1500
+ 202,
1501
+ 217,
1502
+ 254,
1503
+ 90,
1504
+ 244,
1505
+ 59,
1506
+ 242,
1507
+ 36,
1508
+ 60,
1509
+ 59,
1510
+ 187,
1511
+ 37,
1512
+ 68,
1513
+ 117,
1514
+ 90,
1515
+ 131,
1516
+ 147,
1517
+ 57,
1518
+ 18,
1519
+ 89,
1520
+ 10,
1521
+ 181,
1522
+ 100,
1523
+ 88,
1524
+ 97,
1525
+ 107,
1526
+ 128,
1527
+ 26,
1528
+ 188,
1529
+ 205,
1530
+ 115,
1531
+ 178,
1532
+ 160,
1533
+ 252,
1534
+ 130,
1535
+ 213,
1536
+ 22,
1537
+ 9,
1538
+ 77,
1539
+ 101,
1540
+ 21,
1541
+ 175,
1542
+ 54,
1543
+ 116,
1544
+ 149,
1545
+ 96,
1546
+ 237,
1547
+ 228,
1548
+ 176,
1549
+ 109,
1550
+ 40,
1551
+ 77,
1552
+ 253,
1553
+ 80,
1554
+ 127,
1555
+ 148,
1556
+ 166,
1557
+ 182,
1558
+ 172,
1559
+ 192,
1560
+ 37,
1561
+ 104,
1562
+ 105,
1563
+ 147,
1564
+ 173,
1565
+ 251,
1566
+ 84,
1567
+ 80,
1568
+ 29,
1569
+ 154,
1570
+ 40,
1571
+ 202,
1572
+ 175,
1573
+ 114,
1574
+ 42,
1575
+ 111,
1576
+ 181,
1577
+ 53,
1578
+ 153,
1579
+ 76,
1580
+ 154,
1581
+ 171,
1582
+ 234,
1583
+ 87,
1584
+ 221,
1585
+ 138,
1586
+ 215,
1587
+ 68,
1588
+ 213,
1589
+ 85,
1590
+ 242,
1591
+ 56,
1592
+ 222,
1593
+ 36,
1594
+ 247,
1595
+ 59,
1596
+ 242,
1597
+ 212,
1598
+ 65,
1599
+ 9,
1600
+ 72,
1601
+ 130,
1602
+ 144,
1603
+ 240,
1604
+ 172,
1605
+ 25,
1606
+ 211,
1607
+ 189,
1608
+ 132,
1609
+ 172,
1610
+ 171,
1611
+ 77,
1612
+ 23,
1613
+ 116,
1614
+ 175,
1615
+ 56,
1616
+ 43,
1617
+ 240,
1618
+ 51,
1619
+ 129,
1620
+ 205,
1621
+ 47,
1622
+ 168,
1623
+ 140,
1624
+ 234,
1625
+ 18,
1626
+ 73,
1627
+ 210,
1628
+ 30,
1629
+ 61,
1630
+ 171,
1631
+ 77,
1632
+ 93,
1633
+ 53,
1634
+ 243,
1635
+ 237,
1636
+ 250,
1637
+ 35,
1638
+ 178,
1639
+ 165,
1640
+ 97,
1641
+ 234,
1642
+ 131,
1643
+ 44,
1644
+ 129,
1645
+ 202,
1646
+ 136,
1647
+ 8,
1648
+ 165,
1649
+ 233,
1650
+ 185,
1651
+ 165,
1652
+ 165,
1653
+ 197,
1654
+ 16,
1655
+ 114,
1656
+ 58,
1657
+ 136,
1658
+ 44,
1659
+ 219,
1660
+ 103,
1661
+ 213,
1662
+ 39,
1663
+ 168,
1664
+ 46,
1665
+ 17,
1666
+ 39,
1667
+ 147,
1668
+ 104,
1669
+ 219,
1670
+ 213,
1671
+ 210,
1672
+ 161,
1673
+ 250,
1674
+ 44,
1675
+ 97,
1676
+ 106,
1677
+ 95,
1678
+ 229,
1679
+ 106,
1680
+ 209,
1681
+ 47,
1682
+ 205,
1683
+ 166,
1684
+ 132,
1685
+ 34,
1686
+ 129,
1687
+ 88,
1688
+ 178,
1689
+ 172,
1690
+ 73,
1691
+ 84,
1692
+ 231,
1693
+ 37,
1694
+ 100,
1695
+ 65,
1696
+ 207,
1697
+ 74,
1698
+ 59,
1699
+ 91,
1700
+ 88,
1701
+ 1,
1702
+ 168,
1703
+ 172,
1704
+ 234,
1705
+ 146,
1706
+ 160,
1707
+ 36,
1708
+ 80,
1709
+ 171,
1710
+ 185,
1711
+ 54,
1712
+ 216,
1713
+ 182,
1714
+ 164,
1715
+ 37,
1716
+ 18,
1717
+ 232,
1718
+ 225,
1719
+ 195,
1720
+ 135,
1721
+ 205,
1722
+ 179,
1723
+ 250,
1724
+ 166,
1725
+ 171,
1726
+ 202,
1727
+ 171,
1728
+ 140,
1729
+ 210,
1730
+ 118,
1731
+ 239,
1732
+ 222,
1733
+ 109,
1734
+ 234,
1735
+ 148,
1736
+ 73,
1737
+ 63,
1738
+ 29,
1739
+ 84,
1740
+ 70,
1741
+ 65,
1742
+ 26,
1743
+ 165,
1744
+ 53,
1745
+ 92,
1746
+ 196,
1747
+ 105,
1748
+ 210,
1749
+ 216,
1750
+ 122,
1751
+ 165,
1752
+ 101,
1753
+ 34,
1754
+ 77,
1755
+ 196,
1756
+ 202,
1757
+ 211,
1758
+ 149,
1759
+ 198,
1760
+ 9,
1761
+ 146,
1762
+ 135,
1763
+ 218,
1764
+ 170,
1765
+ 69,
1766
+ 191,
1767
+ 35,
1768
+ 79,
1769
+ 3,
1770
+ 145,
1771
+ 240,
1772
+ 36,
1773
+ 28,
1774
+ 205,
1775
+ 54,
1776
+ 5,
1777
+ 193,
1778
+ 14,
1779
+ 78,
1780
+ 131,
1781
+ 173,
1782
+ 157,
1783
+ 129,
1784
+ 122,
1785
+ 150,
1786
+ 48,
1787
+ 116,
1788
+ 61,
1789
+ 51,
1790
+ 148,
1791
+ 57,
1792
+ 155,
1793
+ 29,
1794
+ 147,
1795
+ 169,
1796
+ 80,
1797
+ 97,
1798
+ 85,
1799
+ 161,
1800
+ 72,
1801
+ 24,
1802
+ 1,
1803
+ 10,
1804
+ 173,
1805
+ 84,
1806
+ 113,
1807
+ 72,
1808
+ 49,
1809
+ 109,
1810
+ 240,
1811
+ 63,
1812
+ 253,
1813
+ 212,
1814
+ 142,
1815
+ 58,
1816
+ 142,
1817
+ 92,
1818
+ 170,
1819
+ 27,
1820
+ 107,
1821
+ 30,
1822
+ 121,
1823
+ 24,
1824
+ 43,
1825
+ 239,
1826
+ 89,
1827
+ 129,
1828
+ 24,
1829
+ 133,
1830
+ 218,
1831
+ 149,
1832
+ 162,
1833
+ 19,
1834
+ 197,
1835
+ 252,
1836
+ 65,
1837
+ 57,
1838
+ 45,
1839
+ 93,
1840
+ 105,
1841
+ 44,
1842
+ 93,
1843
+ 186,
1844
+ 28,
1845
+ 79,
1846
+ 61,
1847
+ 179,
1848
+ 22,
1849
+ 135,
1850
+ 59,
1851
+ 15,
1852
+ 193,
1853
+ 87,
1854
+ 166,
1855
+ 86,
1856
+ 51,
1857
+ 168,
1858
+ 157,
1859
+ 138,
1860
+ 71,
1861
+ 63,
1862
+ 209,
1863
+ 146,
1864
+ 87,
1865
+ 232,
1866
+ 136,
1867
+ 89,
1868
+ 63,
1869
+ 219,
1870
+ 138,
1871
+ 115,
1872
+ 50,
1873
+ 164,
1874
+ 82,
1875
+ 25,
1876
+ 116,
1877
+ 31,
1878
+ 62,
1879
+ 132,
1880
+ 27,
1881
+ 126,
1882
+ 244,
1883
+ 125,
1884
+ 252,
1885
+ 245,
1886
+ 137,
1887
+ 39,
1888
+ 145,
1889
+ 47,
1890
+ 151,
1891
+ 48,
1892
+ 168,
1893
+ 57,
1894
+ 138,
1895
+ 157,
1896
+ 59,
1897
+ 182,
1898
+ 99,
1899
+ 204,
1900
+ 133,
1901
+ 23,
1902
+ 227,
1903
+ 242,
1904
+ 89,
1905
+ 115,
1906
+ 177,
1907
+ 225,
1908
+ 31,
1909
+ 47,
1910
+ 171,
1911
+ 0,
1912
+ 11,
1913
+ 115,
1914
+ 210,
1915
+ 178,
1916
+ 79,
1917
+ 168,
1918
+ 20,
1919
+ 144,
1920
+ 73,
1921
+ 119,
1922
+ 155,
1923
+ 122,
1924
+ 28,
1925
+ 218,
1926
+ 216,
1927
+ 127,
1928
+ 231,
1929
+ 161,
1930
+ 255,
1931
+ 64,
1932
+ 196,
1933
+ 217,
1934
+ 153,
1935
+ 40,
1936
+ 187,
1937
+ 47,
1938
+ 13,
1939
+ 19,
1940
+ 57,
1941
+ 138,
1942
+ 19,
1943
+ 105,
1944
+ 214,
1945
+ 220,
1946
+ 89,
1947
+ 216,
1948
+ 184,
1949
+ 90,
1950
+ 66,
1951
+ 79,
1952
+ 14,
1953
+ 105,
1954
+ 109,
1955
+ 25,
1956
+ 62,
1957
+ 191,
1958
+ 242,
1959
+ 114,
1960
+ 157,
1961
+ 36,
1962
+ 89,
1963
+ 21,
1964
+ 105,
1965
+ 24,
1966
+ 197,
1967
+ 144,
1968
+ 45,
1969
+ 80,
1970
+ 219,
1971
+ 124,
1972
+ 52,
1973
+ 209,
1974
+ 188,
1975
+ 87,
1976
+ 123,
1977
+ 74,
1978
+ 247,
1979
+ 202,
1980
+ 100,
1981
+ 21,
1982
+ 179,
1983
+ 8,
1984
+ 121,
1985
+ 43,
1986
+ 248,
1987
+ 206,
1988
+ 149,
1989
+ 51,
1990
+ 241,
1991
+ 192,
1992
+ 31,
1993
+ 239,
1994
+ 199,
1995
+ 174,
1996
+ 189,
1997
+ 135,
1998
+ 224,
1999
+ 97,
2000
+ 191,
2001
+ 52,
2002
+ 165,
2003
+ 58,
2004
+ 179,
2005
+ 92,
2006
+ 239,
2007
+ 50,
2008
+ 21,
2009
+ 108,
2010
+ 126,
2011
+ 227,
2012
+ 29,
2013
+ 76,
2014
+ 184,
2015
+ 116,
2016
+ 2,
2017
+ 34,
2018
+ 9,
2019
+ 110,
2020
+ 31,
2021
+ 216,
2022
+ 151,
2023
+ 98,
2024
+ 58,
2025
+ 79,
2026
+ 211,
2027
+ 80,
2028
+ 36,
2029
+ 41,
2030
+ 25,
2031
+ 248,
2032
+ 61,
2033
+ 212,
2034
+ 150,
2035
+ 18,
2036
+ 219,
2037
+ 35,
2038
+ 9,
2039
+ 185,
2040
+ 34,
2041
+ 61,
2042
+ 99,
2043
+ 18,
2044
+ 226,
2045
+ 173,
2046
+ 4,
2047
+ 225,
2048
+ 39,
2049
+ 25,
2050
+ 207,
2051
+ 191,
2052
+ 176,
2053
+ 14,
2054
+ 115,
2055
+ 191,
2056
+ 247,
2057
+ 93,
2058
+ 164,
2059
+ 203,
2060
+ 108,
2061
+ 199,
2062
+ 147,
2063
+ 198,
2064
+ 138,
2065
+ 101,
2066
+ 191,
2067
+ 193,
2068
+ 210,
2069
+ 223,
2070
+ 223,
2071
+ 143,
2072
+ 151,
2073
+ 223,
2074
+ 120,
2075
+ 19,
2076
+ 151,
2077
+ 125,
2078
+ 125,
2079
+ 34,
2080
+ 103,
2081
+ 108,
2082
+ 129,
2083
+ 19,
2084
+ 43,
2085
+ 134,
2086
+ 100,
2087
+ 182,
2088
+ 128,
2089
+ 112,
2090
+ 68,
2091
+ 147,
2092
+ 34,
2093
+ 205,
2094
+ 9,
2095
+ 92,
2096
+ 132,
2097
+ 63,
2098
+ 192,
2099
+ 45,
2100
+ 73,
2101
+ 81,
2102
+ 189,
2103
+ 30,
2104
+ 128,
2105
+ 224,
2106
+ 254,
2107
+ 168,
2108
+ 122,
2109
+ 39,
2110
+ 50,
2111
+ 29,
2112
+ 237,
2113
+ 19,
2114
+ 105,
2115
+ 230,
2116
+ 158,
2117
+ 105,
2118
+ 70,
2119
+ 139,
2120
+ 249,
2121
+ 191,
2122
+ 79,
2123
+ 19,
2124
+ 66,
2125
+ 191,
2126
+ 128,
2127
+ 37,
2128
+ 121,
2129
+ 173,
2130
+ 77,
2131
+ 49,
2132
+ 92,
2133
+ 120,
2134
+ 254,
2135
+ 88,
2136
+ 188,
2137
+ 185,
2138
+ 121,
2139
+ 11,
2140
+ 242,
2141
+ 228,
2142
+ 150,
2143
+ 244,
2144
+ 192,
2145
+ 227,
2146
+ 247,
2147
+ 225,
2148
+ 241,
2149
+ 39,
2150
+ 158,
2151
+ 198,
2152
+ 196,
2153
+ 111,
2154
+ 77,
2155
+ 198,
2156
+ 176,
2157
+ 33,
2158
+ 109,
2159
+ 40,
2160
+ 147,
2161
+ 232,
2162
+ 124,
2163
+ 119,
2164
+ 22,
2165
+ 193,
2166
+ 120,
2167
+ 4,
2168
+ 94,
2169
+ 15,
2170
+ 77,
2171
+ 99,
2172
+ 48,
2173
+ 192,
2174
+ 73,
2175
+ 72,
2176
+ 97,
2177
+ 251,
2178
+ 181,
2179
+ 78,
2180
+ 123,
2181
+ 233,
2182
+ 136,
2183
+ 5,
2184
+ 185,
2185
+ 189,
2186
+ 40,
2187
+ 81,
2188
+ 251,
2189
+ 130,
2190
+ 136,
2191
+ 182,
2192
+ 36,
2193
+ 240,
2194
+ 217,
2195
+ 254,
2196
+ 79,
2197
+ 144,
2198
+ 229,
2199
+ 100,
2200
+ 245,
2201
+ 249,
2202
+ 195,
2203
+ 232,
2204
+ 62,
2205
+ 208,
2206
+ 129,
2207
+ 131,
2208
+ 251,
2209
+ 58,
2210
+ 48,
2211
+ 98,
2212
+ 212,
2213
+ 24,
2214
+ 244,
2215
+ 112,
2216
+ 171,
2217
+ 26,
2218
+ 136,
2219
+ 134,
2220
+ 76,
2221
+ 219,
2222
+ 250,
2223
+ 193,
2224
+ 45,
2225
+ 167,
2226
+ 27,
2227
+ 91,
2228
+ 211,
2229
+ 118,
2230
+ 129,
2231
+ 125,
2232
+ 44,
2233
+ 123,
2234
+ 208,
2235
+ 217,
2236
+ 157,
2237
+ 33,
2238
+ 169,
2239
+ 129,
2240
+ 129,
2241
+ 73,
2242
+ 222,
2243
+ 241,
2244
+ 48,
2245
+ 166,
2246
+ 173,
2247
+ 122,
2248
+ 47,
2249
+ 24,
2250
+ 242,
2251
+ 140,
2252
+ 178,
2253
+ 80,
2254
+ 60,
2255
+ 230,
2256
+ 222,
2257
+ 131,
2258
+ 22,
2259
+ 58,
2260
+ 19,
2261
+ 83,
2262
+ 166,
2263
+ 78,
2264
+ 195,
2265
+ 163,
2266
+ 127,
2267
+ 249,
2268
+ 179,
2269
+ 225,
2270
+ 92,
2271
+ 191,
2272
+ 50,
2273
+ 12,
2274
+ 249,
2275
+ 60,
2276
+ 216,
2277
+ 240,
2278
+ 218,
2279
+ 70,
2280
+ 92,
2281
+ 117,
2282
+ 245,
2283
+ 92,
2284
+ 154,
2285
+ 180,
2286
+ 78,
2287
+ 138,
2288
+ 184,
2289
+ 136,
2290
+ 153,
2291
+ 87,
2292
+ 207,
2293
+ 195,
2294
+ 152,
2295
+ 209,
2296
+ 227,
2297
+ 25,
2298
+ 190,
2299
+ 134,
2300
+ 123,
2301
+ 239,
2302
+ 189,
2303
+ 27,
2304
+ 1,
2305
+ 10,
2306
+ 153,
2307
+ 10,
2308
+ 138,
2309
+ 7,
2310
+ 87,
2311
+ 175,
2312
+ 198,
2313
+ 130,
2314
+ 133,
2315
+ 11,
2316
+ 177,
2317
+ 228,
2318
+ 87,
2319
+ 183,
2320
+ 98,
2321
+ 228,
2322
+ 200,
2323
+ 175,
2324
+ 226,
2325
+ 173,
2326
+ 13,
2327
+ 27,
2328
+ 176,
2329
+ 244,
2330
+ 183,
2331
+ 75,
2332
+ 241,
2333
+ 204,
2334
+ 218,
2335
+ 103,
2336
+ 176,
2337
+ 103,
2338
+ 111,
2339
+ 7,
2340
+ 174,
2341
+ 153,
2342
+ 59,
2343
+ 31,
2344
+ 91,
2345
+ 183,
2346
+ 190,
2347
+ 135,
2348
+ 89,
2349
+ 179,
2350
+ 102,
2351
+ 224,
2352
+ 250,
2353
+ 235,
2354
+ 127,
2355
+ 130,
2356
+ 155,
2357
+ 127,
2358
+ 124,
2359
+ 3,
2360
+ 158,
2361
+ 92,
2362
+ 243,
2363
+ 40,
2364
+ 215,
2365
+ 123,
2366
+ 173,
2367
+ 119,
2368
+ 94,
2369
+ 28,
2370
+ 248,
2371
+ 228,
2372
+ 0,
2373
+ 126,
2374
+ 121,
2375
+ 235,
2376
+ 18,
2377
+ 172,
2378
+ 90,
2379
+ 181,
2380
+ 154,
2381
+ 207,
2382
+ 17,
2383
+ 106,
2384
+ 125,
2385
+ 114,
2386
+ 0,
2387
+ 146,
2388
+ 39,
2389
+ 46,
2390
+ 164,
2391
+ 106,
2392
+ 132,
2393
+ 72,
2394
+ 163,
2395
+ 82,
2396
+ 29,
2397
+ 131,
2398
+ 94,
2399
+ 243,
2400
+ 43,
2401
+ 210,
2402
+ 12,
2403
+ 121,
2404
+ 100,
2405
+ 74,
2406
+ 121,
2407
+ 18,
2408
+ 77,
2409
+ 152,
2410
+ 52,
2411
+ 101,
2412
+ 178,
2413
+ 249,
2414
+ 221,
2415
+ 69,
2416
+ 62,
2417
+ 157,
2418
+ 65,
2419
+ 62,
2420
+ 151,
2421
+ 196,
2422
+ 166,
2423
+ 87,
2424
+ 214,
2425
+ 99,
2426
+ 203,
2427
+ 191,
2428
+ 182,
2429
+ 226,
2430
+ 210,
2431
+ 203,
2432
+ 38,
2433
+ 209,
2434
+ 186,
2435
+ 166,
2436
+ 112,
2437
+ 237,
2438
+ 85,
2439
+ 87,
2440
+ 98,
2441
+ 241,
2442
+ 109,
2443
+ 191,
2444
+ 198,
2445
+ 187,
2446
+ 239,
2447
+ 111,
2448
+ 197,
2449
+ 230,
2450
+ 215,
2451
+ 55,
2452
+ 225,
2453
+ 239,
2454
+ 79,
2455
+ 175,
2456
+ 197,
2457
+ 246,
2458
+ 29,
2459
+ 29,
2460
+ 52,
2461
+ 123,
2462
+ 244,
2463
+ 106,
2464
+ 3,
2465
+ 65,
2466
+ 172,
2467
+ 127,
2468
+ 233,
2469
+ 69,
2470
+ 44,
2471
+ 92,
2472
+ 112,
2473
+ 35,
2474
+ 118,
2475
+ 237,
2476
+ 254,
2477
+ 55,
2478
+ 190,
2479
+ 57,
2480
+ 241,
2481
+ 82,
2482
+ 99,
2483
+ 158,
2484
+ 163,
2485
+ 225,
2486
+ 4,
2487
+ 206,
2488
+ 25,
2489
+ 60,
2490
+ 28,
2491
+ 47,
2492
+ 189,
2493
+ 248,
2494
+ 42,
2495
+ 198,
2496
+ 158,
2497
+ 63,
2498
+ 14,
2499
+ 47,
2500
+ 60,
2501
+ 255,
2502
+ 28,
2503
+ 158,
2504
+ 250,
2505
+ 219,
2506
+ 3,
2507
+ 152,
2508
+ 58,
2509
+ 125,
2510
+ 18,
2511
+ 214,
2512
+ 191,
2513
+ 242,
2514
+ 18,
2515
+ 104,
2516
+ 105,
2517
+ 65,
2518
+ 229,
2519
+ 69,
2520
+ 142,
2521
+ 150,
2522
+ 245,
2523
+ 229,
2524
+ 87,
2525
+ 223,
2526
+ 194,
2527
+ 156,
2528
+ 217,
2529
+ 87,
2530
+ 211,
2531
+ 169,
2532
+ 113,
2533
+ 186,
2534
+ 52,
2535
+ 112,
2536
+ 53,
2537
+ 143,
2538
+ 163,
2539
+ 23,
2540
+ 77,
2541
+ 10,
2542
+ 181,
2543
+ 4,
2544
+ 138,
2545
+ 60,
2546
+ 57,
2547
+ 45,
2548
+ 101,
2549
+ 179,
2550
+ 30,
2551
+ 82,
2552
+ 201,
2553
+ 148,
2554
+ 38,
2555
+ 2,
2556
+ 121,
2557
+ 63,
2558
+ 246,
2559
+ 130,
2560
+ 113,
2561
+ 124,
2562
+ 40,
2563
+ 99,
2564
+ 203,
2565
+ 219,
2566
+ 155,
2567
+ 185,
2568
+ 174,
2569
+ 117,
2570
+ 227,
2571
+ 205,
2572
+ 141,
2573
+ 175,
2574
+ 96,
2575
+ 193,
2576
+ 205,
2577
+ 63,
2578
+ 229,
2579
+ 122,
2580
+ 153,
2581
+ 199,
2582
+ 190,
2583
+ 221,
2584
+ 31,
2585
+ 35,
2586
+ 66,
2587
+ 53,
2588
+ 153,
2589
+ 60,
2590
+ 109,
2591
+ 26,
2592
+ 188,
2593
+ 97,
2594
+ 160,
2595
+ 181,
2596
+ 173,
2597
+ 29,
2598
+ 55,
2599
+ 223,
2600
+ 180,
2601
+ 0,
2602
+ 15,
2603
+ 62,
2604
+ 180,
2605
+ 154,
2606
+ 107,
2607
+ 33,
2608
+ 48,
2609
+ 100,
2610
+ 200,
2611
+ 57,
2612
+ 184,
2613
+ 228,
2614
+ 27,
2615
+ 19,
2616
+ 48,
2617
+ 118,
2618
+ 204,
2619
+ 72,
2620
+ 154,
2621
+ 203,
2622
+ 61,
2623
+ 82,
2624
+ 39,
2625
+ 154,
2626
+ 208,
2627
+ 36,
2628
+ 82,
2629
+ 12,
2630
+ 177,
2631
+ 144,
2632
+ 7,
2633
+ 93,
2634
+ 93,
2635
+ 73,
2636
+ 106,
2637
+ 89,
2638
+ 4,
2639
+ 93,
2640
+ 71,
2641
+ 62,
2642
+ 53,
2643
+ 164,
2644
+ 204,
2645
+ 156,
2646
+ 53,
2647
+ 29,
2648
+ 239,
2649
+ 189,
2650
+ 255,
2651
+ 46,
2652
+ 54,
2653
+ 111,
2654
+ 121,
2655
+ 155,
2656
+ 222,
2657
+ 103,
2658
+ 22,
2659
+ 27,
2660
+ 55,
2661
+ 110,
2662
+ 193,
2663
+ 148,
2664
+ 41,
2665
+ 87,
2666
+ 224,
2667
+ 188,
2668
+ 81,
2669
+ 195,
2670
+ 233,
2671
+ 196,
2672
+ 1,
2673
+ 241,
2674
+ 112,
2675
+ 108,
2676
+ 32,
2677
+ 146,
2678
+ 87,
2679
+ 29,
2680
+ 178,
2681
+ 200,
2682
+ 179,
2683
+ 65,
2684
+ 177,
2685
+ 53,
2686
+ 4,
2687
+ 114,
2688
+ 193,
2689
+ 34,
2690
+ 105,
2691
+ 92,
2692
+ 251,
2693
+ 184,
2694
+ 78,
2695
+ 145,
2696
+ 54,
2697
+ 102,
2698
+ 80,
2699
+ 25,
2700
+ 15,
2701
+ 6,
2702
+ 181,
2703
+ 183,
2704
+ 225,
2705
+ 182,
2706
+ 37,
2707
+ 139,
2708
+ 240,
2709
+ 240,
2710
+ 67,
2711
+ 15,
2712
+ 32,
2713
+ 26,
2714
+ 10,
2715
+ 226,
2716
+ 233,
2717
+ 167,
2718
+ 214,
2719
+ 98,
2720
+ 220,
2721
+ 5,
2722
+ 99,
2723
+ 48,
2724
+ 226,
2725
+ 220,
2726
+ 102,
2727
+ 28,
2728
+ 220,
2729
+ 127,
2730
+ 0,
2731
+ 219,
2732
+ 62,
2733
+ 248,
2734
+ 128,
2735
+ 218,
2736
+ 57,
2737
+ 5,
2738
+ 35,
2739
+ 70,
2740
+ 78,
2741
+ 192,
2742
+ 249,
2743
+ 163,
2744
+ 199,
2745
+ 98,
2746
+ 241,
2747
+ 226,
2748
+ 197,
2749
+ 232,
2750
+ 73,
2751
+ 165,
2752
+ 209,
2753
+ 195,
2754
+ 189,
2755
+ 247,
2756
+ 158,
2757
+ 142,
2758
+ 14,
2759
+ 227,
2760
+ 250,
2761
+ 39,
2762
+ 18,
2763
+ 97,
2764
+ 180,
2765
+ 15,
2766
+ 107,
2767
+ 231,
2768
+ 134,
2769
+ 54,
2770
+ 139,
2771
+ 8,
2772
+ 9,
2773
+ 8,
2774
+ 144,
2775
+ 233,
2776
+ 30,
2777
+ 58,
2778
+ 145,
2779
+ 173,
2780
+ 195,
2781
+ 207,
2782
+ 67,
2783
+ 231,
2784
+ 145,
2785
+ 110,
2786
+ 198,
2787
+ 57,
2788
+ 239,
2789
+ 80,
2790
+ 135,
2791
+ 140,
2792
+ 24,
2793
+ 134,
2794
+ 25,
2795
+ 51,
2796
+ 167,
2797
+ 227,
2798
+ 217,
2799
+ 103,
2800
+ 159,
2801
+ 197,
2802
+ 160,
2803
+ 214,
2804
+ 176,
2805
+ 89,
2806
+ 91,
2807
+ 127,
2808
+ 240,
2809
+ 195,
2810
+ 27,
2811
+ 233,
2812
+ 208,
2813
+ 105,
2814
+ 111,
2815
+ 10,
2816
+ 244,
2817
+ 116,
2818
+ 117,
2819
+ 14,
2820
+ 76,
2821
+ 179,
2822
+ 249,
2823
+ 249,
2824
+ 160,
2825
+ 247,
2826
+ 38,
2827
+ 109,
2828
+ 35,
2829
+ 105,
2830
+ 210,
2831
+ 188,
2832
+ 94,
2833
+ 248,
2834
+ 233,
2835
+ 129,
2836
+ 250,
2837
+ 252,
2838
+ 40,
2839
+ 209,
2840
+ 243,
2841
+ 244,
2842
+ 82,
2843
+ 106,
2844
+ 211,
2845
+ 105,
2846
+ 58,
2847
+ 119,
2848
+ 239,
2849
+ 216,
2850
+ 129,
2851
+ 117,
2852
+ 235,
2853
+ 214,
2854
+ 97,
2855
+ 48,
2856
+ 181,
2857
+ 235,
2858
+ 219,
2859
+ 147,
2860
+ 46,
2861
+ 54,
2862
+ 214,
2863
+ 53,
2864
+ 95,
2865
+ 40,
2866
+ 99,
2867
+ 206,
2868
+ 149,
2869
+ 115,
2870
+ 177,
2871
+ 241,
2872
+ 181,
2873
+ 13,
2874
+ 216,
2875
+ 187,
2876
+ 123,
2877
+ 11,
2878
+ 182,
2879
+ 125,
2880
+ 244,
2881
+ 17,
2882
+ 118,
2883
+ 238,
2884
+ 222,
2885
+ 135,
2886
+ 123,
2887
+ 86,
2888
+ 46,
2889
+ 227,
2890
+ 6,
2891
+ 222,
2892
+ 121,
2893
+ 249,
2894
+ 160,
2895
+ 109,
2896
+ 79,
2897
+ 79,
2898
+ 234,
2899
+ 8,
2900
+ 178,
2901
+ 169,
2902
+ 46,
2903
+ 70,
2904
+ 112,
2905
+ 207,
2906
+ 152,
2907
+ 163,
2908
+ 23,
2909
+ 205,
2910
+ 186,
2911
+ 233,
2912
+ 11,
2913
+ 161,
2914
+ 76,
2915
+ 15,
2916
+ 53,
2917
+ 18,
2918
+ 137,
2919
+ 34,
2920
+ 17,
2921
+ 11,
2922
+ 161,
2923
+ 155,
2924
+ 251,
2925
+ 188,
2926
+ 100,
2927
+ 247,
2928
+ 17,
2929
+ 76,
2930
+ 159,
2931
+ 121,
2932
+ 57,
2933
+ 94,
2934
+ 167,
2935
+ 249,
2936
+ 253,
2937
+ 231,
2938
+ 150,
2939
+ 237,
2940
+ 40,
2941
+ 208,
2942
+ 124,
2943
+ 94,
2944
+ 112,
2945
+ 209,
2946
+ 197,
2947
+ 200,
2948
+ 208,
2949
+ 142,
2950
+ 42,
2951
+ 125,
2952
+ 112,
2953
+ 83,
2954
+ 235,
2955
+ 0,
2956
+ 35,
2957
+ 207,
2958
+ 254,
2959
+ 89,
2960
+ 140,
2961
+ 94,
2962
+ 232,
2963
+ 185,
2964
+ 186,
2965
+ 23,
2966
+ 115,
2967
+ 34,
2968
+ 28,
2969
+ 103,
2970
+ 197,
2971
+ 94,
2972
+ 233,
2973
+ 222,
2974
+ 123,
2975
+ 189,
2976
+ 220,
2977
+ 134,
2978
+ 112,
2979
+ 11,
2980
+ 33,
2981
+ 215,
2982
+ 92,
2983
+ 113,
2984
+ 225,
2985
+ 144,
2986
+ 31,
2987
+ 23,
2988
+ 141,
2989
+ 27,
2990
+ 131,
2991
+ 219,
2992
+ 111,
2993
+ 191,
2994
+ 3,
2995
+ 227,
2996
+ 199,
2997
+ 143,
2998
+ 71,
2999
+ 144,
3000
+ 142,
3001
+ 96,
3002
+ 62,
3003
+ 93,
3004
+ 196,
3005
+ 180,
3006
+ 25,
3007
+ 115,
3008
+ 240,
3009
+ 206,
3010
+ 187,
3011
+ 31,
3012
+ 224,
3013
+ 53,
3014
+ 174,
3015
+ 131,
3016
+ 93,
3017
+ 157,
3018
+ 122,
3019
+ 43,
3020
+ 194,
3021
+ 253,
3022
+ 106,
3023
+ 69,
3024
+ 175,
3025
+ 209,
3026
+ 128,
3027
+ 116,
3028
+ 26,
3029
+ 104,
3030
+ 31,
3031
+ 50,
3032
+ 148,
3033
+ 10,
3034
+ 236,
3035
+ 231,
3036
+ 122,
3037
+ 21,
3038
+ 64,
3039
+ 56,
3040
+ 22,
3041
+ 101,
3042
+ 90,
3043
+ 217,
3044
+ 188,
3045
+ 124,
3046
+ 136,
3047
+ 132,
3048
+ 194,
3049
+ 200,
3050
+ 113,
3051
+ 31,
3052
+ 158,
3053
+ 229,
3054
+ 162,
3055
+ 38,
3056
+ 7,
3057
+ 169,
3058
+ 144,
3059
+ 77,
3060
+ 35,
3061
+ 17,
3062
+ 15,
3063
+ 32,
3064
+ 222,
3065
+ 148,
3066
+ 192,
3067
+ 132,
3068
+ 75,
3069
+ 46,
3070
+ 97,
3071
+ 185,
3072
+ 54,
3073
+ 220,
3074
+ 121,
3075
+ 231,
3076
+ 114,
3077
+ 58,
3078
+ 69,
3079
+ 243,
3080
+ 16,
3081
+ 142,
3082
+ 114,
3083
+ 25,
3084
+ 14,
3085
+ 251,
3086
+ 208,
3087
+ 74,
3088
+ 79,
3089
+ 181,
3090
+ 152,
3091
+ 45,
3092
+ 245,
3093
+ 63,
3094
+ 242,
3095
+ 244,
3096
+ 22,
3097
+ 65,
3098
+ 51,
3099
+ 84,
3100
+ 111,
3101
+ 26,
3102
+ 244,
3103
+ 246,
3104
+ 67,
3105
+ 139,
3106
+ 186,
3107
+ 246,
3108
+ 113,
3109
+ 138,
3110
+ 147,
3111
+ 240,
3112
+ 156,
3113
+ 61,
3114
+ 216,
3115
+ 81,
3116
+ 216,
3117
+ 56,
3118
+ 43,
3119
+ 244,
3120
+ 211,
3121
+ 130,
3122
+ 44,
3123
+ 85,
3124
+ 138,
3125
+ 202,
3126
+ 203,
3127
+ 161,
3128
+ 87,
3129
+ 55,
3130
+ 228,
3131
+ 34,
3132
+ 48,
3133
+ 24,
3134
+ 244,
3135
+ 163,
3136
+ 204,
3137
+ 122,
3138
+ 60,
3139
+ 85,
3140
+ 251,
3141
+ 105,
3142
+ 182,
3143
+ 15,
3144
+ 12,
3145
+ 218,
3146
+ 11,
3147
+ 22,
3148
+ 74,
3149
+ 116,
3150
+ 247,
3151
+ 131,
3152
+ 206,
3153
+ 27,
3154
+ 159,
3155
+ 88,
3156
+ 52,
3157
+ 136,
3158
+ 43,
3159
+ 102,
3160
+ 76,
3161
+ 167,
3162
+ 66,
3163
+ 134,
3164
+ 113,
3165
+ 237,
3166
+ 252,
3167
+ 249,
3168
+ 244,
3169
+ 48,
3170
+ 203,
3171
+ 52,
3172
+ 117,
3173
+ 62,
3174
+ 106,
3175
+ 132,
3176
+ 23,
3177
+ 143,
3178
+ 172,
3179
+ 121,
3180
+ 18,
3181
+ 203,
3182
+ 110,
3183
+ 191,
3184
+ 13,
3185
+ 151,
3186
+ 79,
3187
+ 157,
3188
+ 136,
3189
+ 120,
3190
+ 75,
3191
+ 59,
3192
+ 166,
3193
+ 95,
3194
+ 49,
3195
+ 7,
3196
+ 111,
3197
+ 109,
3198
+ 218,
3199
+ 132,
3200
+ 128,
3201
+ 234,
3202
+ 97,
3203
+ 217,
3204
+ 116,
3205
+ 46,
3206
+ 207,
3207
+ 171,
3208
+ 49,
3209
+ 196,
3210
+ 200,
3211
+ 113,
3212
+ 15,
3213
+ 87,
3214
+ 97,
3215
+ 3,
3216
+ 62,
3217
+ 206,
3218
+ 28,
3219
+ 110,
3220
+ 219,
3221
+ 104,
3222
+ 166,
3223
+ 61,
3224
+ 224,
3225
+ 252,
3226
+ 224,
3227
+ 77,
3228
+ 17,
3229
+ 97,
3230
+ 238,
3231
+ 13,
3232
+ 75,
3233
+ 188,
3234
+ 134,
3235
+ 66,
3236
+ 81,
3237
+ 76,
3238
+ 157,
3239
+ 50,
3240
+ 9,
3241
+ 219,
3242
+ 182,
3243
+ 109,
3244
+ 195,
3245
+ 117,
3246
+ 215,
3247
+ 205,
3248
+ 71,
3249
+ 50,
3250
+ 165,
3251
+ 137,
3252
+ 224,
3253
+ 188,
3254
+ 113,
3255
+ 241,
3256
+ 107,
3257
+ 111,
3258
+ 203,
3259
+ 206,
3260
+ 159,
3261
+ 225,
3262
+ 168,
3263
+ 207,
3264
+ 12,
3265
+ 170,
3266
+ 78,
3267
+ 139,
3268
+ 190,
3269
+ 125,
3270
+ 133,
3271
+ 36,
3272
+ 156,
3273
+ 205,
3274
+ 39,
3275
+ 33,
3276
+ 13,
3277
+ 82,
3278
+ 229,
3279
+ 53,
3280
+ 43,
3281
+ 101,
3282
+ 106,
3283
+ 68,
3284
+ 162,
3285
+ 234,
3286
+ 90,
3287
+ 180,
3288
+ 104,
3289
+ 145,
3290
+ 41,
3291
+ 123,
3292
+ 223,
3293
+ 125,
3294
+ 247,
3295
+ 153,
3296
+ 244,
3297
+ 94,
3298
+ 175,
3299
+ 240,
3300
+ 108,
3301
+ 96,
3302
+ 154,
3303
+ 118,
3304
+ 132,
3305
+ 167,
3306
+ 139,
3307
+ 30,
3308
+ 111,
3309
+ 185,
3310
+ 229,
3311
+ 22,
3312
+ 243,
3313
+ 130,
3314
+ 248,
3315
+ 15,
3316
+ 247,
3317
+ 255,
3318
+ 209,
3319
+ 137,
3320
+ 239,
3321
+ 93,
3322
+ 252,
3323
+ 156,
3324
+ 124,
3325
+ 210,
3326
+ 74,
3327
+ 253,
3328
+ 81,
3329
+ 27,
3330
+ 123,
3331
+ 239,
3332
+ 167,
3333
+ 38,
3334
+ 114,
3335
+ 99,
3336
+ 134,
3337
+ 189,
3338
+ 159,
3339
+ 236,
3340
+ 195,
3341
+ 87,
3342
+ 134,
3343
+ 15,
3344
+ 67,
3345
+ 142,
3346
+ 107,
3347
+ 143,
3348
+ 159,
3349
+ 166,
3350
+ 181,
3351
+ 72,
3352
+ 247,
3353
+ 93,
3354
+ 125,
3355
+ 207,
3356
+ 28,
3357
+ 58,
3358
+ 140,
3359
+ 54,
3360
+ 142,
3361
+ 53,
3362
+ 203,
3363
+ 177,
3364
+ 118,
3365
+ 39,
3366
+ 211,
3367
+ 24,
3368
+ 28,
3369
+ 119,
3370
+ 190,
3371
+ 52,
3372
+ 116,
3373
+ 101,
3374
+ 104,
3375
+ 34,
3376
+ 185,
3377
+ 209,
3378
+ 14,
3379
+ 86,
3380
+ 82,
3381
+ 240,
3382
+ 208,
3383
+ 193,
3384
+ 241,
3385
+ 114,
3386
+ 111,
3387
+ 151,
3388
+ 77,
3389
+ 82,
3390
+ 235,
3391
+ 3,
3392
+ 113,
3393
+ 238,
3394
+ 5,
3395
+ 203,
3396
+ 72,
3397
+ 68,
3398
+ 41,
3399
+ 43,
3400
+ 95,
3401
+ 25,
3402
+ 153,
3403
+ 114,
3404
+ 158,
3405
+ 158,
3406
+ 101,
3407
+ 6,
3408
+ 137,
3409
+ 8,
3410
+ 101,
3411
+ 193,
3412
+ 73,
3413
+ 182,
3414
+ 230,
3415
+ 241,
3416
+ 231,
3417
+ 240,
3418
+ 226,
3419
+ 250,
3420
+ 55,
3421
+ 176,
3422
+ 236,
3423
+ 142,
3424
+ 187,
3425
+ 232,
3426
+ 149,
3427
+ 134,
3428
+ 181,
3429
+ 205,
3430
+ 67,
3431
+ 129,
3432
+ 147,
3433
+ 32,
3434
+ 70,
3435
+ 239,
3436
+ 181,
3437
+ 223,
3438
+ 105,
3439
+ 158,
3440
+ 32,
3441
+ 194,
3442
+ 36,
3443
+ 80,
3444
+ 105,
3445
+ 156,
3446
+ 136,
3447
+ 19,
3448
+ 137,
3449
+ 86,
3450
+ 187,
3451
+ 236,
3452
+ 132,
3453
+ 208,
3454
+ 179,
3455
+ 210,
3456
+ 206,
3457
+ 10,
3458
+ 226,
3459
+ 91,
3460
+ 234,
3461
+ 196,
3462
+ 97,
3463
+ 151,
3464
+ 88,
3465
+ 86,
3466
+ 175,
3467
+ 157,
3468
+ 204,
3469
+ 91,
3470
+ 156,
3471
+ 128,
3472
+ 62,
3473
+ 237,
3474
+ 232,
3475
+ 107,
3476
+ 1,
3477
+ 55,
3478
+ 211,
3479
+ 36,
3480
+ 200,
3481
+ 9,
3482
+ 186,
3483
+ 87,
3484
+ 91,
3485
+ 12,
3486
+ 186,
3487
+ 86,
3488
+ 77,
3489
+ 110,
3490
+ 65,
3491
+ 175,
3492
+ 233,
3493
+ 216,
3494
+ 246,
3495
+ 176,
3496
+ 225,
3497
+ 231,
3498
+ 82,
3499
+ 200,
3500
+ 210,
3501
+ 142,
3502
+ 0,
3503
+ 124,
3504
+ 145,
3505
+ 176,
3506
+ 89,
3507
+ 23,
3508
+ 225,
3509
+ 15,
3510
+ 145,
3511
+ 56,
3512
+ 58,
3513
+ 35,
3514
+ 208,
3515
+ 251,
3516
+ 75,
3517
+ 142,
3518
+ 35,
3519
+ 20,
3520
+ 97,
3521
+ 222,
3522
+ 10,
3523
+ 242,
3524
+ 153,
3525
+ 44,
3526
+ 107,
3527
+ 161,
3528
+ 153,
3529
+ 52,
3530
+ 106,
3531
+ 239,
3532
+ 135,
3533
+ 55,
3534
+ 24,
3535
+ 97,
3536
+ 92,
3537
+ 1,
3538
+ 225,
3539
+ 68,
3540
+ 156,
3541
+ 253,
3542
+ 40,
3543
+ 208,
3544
+ 137,
3545
+ 241,
3546
+ 114,
3547
+ 253,
3548
+ 203,
3549
+ 114,
3550
+ 93,
3551
+ 205,
3552
+ 115,
3553
+ 158,
3554
+ 84,
3555
+ 208,
3556
+ 28,
3557
+ 137,
3558
+ 179,
3559
+ 29,
3560
+ 224,
3561
+ 227,
3562
+ 157,
3563
+ 29,
3564
+ 88,
3565
+ 113,
3566
+ 215,
3567
+ 221,
3568
+ 184,
3569
+ 245,
3570
+ 23,
3571
+ 63,
3572
+ 231,
3573
+ 90,
3574
+ 72,
3575
+ 23,
3576
+ 150,
3577
+ 197,
3578
+ 203,
3579
+ 172,
3580
+ 183,
3581
+ 72,
3582
+ 21,
3583
+ 45,
3584
+ 146,
3585
+ 100,
3586
+ 167,
3587
+ 71,
3588
+ 253,
3589
+ 8,
3590
+ 246,
3591
+ 43,
3592
+ 130,
3593
+ 213,
3594
+ 94,
3595
+ 251,
3596
+ 149,
3597
+ 65,
3598
+ 247,
3599
+ 150,
3600
+ 76,
3601
+ 155,
3602
+ 46,
3603
+ 232,
3604
+ 94,
3605
+ 113,
3606
+ 34,
3607
+ 179,
3608
+ 168,
3609
+ 5,
3610
+ 230,
3611
+ 52,
3612
+ 16,
3613
+ 119,
3614
+ 218,
3615
+ 6,
3616
+ 40,
3617
+ 191,
3618
+ 132,
3619
+ 33,
3620
+ 147,
3621
+ 168,
3622
+ 186,
3623
+ 52,
3624
+ 41,
3625
+ 236,
3626
+ 123,
3627
+ 212,
3628
+ 19,
3629
+ 81,
3630
+ 37,
3631
+ 145,
3632
+ 33,
3633
+ 16,
3634
+ 10,
3635
+ 225,
3636
+ 200,
3637
+ 145,
3638
+ 35,
3639
+ 92,
3640
+ 3,
3641
+ 217,
3642
+ 30,
3643
+ 77,
3644
+ 31,
3645
+ 11,
3646
+ 115,
3647
+ 219,
3648
+ 64,
3649
+ 143,
3650
+ 178,
3651
+ 39,
3652
+ 77,
3653
+ 173,
3654
+ 100,
3655
+ 22,
3656
+ 146,
3657
+ 155,
3658
+ 233,
3659
+ 234,
3660
+ 50,
3661
+ 147,
3662
+ 47,
3663
+ 232,
3664
+ 87,
3665
+ 189,
3666
+ 28,
3667
+ 19,
3668
+ 23,
3669
+ 198,
3670
+ 16,
3671
+ 215,
3672
+ 58,
3673
+ 118,
3674
+ 147,
3675
+ 142,
3676
+ 108,
3677
+ 136,
3678
+ 59,
3679
+ 143,
3680
+ 0,
3681
+ 130,
3682
+ 177,
3683
+ 4,
3684
+ 53,
3685
+ 75,
3686
+ 159,
3687
+ 149,
3688
+ 52,
3689
+ 94,
3690
+ 154,
3691
+ 237,
3692
+ 8,
3693
+ 77,
3694
+ 101,
3695
+ 169,
3696
+ 0,
3697
+ 189,
3698
+ 185,
3699
+ 211,
3700
+ 114,
3701
+ 177,
3702
+ 240,
3703
+ 166,
3704
+ 159,
3705
+ 209,
3706
+ 60,
3707
+ 207,
3708
+ 193,
3709
+ 242,
3710
+ 223,
3711
+ 45,
3712
+ 199,
3713
+ 121,
3714
+ 35,
3715
+ 134,
3716
+ 35,
3717
+ 70,
3718
+ 167,
3719
+ 38,
3720
+ 153,
3721
+ 210,
3722
+ 103,
3723
+ 169,
3724
+ 18,
3725
+ 226,
3726
+ 36,
3727
+ 178,
3728
+ 80,
3729
+ 234,
3730
+ 135,
3731
+ 228,
3732
+ 73,
3733
+ 144,
3734
+ 246,
3735
+ 75,
3736
+ 181,
3737
+ 53,
3738
+ 179,
3739
+ 210,
3740
+ 68,
3741
+ 145,
3742
+ 42,
3743
+ 146,
3744
+ 20,
3745
+ 20,
3746
+ 111,
3747
+ 131,
3748
+ 21,
3749
+ 188,
3750
+ 136,
3751
+ 213,
3752
+ 122,
3753
+ 105,
3754
+ 243,
3755
+ 156,
3756
+ 44,
3757
+ 40,
3758
+ 191,
3759
+ 8,
3760
+ 12,
3761
+ 134,
3762
+ 67,
3763
+ 230,
3764
+ 89,
3765
+ 130,
3766
+ 178,
3767
+ 239,
3768
+ 70,
3769
+ 213,
3770
+ 198,
3771
+ 137,
3772
+ 56,
3773
+ 74,
3774
+ 156,
3775
+ 209,
3776
+ 62,
3777
+ 230,
3778
+ 107,
3779
+ 107,
3780
+ 111,
3781
+ 167,
3782
+ 151,
3783
+ 232,
3784
+ 115,
3785
+ 190,
3786
+ 128,
3787
+ 83,
3788
+ 83,
3789
+ 60,
3790
+ 44,
3791
+ 23,
3792
+ 35,
3793
+ 169,
3794
+ 101,
3795
+ 173,
3796
+ 165,
3797
+ 236,
3798
+ 67,
3799
+ 164,
3800
+ 185,
3801
+ 25,
3802
+ 45,
3803
+ 20,
3804
+ 48,
3805
+ 183,
3806
+ 111,
3807
+ 230,
3808
+ 11,
3809
+ 129,
3810
+ 130,
3811
+ 143,
3812
+ 70,
3813
+ 58,
3814
+ 192,
3815
+ 226,
3816
+ 221,
3817
+ 220,
3818
+ 179,
3819
+ 117,
3820
+ 118,
3821
+ 102,
3822
+ 72,
3823
+ 20,
3824
+ 199,
3825
+ 153,
3826
+ 163,
3827
+ 39,
3828
+ 227,
3829
+ 41,
3830
+ 48,
3831
+ 238,
3832
+ 16,
3833
+ 235,
3834
+ 47,
3835
+ 82,
3836
+ 83,
3837
+ 245,
3838
+ 73,
3839
+ 42,
3840
+ 64,
3841
+ 13,
3842
+ 13,
3843
+ 98,
3844
+ 213,
3845
+ 170,
3846
+ 63,
3847
+ 97,
3848
+ 39,
3849
+ 55,
3850
+ 248,
3851
+ 215,
3852
+ 204,
3853
+ 157,
3854
+ 139,
3855
+ 144,
3856
+ 95,
3857
+ 103,
3858
+ 122,
3859
+ 146,
3860
+ 212,
3861
+ 190,
3862
+ 0,
3863
+ 162,
3864
+ 17,
3865
+ 31,
3866
+ 62,
3867
+ 253,
3868
+ 236,
3869
+ 16,
3870
+ 29,
3871
+ 167,
3872
+ 80,
3873
+ 255,
3874
+ 35,
3875
+ 79,
3876
+ 48,
3877
+ 90,
3878
+ 65,
3879
+ 72,
3880
+ 160,
3881
+ 18,
3882
+ 176,
3883
+ 102,
3884
+ 177,
3885
+ 190,
3886
+ 56,
3887
+ 235,
3888
+ 155,
3889
+ 151,
3890
+ 142,
3891
+ 30,
3892
+ 232,
3893
+ 91,
3894
+ 151,
3895
+ 180,
3896
+ 76,
3897
+ 105,
3898
+ 214,
3899
+ 5,
3900
+ 183,
3901
+ 166,
3902
+ 181,
3903
+ 150,
3904
+ 216,
3905
+ 207,
3906
+ 11,
3907
+ 90,
3908
+ 194,
3909
+ 4,
3910
+ 93,
3911
+ 247,
3912
+ 31,
3913
+ 60,
3914
+ 96,
3915
+ 238,
3916
+ 237,
3917
+ 183,
3918
+ 56,
3919
+ 189,
3920
+ 12,
3921
+ 63,
3922
+ 21,
3923
+ 180,
3924
+ 239,
3925
+ 203,
3926
+ 113,
3927
+ 189,
3928
+ 145,
3929
+ 217,
3930
+ 60,
3931
+ 184,
3932
+ 127,
3933
+ 63,
3934
+ 133,
3935
+ 199,
3936
+ 137,
3937
+ 67,
3938
+ 211,
3939
+ 232,
3940
+ 163,
3941
+ 199,
3942
+ 24,
3943
+ 165,
3944
+ 118,
3945
+ 149,
3946
+ 104,
3947
+ 250,
3948
+ 242,
3949
+ 92,
3950
+ 148,
3951
+ 82,
3952
+ 153,
3953
+ 60,
3954
+ 183,
3955
+ 3,
3956
+ 25,
3957
+ 19,
3958
+ 52,
3959
+ 33,
3960
+ 154,
3961
+ 154,
3962
+ 91,
3963
+ 233,
3964
+ 96,
3965
+ 120,
3966
+ 144,
3967
+ 78,
3968
+ 230,
3969
+ 208,
3970
+ 196,
3971
+ 197,
3972
+ 172,
3973
+ 105,
3974
+ 80,
3975
+ 2,
3976
+ 94,
3977
+ 153,
3978
+ 105,
3979
+ 106,
3980
+ 99,
3981
+ 161,
3982
+ 144,
3983
+ 70,
3984
+ 115,
3985
+ 11,
3986
+ 23,
3987
+ 56,
3988
+ 165,
3989
+ 211,
3990
+ 211,
3991
+ 44,
3992
+ 164,
3993
+ 115,
3994
+ 200,
3995
+ 103,
3996
+ 11,
3997
+ 200,
3998
+ 166,
3999
+ 53,
4000
+ 209,
4001
+ 212,
4002
+ 40,
4003
+ 13,
4004
+ 46,
4005
+ 53,
4006
+ 178,
4007
+ 37,
4008
+ 17,
4009
+ 69,
4010
+ 87,
4011
+ 207,
4012
+ 17,
4013
+ 228,
4014
+ 57,
4015
+ 110,
4016
+ 125,
4017
+ 78,
4018
+ 210,
4019
+ 91,
4020
+ 162,
4021
+ 1,
4022
+ 117,
4023
+ 0,
4024
+ 73,
4025
+ 26,
4026
+ 151,
4027
+ 102,
4028
+ 186,
4029
+ 214,
4030
+ 57,
4031
+ 125,
4032
+ 31,
4033
+ 83,
4034
+ 153,
4035
+ 20,
4036
+ 73,
4037
+ 211,
4038
+ 1,
4039
+ 164,
4040
+ 57,
4041
+ 179,
4042
+ 156,
4043
+ 3,
4044
+ 72,
4045
+ 198,
4046
+ 20,
4047
+ 30,
4048
+ 3,
4049
+ 59,
4050
+ 191,
4051
+ 217,
4052
+ 119,
4053
+ 58,
4054
+ 46,
4055
+ 50,
4056
+ 109,
4057
+ 65,
4058
+ 185,
4059
+ 135,
4060
+ 69,
4061
+ 238,
4062
+ 251,
4063
+ 232,
4064
+ 129,
4065
+ 102,
4066
+ 203,
4067
+ 94,
4068
+ 100,
4069
+ 210,
4070
+ 73,
4071
+ 68,
4072
+ 57,
4073
+ 29,
4074
+ 66,
4075
+ 44,
4076
+ 159,
4077
+ 226,
4078
+ 188,
4079
+ 147,
4080
+ 38,
4081
+ 135,
4082
+ 245,
4083
+ 231,
4084
+ 33,
4085
+ 89,
4086
+ 180,
4087
+ 66,
4088
+ 207,
4089
+ 177,
4090
+ 160,
4091
+ 215,
4092
+ 52,
4093
+ 220,
4094
+ 148,
4095
+ 151,
4096
+ 75,
4097
+ 90,
4098
+ 249,
4099
+ 66,
4100
+ 36,
4101
+ 152,
4102
+ 121,
4103
+ 188,
4104
+ 52,
4105
+ 127,
4106
+ 81,
4107
+ 157,
4108
+ 18,
4109
+ 56,
4110
+ 76,
4111
+ 178,
4112
+ 184,
4113
+ 139,
4114
+ 247,
4115
+ 133,
4116
+ 169,
4117
+ 89,
4118
+ 109,
4119
+ 180,
4120
+ 233,
4121
+ 156,
4122
+ 4,
4123
+ 217,
4124
+ 10,
4125
+ 39,
4126
+ 132,
4127
+ 143,
4128
+ 26,
4129
+ 89,
4130
+ 34,
4131
+ 241,
4132
+ 62,
4133
+ 20,
4134
+ 105,
4135
+ 34,
4136
+ 63,
4137
+ 61,
4138
+ 124,
4139
+ 0,
4140
+ 131,
4141
+ 135,
4142
+ 12,
4143
+ 97,
4144
+ 121,
4145
+ 31,
4146
+ 146,
4147
+ 236,
4148
+ 115,
4149
+ 115,
4150
+ 37,
4151
+ 212,
4152
+ 255,
4153
+ 200,
4154
+ 83,
4155
+ 186,
4156
+ 6,
4157
+ 111,
4158
+ 63,
4159
+ 72,
4160
+ 90,
4161
+ 83,
4162
+ 40,
4163
+ 82,
4164
+ 190,
4165
+ 232,
4166
+ 209,
4167
+ 63,
4168
+ 145,
4169
+ 87,
4170
+ 100,
4171
+ 25,
4172
+ 153,
4173
+ 59,
4174
+ 213,
4175
+ 31,
4176
+ 166,
4177
+ 57,
4178
+ 182,
4179
+ 71,
4180
+ 255,
4181
+ 124,
4182
+ 230,
4183
+ 45,
4184
+ 10,
4185
+ 39,
4186
+ 193,
4187
+ 9,
4188
+ 221,
4189
+ 59,
4190
+ 90,
4191
+ 159,
4192
+ 202,
4193
+ 59,
4194
+ 94,
4195
+ 40,
4196
+ 157,
4197
+ 15,
4198
+ 154,
4199
+ 178,
4200
+ 164,
4201
+ 124,
4202
+ 247,
4203
+ 96,
4204
+ 140,
4205
+ 123,
4206
+ 53,
4207
+ 58,
4208
+ 60,
4209
+ 20,
4210
+ 112,
4211
+ 145,
4212
+ 147,
4213
+ 172,
4214
+ 24,
4215
+ 140,
4216
+ 59,
4217
+ 99,
4218
+ 200,
4219
+ 39,
4220
+ 73,
4221
+ 16,
4222
+ 29,
4223
+ 35,
4224
+ 127,
4225
+ 144,
4226
+ 142,
4227
+ 77,
4228
+ 137,
4229
+ 166,
4230
+ 80,
4231
+ 95,
4232
+ 224,
4233
+ 99,
4234
+ 230,
4235
+ 117,
4236
+ 155,
4237
+ 222,
4238
+ 83,
4239
+ 202,
4240
+ 105,
4241
+ 205,
4242
+ 101,
4243
+ 187,
4244
+ 208,
4245
+ 20,
4246
+ 215,
4247
+ 36,
4248
+ 149,
4249
+ 165,
4250
+ 9,
4251
+ 160,
4252
+ 39,
4253
+ 153,
4254
+ 129,
4255
+ 191,
4256
+ 68,
4257
+ 115,
4258
+ 28,
4259
+ 167,
4260
+ 149,
4261
+ 73,
4262
+ 85,
4263
+ 56,
4264
+ 126,
4265
+ 15,
4266
+ 175,
4267
+ 89,
4268
+ 78,
4269
+ 139,
4270
+ 28,
4271
+ 226,
4272
+ 212,
4273
+ 188,
4274
+ 100,
4275
+ 46,
4276
+ 137,
4277
+ 12,
4278
+ 235,
4279
+ 106,
4280
+ 139,
4281
+ 15,
4282
+ 130,
4283
+ 143,
4284
+ 123,
4285
+ 203,
4286
+ 126,
4287
+ 71,
4288
+ 94,
4289
+ 95,
4290
+ 195,
4291
+ 33,
4292
+ 192,
4293
+ 193,
4294
+ 137,
4295
+ 68,
4296
+ 157,
4297
+ 57,
4298
+ 56,
4299
+ 66,
4300
+ 10,
4301
+ 85,
4302
+ 102,
4303
+ 216,
4304
+ 25,
4305
+ 163,
4306
+ 215,
4307
+ 252,
4308
+ 33,
4309
+ 86,
4310
+ 209,
4311
+ 234,
4312
+ 88,
4313
+ 12,
4314
+ 251,
4315
+ 108,
4316
+ 242,
4317
+ 176,
4318
+ 205,
4319
+ 222,
4320
+ 182,
4321
+ 232,
4322
+ 109,
4323
+ 218,
4324
+ 73,
4325
+ 160,
4326
+ 58,
4327
+ 224,
4328
+ 81,
4329
+ 62,
4330
+ 37,
4331
+ 50,
4332
+ 146,
4333
+ 38,
4334
+ 210,
4335
+ 122,
4336
+ 184,
4337
+ 182,
4338
+ 94,
4339
+ 103,
4340
+ 155,
4341
+ 226,
4342
+ 132,
4343
+ 163,
4344
+ 125,
4345
+ 247,
4346
+ 194,
4347
+ 207,
4348
+ 168,
4349
+ 163,
4350
+ 211,
4351
+ 106,
4352
+ 128,
4353
+ 224,
4354
+ 232,
4355
+ 86,
4356
+ 160,
4357
+ 26,
4358
+ 241,
4359
+ 95,
4360
+ 194,
4361
+ 10,
4362
+ 87,
4363
+ 4,
4364
+ 212,
4365
+ 18,
4366
+ 121,
4367
+ 252,
4368
+ 179,
4369
+ 201,
4370
+ 83,
4371
+ 219,
4372
+ 22,
4373
+ 201,
4374
+ 162,
4375
+ 127,
4376
+ 106,
4377
+ 242,
4378
+ 24,
4379
+ 144,
4380
+ 76,
4381
+ 243,
4382
+ 215,
4383
+ 120,
4384
+ 117,
4385
+ 85,
4386
+ 25,
4387
+ 113,
4388
+ 40,
4389
+ 194,
4390
+ 68,
4391
+ 170,
4392
+ 33,
4393
+ 182,
4394
+ 154,
4395
+ 79,
4396
+ 117,
4397
+ 87,
4398
+ 201,
4399
+ 85,
4400
+ 125,
4401
+ 250,
4402
+ 190,
4403
+ 59,
4404
+ 224,
4405
+ 200,
4406
+ 251,
4407
+ 127,
4408
+ 130,
4409
+ 75,
4410
+ 94,
4411
+ 3,
4412
+ 195,
4413
+ 37,
4414
+ 175,
4415
+ 129,
4416
+ 225,
4417
+ 146,
4418
+ 215,
4419
+ 192,
4420
+ 112,
4421
+ 201,
4422
+ 107,
4423
+ 96,
4424
+ 184,
4425
+ 228,
4426
+ 53,
4427
+ 48,
4428
+ 92,
4429
+ 242,
4430
+ 26,
4431
+ 24,
4432
+ 46,
4433
+ 121,
4434
+ 13,
4435
+ 12,
4436
+ 151,
4437
+ 188,
4438
+ 6,
4439
+ 134,
4440
+ 75,
4441
+ 94,
4442
+ 3,
4443
+ 195,
4444
+ 37,
4445
+ 175,
4446
+ 129,
4447
+ 225,
4448
+ 146,
4449
+ 215,
4450
+ 192,
4451
+ 112,
4452
+ 201,
4453
+ 107,
4454
+ 96,
4455
+ 184,
4456
+ 228,
4457
+ 53,
4458
+ 48,
4459
+ 250,
4460
+ 140,
4461
+ 60,
4462
+ 125,
4463
+ 187,
4464
+ 211,
4465
+ 55,
4466
+ 61,
4467
+ 65,
4468
+ 231,
4469
+ 68,
4470
+ 244,
4471
+ 172,
4472
+ 47,
4473
+ 228,
4474
+ 46,
4475
+ 234,
4476
+ 135,
4477
+ 186,
4478
+ 147,
4479
+ 103,
4480
+ 9,
4481
+ 19,
4482
+ 236,
4483
+ 87,
4484
+ 110,
4485
+ 251,
4486
+ 147,
4487
+ 92,
4488
+ 29,
4489
+ 36,
4490
+ 114,
4491
+ 81,
4492
+ 63,
4493
+ 212,
4494
+ 157,
4495
+ 60,
4496
+ 29,
4497
+ 97,
4498
+ 176,
4499
+ 176,
4500
+ 95,
4501
+ 205,
4502
+ 117,
4503
+ 14,
4504
+ 69,
4505
+ 135,
4506
+ 134,
4507
+ 236,
4508
+ 95,
4509
+ 59,
4510
+ 112,
4511
+ 81,
4512
+ 31,
4513
+ 212,
4514
+ 253,
4515
+ 24,
4516
+ 68,
4517
+ 45,
4518
+ 172,
4519
+ 22,
4520
+ 234,
4521
+ 24,
4522
+ 68,
4523
+ 237,
4524
+ 31,
4525
+ 197,
4526
+ 113,
4527
+ 81,
4528
+ 31,
4529
+ 244,
4530
+ 201,
4531
+ 25,
4532
+ 22,
4533
+ 161,
4534
+ 246,
4535
+ 96,
4536
+ 144,
4537
+ 52,
4538
+ 78,
4539
+ 166,
4540
+ 211,
4541
+ 69,
4542
+ 125,
4543
+ 209,
4544
+ 39,
4545
+ 228,
4546
+ 73,
4547
+ 227,
4548
+ 106,
4549
+ 205,
4550
+ 167,
4551
+ 139,
4552
+ 190,
4553
+ 65,
4554
+ 159,
4555
+ 152,
4556
+ 205,
4557
+ 218,
4558
+ 147,
4559
+ 99,
4560
+ 22,
4561
+ 197,
4562
+ 162,
4563
+ 126,
4564
+ 88,
4565
+ 239,
4566
+ 252,
4567
+ 193,
4568
+ 26,
4569
+ 23,
4570
+ 245,
4571
+ 65,
4572
+ 159,
4573
+ 145,
4574
+ 39,
4575
+ 179,
4576
+ 89,
4577
+ 123,
4578
+ 4,
4579
+ 208,
4580
+ 146,
4581
+ 231,
4582
+ 162,
4583
+ 94,
4584
+ 0,
4585
+ 254,
4586
+ 3,
4587
+ 72,
4588
+ 157,
4589
+ 255,
4590
+ 99,
4591
+ 145,
4592
+ 151,
4593
+ 4,
4594
+ 124,
4595
+ 0,
4596
+ 0,
4597
+ 0,
4598
+ 0,
4599
+ 73,
4600
+ 69,
4601
+ 78,
4602
+ 68,
4603
+ 174,
4604
+ 66,
4605
+ 96,
4606
+ 130,
4607
+ ]
4608
+ )
4609
+
4610
+
4611
+ from urllib.parse import urlparse
4612
+
4613
+
4614
+ class ProxyForwarder:
4615
+ server: asyncio.Server = None
4616
+ host: str = None
4617
+ port: int = None
4618
+ scheme: str = None
4619
+ fw_host: str = None
4620
+ fw_port: int = None
4621
+ fw_scheme: str = None
4622
+ use_ssl: bool = None
4623
+ ssl_context: SSLContext = None
4624
+
4625
+ @property
4626
+ def proxy_server(self):
4627
+ return self._proxy_server
4628
+
4629
+ def __init__(self, proxy_server, ssl_context=None):
4630
+ self._proxy_server = None
4631
+ self.ssl_context = ssl_context
4632
+
4633
+ url = urlparse(proxy_server)
4634
+ if not url.scheme:
4635
+ # check if ip:port is passed, in which case no forwarder is needed
4636
+ if url.path.find(":") != -1:
4637
+ self._proxy_server = url.path
4638
+ else:
4639
+ self.use_ssl = url.scheme == "https"
4640
+
4641
+ if not url.username and not url.password:
4642
+ # if no username and password are provided in the proxy url,
4643
+ # we are not needed either
4644
+ self.scheme = url.scheme
4645
+ self._proxy_server = url.geturl()
4646
+ else:
4647
+ self.port = free_port()
4648
+ self.host = "127.0.0.1"
4649
+ self.scheme = url.scheme
4650
+ self.fw_port = url.port
4651
+ self.fw_host = url.hostname
4652
+ self.fw_scheme = url.scheme
4653
+ self.username = url.username
4654
+ self.password = url.password
4655
+
4656
+ # For HTTP/HTTPS proxies, always use http:// for local forwarder
4657
+ # (local forwarder accepts plain HTTP CONNECT and handles SSL to upstream)
4658
+ if self.scheme.startswith("http"):
4659
+ self._proxy_server = f"http://{self.host}:{self.port}"
4660
+ else:
4661
+ self._proxy_server = f"{self.scheme}://{self.host}:{self.port}"
4662
+
4663
+ logger.info(
4664
+ "%s proxy with authentication is requested : %s"
4665
+ % (self.scheme, proxy_server)
4666
+ )
4667
+ logger.info("starting forward proxy on %s:%d" % (self.host, self.port))
4668
+ logger.info("which forwards to %s" % proxy_server)
4669
+ asyncio.ensure_future(self.listen())
4670
+
4671
+ async def listen(self):
4672
+ self.server = await asyncio.start_server(
4673
+ self.handle_request, host=self.host, port=self.port
4674
+ )
4675
+ await self.server.start_serving()
4676
+
4677
+ async def handle_request(
4678
+ self, reader: asyncio.StreamReader, writer: asyncio.StreamWriter
4679
+ ):
4680
+ if self.scheme.startswith("socks"):
4681
+ return await self.handle_socks_request(reader, writer)
4682
+ elif self.scheme.startswith("http"):
4683
+ return await self.handle_http_request(reader, writer)
4684
+
4685
+ async def handle_http_request(
4686
+ self, reader: asyncio.StreamReader, writer: asyncio.StreamWriter
4687
+ ):
4688
+ """
4689
+ Handle HTTP CONNECT proxy requests with authentication.
4690
+ This implements an HTTP proxy that accepts unauthenticated connections
4691
+ and forwards them to an authenticated upstream HTTP proxy.
4692
+ """
4693
+ import base64
4694
+ import ssl
4695
+
4696
+ MAX_LINE_LENGTH = 8192
4697
+ REQUEST_TIMEOUT = 5.0
4698
+ UPSTREAM_CONNECT_TIMEOUT = 30.0
4699
+
4700
+ remote_writer = None
4701
+ pipe_tasks = []
4702
+
4703
+ try:
4704
+ try:
4705
+ request_line = await asyncio.wait_for(
4706
+ reader.readline(), timeout=REQUEST_TIMEOUT
4707
+ )
4708
+ except asyncio.TimeoutError:
4709
+ logger.warning("Client request timeout")
4710
+ writer.write(b"HTTP/1.1 408 Request Timeout\r\n\r\n")
4711
+ await writer.drain()
4712
+ writer.close()
4713
+ await writer.wait_closed()
4714
+ return
4715
+
4716
+ if not request_line:
4717
+ writer.close()
4718
+ await writer.wait_closed()
4719
+ return
4720
+
4721
+ if len(request_line) > MAX_LINE_LENGTH:
4722
+ logger.warning(f"Oversized request line: {len(request_line)} bytes")
4723
+ writer.write(b"HTTP/1.1 431 Request Header Fields Too Large\r\n\r\n")
4724
+ await writer.drain()
4725
+ writer.close()
4726
+ await writer.wait_closed()
4727
+ return
4728
+
4729
+ request_line = request_line.decode("utf-8", errors="ignore")
4730
+
4731
+ if not request_line.startswith("CONNECT"):
4732
+ logger.warning(f"Non-CONNECT request received: {request_line.strip()}")
4733
+ writer.write(b"HTTP/1.1 400 Bad Request\r\n\r\n")
4734
+ await writer.drain()
4735
+ writer.close()
4736
+ await writer.wait_closed()
4737
+ return
4738
+
4739
+ parts = request_line.split()
4740
+ if len(parts) < 2:
4741
+ logger.warning(f"Malformed CONNECT request: {request_line.strip()}")
4742
+ writer.write(b"HTTP/1.1 400 Bad Request\r\n\r\n")
4743
+ await writer.drain()
4744
+ writer.close()
4745
+ await writer.wait_closed()
4746
+ return
4747
+
4748
+ target_host_port = parts[1]
4749
+
4750
+ if ":" not in target_host_port:
4751
+ logger.warning(
4752
+ f"Invalid target format (missing port): {target_host_port}"
4753
+ )
4754
+ writer.write(b"HTTP/1.1 400 Bad Request\r\n\r\n")
4755
+ await writer.drain()
4756
+ writer.close()
4757
+ await writer.wait_closed()
4758
+ return
4759
+
4760
+ try:
4761
+ host, port_str = target_host_port.rsplit(":", 1)
4762
+ port = int(port_str)
4763
+ if port < 1 or port > 65535:
4764
+ raise ValueError("Port out of range")
4765
+ except ValueError:
4766
+ logger.warning(f"Invalid port in target: {target_host_port}")
4767
+ writer.write(b"HTTP/1.1 400 Bad Request\r\n\r\n")
4768
+ await writer.drain()
4769
+ writer.close()
4770
+ await writer.wait_closed()
4771
+ return
4772
+
4773
+ try:
4774
+ while True:
4775
+ header = await asyncio.wait_for(
4776
+ reader.readline(), timeout=REQUEST_TIMEOUT
4777
+ )
4778
+ if len(header) > MAX_LINE_LENGTH:
4779
+ logger.warning("Oversized header line")
4780
+ writer.write(
4781
+ b"HTTP/1.1 431 Request Header Fields Too Large\r\n\r\n"
4782
+ )
4783
+ await writer.drain()
4784
+ writer.close()
4785
+ await writer.wait_closed()
4786
+ return
4787
+ if not header or header == b"\r\n" or header == b"\n":
4788
+ break
4789
+ except asyncio.TimeoutError:
4790
+ logger.warning("Timeout reading client headers")
4791
+ writer.write(b"HTTP/1.1 408 Request Timeout\r\n\r\n")
4792
+ await writer.drain()
4793
+ writer.close()
4794
+ await writer.wait_closed()
4795
+ return
4796
+
4797
+ try:
4798
+ conn_params = {"host": self.fw_host, "port": self.fw_port}
4799
+
4800
+ if self.use_ssl:
4801
+ if self.ssl_context:
4802
+ conn_params["ssl"] = self.ssl_context
4803
+ else:
4804
+ conn_params["ssl"] = ssl.create_default_context()
4805
+
4806
+ remote_reader, remote_writer = await asyncio.wait_for(
4807
+ asyncio.open_connection(**conn_params),
4808
+ timeout=UPSTREAM_CONNECT_TIMEOUT,
4809
+ )
4810
+ except asyncio.TimeoutError:
4811
+ logger.error(
4812
+ f"Timeout connecting to upstream proxy {self.fw_host}:{self.fw_port}"
4813
+ )
4814
+ writer.write(b"HTTP/1.1 504 Gateway Timeout\r\n\r\n")
4815
+ await writer.drain()
4816
+ writer.close()
4817
+ await writer.wait_closed()
4818
+ return
4819
+ except Exception as e:
4820
+ logger.error(f"Failed to connect to upstream proxy: {e}")
4821
+ writer.write(b"HTTP/1.1 502 Bad Gateway\r\n\r\n")
4822
+ await writer.drain()
4823
+ writer.close()
4824
+ await writer.wait_closed()
4825
+ return
4826
+
4827
+ credentials = f"{self.username}:{self.password}"
4828
+ auth_encoded = base64.b64encode(credentials.encode()).decode("ascii")
4829
+
4830
+ connect_request = (
4831
+ f"CONNECT {target_host_port} HTTP/1.1\r\n"
4832
+ f"Host: {target_host_port}\r\n"
4833
+ f"Proxy-Authorization: Basic {auth_encoded}\r\n"
4834
+ f"Proxy-Connection: Keep-Alive\r\n"
4835
+ f"\r\n"
4836
+ )
4837
+
4838
+ remote_writer.write(connect_request.encode())
4839
+ await remote_writer.drain()
4840
+
4841
+ try:
4842
+ response_line = await asyncio.wait_for(
4843
+ remote_reader.readline(), timeout=REQUEST_TIMEOUT
4844
+ )
4845
+ except asyncio.TimeoutError:
4846
+ logger.error("Timeout reading upstream proxy response")
4847
+ writer.write(b"HTTP/1.1 504 Gateway Timeout\r\n\r\n")
4848
+ await writer.drain()
4849
+ writer.close()
4850
+ await writer.wait_closed()
4851
+ remote_writer.close()
4852
+ await remote_writer.wait_closed()
4853
+ return
4854
+
4855
+ if not response_line:
4856
+ logger.error("No response from upstream proxy")
4857
+ writer.write(b"HTTP/1.1 502 Bad Gateway\r\n\r\n")
4858
+ await writer.drain()
4859
+ writer.close()
4860
+ await writer.wait_closed()
4861
+ remote_writer.close()
4862
+ await remote_writer.wait_closed()
4863
+ return
4864
+
4865
+ response_line_str = response_line.decode("utf-8", errors="ignore")
4866
+
4867
+ upstream_headers = []
4868
+ try:
4869
+ while True:
4870
+ header = await asyncio.wait_for(
4871
+ remote_reader.readline(), timeout=REQUEST_TIMEOUT
4872
+ )
4873
+ if not header or header == b"\r\n" or header == b"\n":
4874
+ break
4875
+ upstream_headers.append(header)
4876
+ except asyncio.TimeoutError:
4877
+ logger.error("Timeout reading upstream proxy headers")
4878
+ writer.write(b"HTTP/1.1 504 Gateway Timeout\r\n\r\n")
4879
+ await writer.drain()
4880
+ writer.close()
4881
+ await writer.wait_closed()
4882
+ remote_writer.close()
4883
+ await remote_writer.wait_closed()
4884
+ return
4885
+
4886
+ if "200" in response_line_str:
4887
+ writer.write(b"HTTP/1.1 200 Connection Established\r\n\r\n")
4888
+ await writer.drain()
4889
+
4890
+ event = asyncio.Event()
4891
+ pipe_tasks = [
4892
+ asyncio.create_task(self.pipe(remote_reader, writer, event)),
4893
+ asyncio.create_task(self.pipe(reader, remote_writer, event)),
4894
+ ]
4895
+
4896
+ try:
4897
+ await asyncio.gather(*pipe_tasks)
4898
+ finally:
4899
+ # Ensure tasks are cancelled and cleaned up to prevent resource leaks
4900
+ for task in pipe_tasks:
4901
+ if not task.done():
4902
+ task.cancel()
4903
+ await asyncio.gather(*pipe_tasks, return_exceptions=True)
4904
+ else:
4905
+ logger.error(
4906
+ f"Upstream proxy rejected connection: {response_line_str.strip()}"
4907
+ )
4908
+ writer.write(b"HTTP/1.1 502 Bad Gateway\r\n")
4909
+ writer.write(b"Content-Type: text/plain\r\n")
4910
+ writer.write(b"\r\n")
4911
+ writer.write(b"Upstream proxy rejected the connection\r\n")
4912
+ await writer.drain()
4913
+ writer.close()
4914
+ await writer.wait_closed()
4915
+ remote_writer.close()
4916
+ await remote_writer.wait_closed()
4917
+
4918
+ except Exception as e:
4919
+ logger.error(f"Error handling HTTP proxy request: {e}", exc_info=True)
4920
+ try:
4921
+ writer.write(b"HTTP/1.1 500 Internal Server Error\r\n\r\n")
4922
+ await writer.drain()
4923
+ except:
4924
+ pass
4925
+ finally:
4926
+ try:
4927
+ if not writer.is_closing():
4928
+ writer.close()
4929
+ await writer.wait_closed()
4930
+ except:
4931
+ pass
4932
+
4933
+ try:
4934
+ if remote_writer and not remote_writer.is_closing():
4935
+ remote_writer.close()
4936
+ await remote_writer.wait_closed()
4937
+ except:
4938
+ pass
4939
+
4940
+ for task in pipe_tasks:
4941
+ if not task.done():
4942
+ task.cancel()
4943
+
4944
+ async def handle_socks_request(
4945
+ self, reader: asyncio.StreamReader, writer: asyncio.StreamWriter
4946
+ ):
4947
+ import socket
4948
+ from struct import calcsize, error, pack, unpack
4949
+
4950
+ NO_ADDR = "0.0.0.0"
4951
+ ATYP_IPv4 = 0x01
4952
+ ATYP_DNS = 0x03
4953
+ ATYP_IPv6 = 0x04
4954
+
4955
+ # import aiosocks2
4956
+ async def read(fmt):
4957
+ """
4958
+ Read from the byte stream
4959
+ :param str fmt: struct format specifier
4960
+ :return tuple:
4961
+ """
4962
+ data = await reader.read(calcsize(fmt))
4963
+ try:
4964
+ return unpack(fmt, data)
4965
+ except error as e:
4966
+ if "buffer" in str(e):
4967
+ logger.debug(
4968
+ f"socks proxy read invalid data {e.args[0]} - got {data} ({len(data)} bytes)"
4969
+ )
4970
+ raise
4971
+
4972
+ try:
4973
+ version, num_methods = await read("!BB")
4974
+ except error as e:
4975
+ return
4976
+
4977
+ # fire and forget socks auth methods
4978
+ await read("!" + "B" * num_methods)
4979
+
4980
+ # we only need to auth with the upstream proxy
4981
+ writer.write(pack("!BB", version, 0))
4982
+
4983
+ # read command from the client
4984
+ version, cmd, resv, atyp = await read("!BBBB")
4985
+
4986
+ if atyp == ATYP_IPv4:
4987
+ ip_packed = await reader.read(4)
4988
+ port = (await read("!H"))[0]
4989
+ ip_addr = socket.inet_ntop(socket.AF_INET, ip_packed)
4990
+ hostname = None
4991
+ elif atyp == ATYP_IPv6:
4992
+ ip_packed = await reader.read(16)
4993
+ port = (await read("!H"))[0]
4994
+ ip_addr = socket.inet_ntop(socket.AF_INET6, ip_packed)
4995
+ hostname = None
4996
+ elif atyp == ATYP_DNS:
4997
+ hostname_len = (await read("!B"))[0]
4998
+ hostname = (await read("!{}s".format(hostname_len)))[0]
4999
+ port = (await read("!H"))[0]
5000
+ ip_addr = None
5001
+
5002
+ if hostname: # noqa
5003
+ if not ip_addr: # noqa
5004
+ ip_addr = socket.gethostbyname(hostname) # noqa
5005
+ else:
5006
+ hostname = socket.gethostbyaddr(ip_addr) # noqa
5007
+
5008
+ # connect to the upstream proxy
5009
+ remote_reader, remote_writer = await asyncio.open_connection(
5010
+ host=self.fw_host, port=self.fw_port
5011
+ )
5012
+
5013
+ # handshake with upstream proxy
5014
+ remote_writer.write(pack("!BBB", version, 1, 2))
5015
+ server_version, server_auth_method = await remote_reader.read(calcsize("!BB"))
5016
+
5017
+ # authenticate to upstream proxy
5018
+ if server_auth_method == 2:
5019
+ auth_ticket = pack(
5020
+ f"!BB{len(self.username)}sB{len(self.password)}s",
5021
+ 1,
5022
+ len(self.username),
5023
+ self.username.encode(),
5024
+ len(self.password),
5025
+ self.password.encode(),
5026
+ )
5027
+
5028
+ remote_writer.write(auth_ticket)
5029
+ await remote_writer.drain()
5030
+ ver, result = await remote_reader.read(calcsize("!BB"))
5031
+
5032
+ if result != 0:
5033
+ raise Exception("socks authentication error: %s" % result)
5034
+
5035
+ # forward client socks5 message to upstream proxy
5036
+ remote_writer.write(pack("!BBBB", version, cmd, resv, atyp))
5037
+ remote_writer.write(pack("!B", hostname_len))
5038
+ remote_writer.write(pack(f"!{hostname_len}s", hostname))
5039
+ remote_writer.write(pack("!H", port))
5040
+
5041
+ # create a tunnel between client and upstream proxy
5042
+ event = asyncio.Event()
5043
+ tasks = self.pipe(remote_reader, writer, event), self.pipe(
5044
+ reader, remote_writer, event
5045
+ )
5046
+ await asyncio.gather(*tasks)
5047
+
5048
+ @staticmethod
5049
+ async def pipe(
5050
+ reader: asyncio.StreamReader, writer: asyncio.StreamWriter, event: asyncio.Event
5051
+ ):
5052
+ logger.debug("client proxy to authenticated proxy pipe")
5053
+ while not event.is_set():
5054
+ try:
5055
+ data = await asyncio.wait_for(reader.read(2**16), 1)
5056
+ if not data:
5057
+ break
5058
+ # simply forward
5059
+
5060
+ writer.write(data)
5061
+ except asyncio.TimeoutError:
5062
+ continue
5063
+ event.set()