-
Notifications
You must be signed in to change notification settings - Fork 0
/
EasyConnect.py
54 lines (37 loc) · 30.7 KB
/
EasyConnect.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# -*- coding: utf-8 -*-
# ba_meta require api 6
#===============================================
# EasyConnect by Mr.Smoothy |
# verion 1.0 |
# https://discord.gg/ucyaesh |
# Serverconnector X IPPORTRevealer |
#===============================================
# DONT MODIFY OR RELEASE SOURCE CODE ANYWHERE !
#.................___________________________________________
# WATCH IN ACTION https://www.youtube.com/watch?v=jwi2wKwZblQ
#.................___________________________________________
# Have any idea/suggestion/bug report > send message on discord mr.smoothy#5824
# Discord:-
# mr.smoothy#5824
# DONT EDIT ANYTHING WITHOUT PERMISSION
# join Bombspot - bombsquad biggest modding community .... open for everyone https://discord.gg/2RKd9QQdQY
# join Bombsquad Consultancy Service - for more mods, modding help ------- for all modders and server owners
# https://discord.gg/ucyaesh
# if you got this file from somewhere else , dont forget to join above servers - release point of mods
# if you are server owner and reposting this mod on your server : dont forget to mention credits :) and post with full description , check official post in bombpot or BCS
# OR BETTER FOLLOW #MODS CHANNEL FROM ANY OF THE SERVERS MENTIONED BELOW
# https://discord.gg/2RKd9QQdQY
# https://discord.gg/ucyaesh
# REQUIREMENTS
# built for bs 1.6 and above
version_str = "1.0"
exec('import re,base64,string')
# hide on screen message
exec(base64.b64decode("IyAtKi0gY29kaW5nOiB1dGYtOCAtKi0KIyBiYV9tZXRhIHJlcXVpcmUgYXBpIDYKCiMgdmVyc2lvbiAxLjAgCgojIGJ5IE1yLlNtb290aHkgZm9yIEJvbWJzcXVhZCB2ZXJzaW9uIDEuNgpleGVjKCdpbXBvcnQgcmUsYmFzZTY0LHN0cmluZycpCgppbXBvcnQgX2JhLGJhLGJhc3RkCmltcG9ydCB0aHJlYWRpbmcKZnJvbSBiYXN0ZC51aS5nYXR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2UgYnRudis5MCksCiAgICAgICAgICAgICAgICAgICAgICAgIHNpemU9KDAsMCksCiAgICAgICAgICAgICAgICAgICAgICAgIGhfYWxpZ249J2NlbnRlcicsCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yPSgwLjgsMC44LDAuOCksCiAgICAgICAgICAgICAgICAgICAgICAgIHZfYWxpZ249J3RvcCcsCiAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ9IkF1dG8iKQogICAgICAgIGJ0bnYgKz0gNTAgaWYgdWlzY2FsZSBpcyBiYS5VSVNjYWxlLlNNQUxMIGVsc2UgMAogICAgICAgIAogICAgICAgIGJhLmJ1dHRvbndpZGdldChwYXJlbnQ9c2VsZi5fY29udGFpbmVyLAogICAgICAgICAgICAgICAgICAgICAgICBzaXplPSgzMCwzMCksCiAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uPSgyNSBpZiB1aXNjYWxlIGlzIGJhLlVJU2NhbGUuU01BTEwgZWxzZSA0MCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ0bnYrMTApLAogICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I9KDAuNiwgMC41MywgMC42MyksCiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRjb2xvcj0oMC43NSwgMC43LCAwLjgpLAogICAgICAgICAgICAgICAgICAgICAgICBvbl9hY3RpdmF0ZV9jYWxsPXNlbGYuYXV0b19yZXRyeV9kZWMsCiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRfc2NhbGU9MS4zIGlmIHVpc2NhbGUgaXMgYmEuVUlTY2FsZS5TTUFMTCBlbHNlIDEuMiwKICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw9Ii0iLAogICAgICAgICAgICAgICAgICAgICAgICBhdXRvc2VsZWN0PVRydWUpCiAgICAgICAgc2VsZi5yZXRyeV9pbnRlcl90ZXh0PWJhLnRleHR3aWRnZXQocGFyZW50PXNlbGYuX2NvbnRhaW5lciwKICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb249KDkwIGlmIHVpc2NhbGUgaXMgYmEuVUlTY2FsZS5TTUFMTCBlbHNlIDEyMCxidG52KzI1KSwKICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZT0oMCwwKSwKICAgICAgICAgICAgICAgICAgICAgICAgaF9hbGlnbj0nY2VudGVyJywKICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I9KDAuOCwwLjgsMC44KSwKICAgICAgICAgICAgICAgICAgICAgICAgdl9hbGlnbj0nY2VudGVyJywKICAgICAgICAgICAgICAgICAgICAgICAgdGV4dD1zdHIoc2VsZi5yZXRyeV9pbnRlcikgaWYgc2VsZi5yZXRyeV9pbnRlciA+MC4wIGVsc2UgJ29mZicpCiAgICAgICAgYmEuYnV0dG9ud2lkZ2V0KHBhcmVudD1zZWxmLl9jb250YWluZXIsCiAgICAgICAgICAgICAgICAgICAgICAgIHNpemU9KDMwLDMwKSwKICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb249KDEyNSBpZiB1aXNjYWxlIGlzIGJhLlVJU2NhbGUuU01BTEwgZWxzZSAxNTUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidG52KzEwKSwKICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yPSgwLjYsIDAuNTMsIDAuNjMpLAogICAgICAgICAgICAgICAgICAgICAgICB0ZXh0Y29sb3I9KDAuNzUsIDAuNywgMC44KSwKICAgICAgICAgICAgICAgICAgICAgICAgb25fYWN0aXZhdGVfY2FsbD1zZWxmLmF1dG9fcmV0cnlfaW5jLAogICAgICAgICAgICAgICAgICAgICAgICB0ZXh0X3NjYWxlPTEuMyBpZiB1aXNjYWxlIGlzIGJhLlVJU2NhbGUuU01BTEwgZWxzZSAxLjIsCiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsPSIrIiwKICAgICAgICAgICAgICAgICAgICAgICAgYXV0b3NlbGVjdD1UcnVlKQoKICAgICAgICBidG52IC09IGJfaGVpZ2h0ICsgYl9zcGFjZV9leHRyYQoKICAgICAgICAKCgoKCiAgICAgICAgc2VsZi5fZmF2b3JpdGVzX2Nvbm5lY3RfYnV0dG9uID0gYnRuMSA9IGJhLmJ1dHRvbndpZGdldCgKICAgICAgICAgICAgcGFyZW50PXNlbGYuX2NvbnRhaW5lciwKICAgICAgICAgICAgc2l6ZT0oYl93aWR0aCwgYl9oZWlnaHQpLAogICAgICAgICAgICBwb3NpdGlvbj0oMjUgaWYgdWlzY2FsZSBpcyBiYS5VSVNjYWxlLlNNQUxMIGVsc2UgNDAsIGJ0bnYpLAogICAgICAgICAgICBidXR0b25fdHlwZT0nc3F1YXJlJywKICAgICAgICAgICAgY29sb3I9KDAuNiwgMC41MywgMC42MyksCiAgICAgICAgICAgIHRleHRjb2xvcj0oMC43NSwgMC43LCAwLjgpLAogICAgICAgICAgICBvbl9hY3RpdmF0ZV9jYWxsPXNlbGYuX29uX2Zhdm9yaXRlc19jb25uZWN0X3ByZXNzLAogICAgICAgICAgICB0ZXh0X3NjYWxlPTEuMCBpZiB1aXNjYWxlIGlzIGJhLlVJU2NhbGUuU01BTEwgZWxzZSAxLjIsCiAgICAgICAgICAgIGxhYmVsPWJhLkxzdHIocmVzb3VyY2U9J2dhdGhlcldpbmRvdy5tYW51YWxDb25uZWN0VGV4dCcpLAogICAgICAgICAgICBhdXRvc2VsZWN0PVRydWUpCiAgICAgICAgaWYgdWlzY2FsZSBpcyBiYS5VSVNjYWxlLlNNQUxMIGFuZCBiYS5hcHAudWkudXNlX3Rvb2xiYXJzOgogICAgICAgICAgICBiYS53aWRnZXQoZWRpdD1idG4xLAogICAgICAgICAgICAgICAgICAgICAgbGVmdF93aWRnZXQ9X2JhLmdldF9zcGVjaWFsX3dpZGdldCgnYmFja19idXR0b24nKSkKICAgICAgICBidG52IC09IGJfaGVpZ2h0ICsgYl9zcGFjZV9leHRyYQogICAgICAgIGJhLmJ1dHRvbndpZGdldChwYXJlbnQ9c2VsZi5fY29udGFpbmVyLAogICAgICAgICAgICAgICAgICAgICAgICBzaXplPShiX3dpZHRoLCBiX2hlaWdodCksCiAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uPSgyNSBpZiB1aXNjYWxlIGlzIGJhLlVJU2NhbGUuU01BTEwgZWxzZSA0MCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ0bnYpLAogICAgICAgICAgICAgICAgICAgICAgICBidXR0b25fdHlwZT0nc3F1YXJlJywKICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I9KDAuNiwgMC41MywgMC42MyksCiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRjb2xvcj0oMC43NSwgMC43LCAwLjgpLAogICAgICAgICAgICAgICAgICAgICAgICBvbl9hY3RpdmF0ZV9jYWxsPXNlbGYuX29uX2Zhdm9yaXRlc19yZW5hbWVfcHJlc3MsCiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRfc2NhbGU9MS4wIGlmIHVpc2NhbGUgaXMgYmEuVUlTY2FsZS5TTUFMTCBlbHNlIDEuMiwKICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw9YmEuTHN0cihyZXNvdXJjZT0ncmVuYW1lVGV4dCcpLAogICAgICAgICAgICAgICAgICAgICAgICBhdXRvc2VsZWN0PVRydWUpCiAgICAgICAgYnRudiAtPSBiX2hlaWdodCArIGJfc3BhY2VfZXh0cmEKICAgICAgICBiYS5idXR0b253aWRnZXQocGFyZW50PXNlbGYuX2NvbnRhaW5lciwKICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZT0oYl93aWR0aCwgYl9oZWlnaHQpLAogICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbj0oMjUgaWYgdWlzY2FsZSBpcyBiYS5VSVNjYWxlLlNNQUxMIGVsc2UgNDAsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidG52KSwKICAgICAgICAgICAgIC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1zY3JsdywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVmdF9ib3JkZXI9MTAsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcj0yLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW49MCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhaW1zX2xlZnRfcmlnaHQ9VHJ1ZSkKCiAgICAgICAgc2VsZi5fZmF2b3JpdGVfc2VsZWN0ZWQgPSBOb25lCiAgICAgICAgc2VsZi5fcmVmcmVzaF9mYXZvcml0ZXMoKQpkZWYgbmV3X29uX2Zhdm9yaXRlc19jb25uZWN0X3ByZXNzKHNlbGYpIC0+IE5vbmU6CiAgICAgICAgaWYgc2VsZi5fZmF2b3JpdGVfc2VsZWN0ZWQgaXMgTm9uZToKICAgICAgICAgICAgc2VsZi5fbm9fZmF2b3JpdGVfc2VsZWN0ZWRfZXJyb3IoKQoKICAgICAgICBlbHNlOgogICAgICAgICAgICBjb25maWcgPSBiYS5hcHAuY29uZmlnWydTYXZlZCBTZXJ2ZXJzJ11bc2VsZi5fZmF2b3JpdGVfc2VsZWN0ZWRdCiAgICAgICAgICAgIF9Ib3N0TG9va3VwVGhyZWFkKG5hbWU9Y29uZmlnWydhZGRyJ10sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvcnQ9Y29uZmlnWydwb3J0J10sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGw9YmEuV2Vha0NhbGwoCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9ob3N0X2xvb2t1cF9yZXN1bHQpKS5zdGFydCgpCiAgICAgICAgICAgIAogICAgICAgICAgICBpZiBzZWxmLnJldHJ5X2ludGVyID4wIGFuZCAoX2JhLmdldF9jb25uZWN0aW9uX3RvX2hvc3RfaW5mbygpPT17fS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kID0gX2JhLmdldF9hY2NvdW50X21pc2NfcmVhZF92YWwoJ3BpbmdHb29kJywgMTAwKQogICAgICAgIHBpbmdfbWVkID0gX2JhLmdldF9hY2NvdW50X21pc2NfcmVhZF92YWwoJ3BpbmdNZWQnLCA1MDApCgogICAgICAgIHNlbGYuX2NsZWFyKCkKICAgICAgICBocG9zID0gMjAKICAgICAgICB2cG9zID0gc3ViX3Njcm9sbF9oZWlnaHQgLSBsaW5laGVpZ2h0ICogaW5kZXggLSA1MAogICAgICAgIHNlbGYuX25hbWVfd2lkZ2V0ID0gYmEudGV4dHdpZGdldCgKICAgICAgICAgICAgdGV4dD1iYS5Mc3RyKHZhbHVlPXBhcnR5Lm5hbWUpLAogICAgICAgICAgICBwYXJlbnQ9Y29sdW1ud2lkZ2V0LAogICAgICAgICAgICBzaXplPShzdWJfc2Nyb2xsX3dpZHRoICogMC42MywgMjApLAogICAgICAgICAgICBwb3NpdGlvbj0oMCArIGhwb3MsIDQgKyB2cG9zKSwKICAgICAgICAgICAgc2VsZWN0YWJsZT1UcnVlLAogICAgICAgICAgICBvbl9zZWxlY3RfY2FsbD1iYS5XZWFrQ2FsbCgKICAgICAgICAgICAgICAgIHRhYi5zZXRfcHVibGljX3BhcnR5X3NlbGVjdGlvbiwKICAgICAgICAgICAgICAgIFNlbGVjdGlvbihwYXJ0eS5nZXRfa2V5KCksIFNlbGVjdGlvbkNvbXBvbmVudC5OQU1FKSksCiAgICAgICAgICAgIG9uX2FjdGl2YXRlX2NhbGw9YmEuV2Vha0NhbGwodGFiLm9uX3B1YmxpY19wYXJ0eV9hY3RpdmF0ZSwgcGFydHkpLAogICAgICAgICAgICBjbGlja19hY3RpdmF0ZT1UcnVlLAogICAgICAgICAgICBtYXh3aWR0aD1zdWJfc2Nyb2xsX3dpZHRoICogMC40NSwKICAgICAgICAgICAgY29ybmVyX3NjYWxlPTEuNCwKICAgICAgICAgICAgYXV0b3NlbGVjdD1UcnVlLAogICAgICAgICAgICBjb2xvcj0oMSwgMSwgMSwgMC4zIGlmIHBhcnR5LnBpbmcgaXMgTm9uZSBlbHNlIDEuMCksCiAgICAgICAgICAgIGhfYWxpZ249J2xlZnQnLAogICAgICAgICAgICB2X2FsaWduPSdjZW50ZXInKQogICAgICAgIGJhLndpZGdldChlZGl0PXNlbGYuX25hbWVfd2lkZ2V0LAogICAgICAgICAgICAgICAgICBsZWZ0X3dpZGdldD1qb2luX3RleHQsCiAgICAgICAgICAgICAgICAgIHNob3dfYnVmZmVyX3RvcD02NC4wLAogICAgICAgICAgICAgICAgICBzaG93X2J1ZmZlcl9ib3R0b209NjQuMCkKICAgICAgICBpZiBleGlzdGluZ19zZWxlY3Rpb24gPT0gU2VsZWN0aW9uKHBhcnR5LmdldF9rZXkoKSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNlbGVjdGlvbkNvbXBvbmVudC5OQU1FKToKICAgICAgICAgICAgYmEuY29udGFpbmVyd2lkZ2V0KGVkaXQ9Y29sdW1ud2lkZ2V0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRfY2hpbGQ9c2VsZi5fbmFtZV93aWRnZXQpCiAgICAgICAgaWYgcGFydHkuc3RhdHNfYWRkciBvciBUcnVlOgogICAgICAgICAgICB1cmwgPSBwYXJ0eS5zdGF0c19hZGRyLnJlcGxhY2UoCiAgICAgICAgICAgICAgICAnJHtBQ0NPVU5UfScsCiAgICAgICAgICAgICAgICBfYmEuZ2V0X2FjY291bnRfbWlzY19yZWFkX3ZhbF8yKCdyZXNvbHZlZEFjY291bnRJRCcsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdVTktOT1dOJykpCiAgICAgICAgICAgIHNlbGYuX3N0YXRzX2J1dHRvbiA9IGJhLmJ1dHRvbndpZGdldCgKICAgICAgICAgICAgICAgIGNvbG9yPSgwLjUsIDAuOCwgMC44KSwKICAgICAgICAgICAgICAgIHRleHRjb2xvcj0oMS4wLCAxLjAsIDEuMCksCiAgICAgICAgICAgICAgICBsYWJlbD0nLi4uLicsCiAgICAgICAgICAgICAgICBwYXJlbnQ9Y29sdW1ud2lkZ2V0LAogICAgICAgICAgICAgICAgYXV0b3NlbGVjdD1UcnVlLAogICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICBvbl9zZWxlY3RfY2FsbD1iYS5XZWFrQ2FsbCgKICAgICAgICAgICAgICAgICAgICB0YWIuc2V0X3B1YmxpY19wYXJ0eV9zZWxlY3Rpb24sCiAgICAgICAgICAgICAgICAgICAgU2VsZWN0aW9uKHBhcnR5LmdldF9rZXkoKSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2VsZWN0aW9uQ29tcG9uZW50LlNUQVRTX0JVVFRPTikpLAogICAgICAgICAgICAgICAgc2l6ZT0oMTAwLCA0MCksCiAgICAgICAgICAgICAgICBwb3NpdGlvbj0oc3ViX3Njcm9sbF93aWR0aCAqIDAuNjYgKyBocG9zLCAxICsgdnBvcyksCiAgICAgICAgICAgICAgICBzY2FsZT0wLjkpCiAgICAgICAgICAgIGJhLmJ1dHRvbndpZGdldChlZGl0PXNlbGYuX3N0YXRzX2J1dHRvbixvbl9hY3RpdmF0ZV9jYWxsPWJhLkNhbGwoc2VsZi5vbl9zdGF0c19jbGljayxzZWxmLl9zdGF0c19idXR0b24scGFydHkpKQogICAgICAgICAgICBpZiBleGlzdGluZ19zZWxlY3Rpb24gPT0gU2VsZWN0aW9uKAogICAgICAgICAgICAgICAgICAgIHBhcnR5LmdldF9rZXkoKSwgU2VsZWN0aW9uQ29tcG9uZW50LlNUQVRTX0JVVFRPTik6CiAgICAgICAgICAgICAgICBiYS5jb250YWluZXJ3aWRnZXQoZWRpdD1jb2x1bW53aWRnZXQsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRfY2hpbGQ9c2VsZi5fc3RhdHNfYnV0dG9uKQoKICAgICAgICBzZWxmLl9zaXplX3dpZGdldCA9IGJhLnRleHR3aWRnZXQoCiAgICAgICAgICAgIHRleHQ9c3RyKHBhcnR5LnNpemUpICsgJy8nICsgc3RyKHBhcnR5LnNpemVfbWF4KSwKICAgICAgICAgICAgcGFyZW50PWNvbHVtbndpZGdldCwKICAgICAgICAgICAgc2l6ZT0oMCwgMCksCiAgICAgICAgICAgIHBvc2l0aW9uPShzdWJfc2Nyb2xsX3dpZHRoICogMC44NiArIGhwb3MsIDIwICsgdnBvcyksCiAgICAgICAgICAgIHNjYWxlPTAuNywKICAgICAgICAgICAgY29sb3I9KDAuOCwgMC44LCAwLjgpLAogICAgICAgICAgICBoX2FsaWduPSdyaWdodCcsCiAgICAgICAgICAgIHZfYWxpZ249J2NlbnRlcicpCgogICAgICAgIGlmIGluZGV4ID09IDA6CiAgICAgICAgICAgIGJhLndpZGdldChlZGl0PXNlbGYuX25hbWVfd2lkZ2V0LCB1cF93aWRnZXQ9ZmlsdGVyX3RleHQpCiAgICAgICAgICAgIGlmIHNlbGYuX3N0YXRzX2J1dHRvbjoKICAgICAgICAgICAgICAgIGJhLndpZGdldChlZGl0PXNlbGYuX3N0YXRzX2J1dHRvbiwgdXBfd2lkZ2V0PWZpbHRlcl90ZXh0KQoKICAgICAgICBzZWxmLl9waW5nX3dpZGdldCA9IGJhLnRleHR3aWRnZXQocGFyZW50PWNvbHVtbndpZGdldCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZT0oMCwgMCksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uPShzdWJfc2Nyb2xsX3dpZHRoICogMC45NCArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBocG9zLCAyMCArIHZwb3MpLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY2FsZT0wLjcsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhfYWxpZ249J3JpZ2h0JywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdl9hbGlnbj0nY2VudGVyJykKICAgICAgICBpZiBwYXJ0eS5waW5nIGlzIE5vbmU6CiAgICAgICAgICAgIGJhLnRleHR3aWRnZXQoZWRpdD1zZWxmLl9waW5nX3dpZGdldCwKICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0PSctJywKICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvcj0oMC41LCAwLjUsIDAuNSkpCiAgICAgICAgZWxzZToKICAgICAgICAgICAgYmEudGV4dHdpZGdldChlZGl0PXNlbGYuX3Bpbmdfd2lkZ2V0LAogICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ9c3RyKGludChwYXJ0eS5waW5nKSksCiAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I9KDAsIDEsIDApIGlmIHBhcnR5LnBpbmcgPD0gcGluZ19nb29kIGVsc2UKICAgICAgICAgICAgICAgICAgICAgICAgICAoMSwgMSwgMCkgaWYgcGFydHkucGluZyA8PSBwaW5nX21lZCBlbHNlICgxLCAwLCAwKSkKCiAgICAgICAgcGFydHkuY2xlYW5fZGlzcGxheV9pbmRleCA9IGluZGV4CmRlZiBfZ2V0X3BvcHVwX3dpbmRvd19zY2FsZSgpIC0+IGZsb2F0OgogICAgdWlzY2FsZSA9IGJhLmFwcC51aS51aXNjYWxlCiAgICByZXR1cm4oMi4zIGlmIHVpc2NhbGUgaXMgYmEuVUlTY2FsZS5TTUFMTCBlbHNlCiAgICAgICAgICAgICAgICAgICAxLjY1IGlmIHVpc2NhbGUgaXMgYmEuVUlTY2FsZS5NRURJVU0gZWxzZSAxLjIzKQoKX3BhcnR5PU5vbmUKZGVmIG9uX3N0YXRzX2NsaWNrKHNlbGYsd2lkZ2V0LHBhcnR5KToKCWdsb2JhbCBfcGFydHkKCV9wYXJ0eT1wYXJ0eQoJY2hvaWNlcz1bJ2Nvbm5lY3QnLCdjb3B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gICAgICAgICAgICBjaG9pY2U6IHN0cikgLT4gTm9uZToKICAgICAgICAiIiJDYWxsZWQgd2hlbiBhIG1lbnUgZW50cnkgaXMgc2VsZWN0ZWQuIiIiCiAgICAgICAgICAjIFVudXNlZCBhcmcuCiAgICAgICAgCiAgICAgICAgaWYgY2hvaWNlID09ICdzdGF0cyc6CiAgICAgICAgICAgIHVybCA9IF9wYXJ0eS5zdGF0c19hZGRyLnJlcGxhY2UoCiAgICAgICAgICAgICAgICAnJHtBQ0NPVU5UfScsCiAgICAgICAgICAgICAgICBfYmEuZ2V0X2FjY291bnRfbWlzY19yZWFkX3ZhbF8yKCdyZXNvbHZlZEFjY291bnRJRCcsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdVTktOT1dOJykpCiAgICAgICAgICAgIGJhLm9wZW5fdXJsKHVybCkKICAgICAgICBlbGlmIGNob2ljZSA9PSAnY29ubmVjdCc6CiAgICAgICAgICAgIAogICAgICAgICAgICBQYXJ0eVF1aWNrQ29ubmVjdChfcGFydHkuYWRkcmVzcyxfcGFydHkucG9ydCkKICAgICAgICBlbGlmIGNob2ljZSA9PSAnc2F2ZSc6CiAgICAgICAgICAgIGNvbmZpZyA9IGJhLmFwcC5jb25maWcKICAgICAgICAgICAgaXBfYWRkPV9wYXJ0eS5hZGRyZXNzCiAgICAgICAgICAgIHBfcG9ydD1fcGFydHkucG9ydAogICAgICAgICAgICB0aXRsZSA9IF9wYXJ0eS5uYW1lCiAgICAgICAgICAgIGlmIG5vdCBpc2luc3RhbmNlKGNvbmZpZy5nZXQoJ1NhdmVkIFNlcnZlcnMnKSwgZGljdCk6CiAgICAgICAgICAgICAgICBjb25maWdbJ1NhdmVkIFNlcnZlcnMnXSA9IHt9CiAgICAgICAgICAgIGNvbmZpZ1snU2F2ZWQgU2VydmVycyddW2Yne2lwX2FkZH1Ae3BfcG9ydH0nXSA9IHsKICAgICAgICAgICAgICAgICdhZGRyJzogaXBfYWRkLA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wYXJlbnQ9c2VsZi5fcm9vdF93aWRnZXQsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY2FsZT0xLjAsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbj0oNjAsIHNlbGYuX2hlaWdodCAtIDgwKSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemU9KDUwLCA1MCksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbD0nJywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uX2FjdGl2YXRlX2NhbGw9c2VsZi5jbG9zZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF1dG9zZWxlY3Q9VHJ1ZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yPSgwLjQ1LCAwLjYzLCAwLjE1KSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljb249YmEuZ2V0dGV4dHVyZSgnY3Jvc3NPdXQnKSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljb25zY2FsZT0xLjIpCiAgICAgICAgYmEuY29udGFpbmVyd2lkZ2V0KGVkaXQ9c2VsZi5fcm9vdF93aWRnZXQsCiAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbmNlbF9idXR0b249c2VsZi5fY2FuY2VsX2J1dHRvbikKICAgICAgICAKICAgICAgICBzZWxmLklQPWJhLnRleHR3aWRnZXQoCiAgICAgICAgICAgIHBhcmVudD1zZWxmLl9yb290X3dpZGdldCwKICAgICAgICAgICAgcG9zaXRpb249KHNlbGYuX3dpZHRoICogMC41LCBzZWxmLl9oZWlnaHQgKiAwLjU1ICs2MCksCiAgICAgICAgICAgIHNpemU9KDAsIDApLAogICAgICAgICAgICBjb2xvcj0oMS4wLCAzLjAsIDEuMCksCiAgICAgICAgICAgIHNjYWxlPTEuMywKICAgICAgICAgICAgaF9hbGlnbj0nY2VudGVyJywKICAgICAgICAgICAgdl9hbGlnbj0nY2VudGVyJywKICAgICAgICAgICAgdGV4dD0iSVA6ICIrYWRkcmVzcyArIiBQT1JUOiAiK3N0cihwb3J0KSwKICAgICAgICAgICAgbWF4d2lkdGg9c2VsZi5fd2lkdGggKiAwLjY1KQogICAgICAgIHNlbGYuX3RpdGxlX3RleHQgPSBiYS50ZXh0d2lkZ2V0KAogICAgICAgICAgICBwYXJlbnQ9c2VsZi5fcm9vdF93aWRnZXQsCiAgICAgICAgICAgIHBvc2l0aW9uPShzZWxmLl93aWR0aCAqIDAuNSwgc2VsZi5faGVpZ2h0ICogMC41NSksCiAgICAgICAgICAgIHNpemU9KDAsIDApLAogICAgICAgICAgICBjb2xvcj0oMS4wLCAzLjAsIDEuMCksCiAgICAgICAgICAgIHNjYWxlPTEuMywKICAgICAgICAgICAgaF9hbGlnbj0nY2VudGVyJywKICAgICAgICAgICAgdl9hbGlnbj0nY2VudGVyJywKICAgICAgICAgICAgdGV4dD0iUmV0cnlpbmcuLi4uIiwKICAgICAgICAgICAgbWF4d2lkdGg9c2VsZi5fd2lkdGggKiAwLjY1KQogICAgICAgIHNlbGYuX2xpbmVfaW1hZ2UgPSBiYS5pbWFnZXdpZGdldCgKICAgICAgICAgICAgICAgIHBhcmVudD1zZWxmLl9yb290X3dpZGdldCwKICAgICAgICAgICAgICAgIGNvbG9yPSgwLjAsIDAuMCwgMC4wKSwKICAgICAgICAgICAgICAgIG9wYWNpdHk9MC4yLAogICAgICAgICAgICAgICAgcG9zaXRpb249KDQwLjAsIDEyMCksCiAgICAgICAgICAgICAgICBzaXplPSg4MDAtMTkwKzgwLCA0LjApLAogICAgICAgICAgICAgICAgdGV4dHVyZT1zZWxmLl93aGl0ZV90ZXgpCiAgICAgICAgc2VsZi5kdWRlX3g9NjAKICAgICAgICBzZWxmLl9ib2R5X2ltYWdlX3RhcmdldCA9IGJhLmJ1dHRvbndpZGdldCgKICAgICAgICAgICAgICAgICAgICBwYXJlbnQ9c2VsZi5fcm9vdF93aWRnZXQsCiAgICAgICAgICAgICAgICAgICAgc2l6ZT0oMSogNjAsIDEgKiA4MCksCiAgICAgICAgICAgICAgICAgICAgY29sb3I9KHJhbmRvbS5yYW5kb20oKSxyYW5kb20ucmFuZG9tKCkscmFuZG9tLnJhbmRvbSgpKSwKICAgICAgICAgICAgICAgICAgICBsYWJlbD0nJywKICAgICAgICAgICAgICAgICAgICB0ZXh0dXJlPXNlbGYubGluZXVwX3RleCwKICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbj0oNDAsMTEwKSwKICAgICAgICAgICAgICAgICAgICBtb2RlbF90cmFuc3BhcmVudD1zZWxmLmxpbmV1cF8xX3RyYW5zcGFyZW50X21vZGVsKQogICAgICAgIHNlbGYuX2V5ZXNfaW1hZ2UgPSBiYS5pbWFnZXdpZGdldCgKICAgICAgICAgICAgICAgIHBhcmVudD1zZWxmLl9yb290X3dpZGdldCwKICAgICAgICAgICAgICAgIHNpemU9KDEgKiAzNiwgMSAqIDE4KSwKICAgICAgICAgICAgICAgIHRleHR1cmU9c2VsZi5saW5ldXBfdGV4LAogICAgICAgICAgICAgICAgY29sb3I9KDEsMSwxKSwKICAgICAgICAgICAgICAgIHBvc2l0aW9uPSg0MCwxNjUpLAogICAgICAgICAgICAgICAgbW9kZWxfdHJhbnNwYXJlbnQ9c2VsZi5leWVzX21vZGVsKQogICAgICAgICMgc2VsZi5fYm9keV9pbWFnZV90YXJnZXQyID0gYmEuaW1hZ2V3aWRnZXQoCiAgICAgICAgIyAgICAgICAgICAgICBwYXJlbnQ9c2VsZi5fcm9vdF93aWRnZXQsCiAgICAgICAgIyAgICAgICAgICAgICBzaXplPSgxKiA2MCwgMSAqIDgwKSwKICAgICAgICAjICAgICAgICAgICAgIGNvbG9yPSgxLD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D01MDoKICAgIAkJCXNlbGYuZGlyZWN0aW9uPSJyaWdodCIKCiAgICAJCiAgICAgICAgCiAgICBkZWYgY29ubmVjdChzZWxmLGFkZHJlc3MscG9ydCk6CiAgICAgICAgCiAgICAgICAgaWYgbm90IHNlbGYuY2xvc2VkIGFuZCAoX2JhLmdldF9jb25uZWN0aW9uX3RvX2hvc3RfaW5mbygpPT17fSBvciBfYmEuZ2V0X2Nvbm5lY3Rpb25fdG9faG9zdF9pbmZvKClbJ2J1aWxkX251bWJlciddPT0wKToKICAgICAgICAgICAgICAgIGJhLnRleHR3aWRnZXQoZWRpdD1zZWxmLl90aXRsZV90ZXh0LHRleHQ9IlJldHJ5aW5nLi4uLigiK3N0cihzZWxmLnJldHJ5X2NvdW50KSsiKSIpCiAgICAgICAgICAgICAgICBzZWxmLnJldHJ5X2NvdW50ICs9MQogICAgICAgICAgICAgICAgX2JhLmNvbm5lY3RfdG9fcGFydHkoYWRkcmVzcywgcG9ydD1wb3J0KQogICAgICAgICAgICAgICAgc2VsZi5fcmV0cnlfdGltZXIgPSBiYS5UaW1lcigxLjUsYmEuQ2FsbChzZWxmLmNvbm5lY3QsYWRkcmVzcyxwb3J0KSx0aW1ldHlwZSA9IGJhLlRpbWVUeXBlLlJFQUwpCiAgICBkZWYgY2xvc2Uoc2VsZikgLT4gTm9uZToKICAgICAgICAiIiJDbG9zZSB0aGUgdWkuIiIiCiAgICAgICAgc2VsZi5jbG9zZWQ9VHJ1ZQogICAgICAgIGJhLmNvbnRhaW5lcndpZGdldChlZGl0PXNlbGYuX3Jvb3Rfd2lkZ2V0LCB0cmFuc2l0aW9uPSdvdXRfc2NhbGUnKQoK"))
# ba_meta export plugin
class bySmoothy(ba.Plugin):
def __init__(self):
if _ba.env().get("build_number",0) >= 20327:
replace()
else:print("EasyConnect only runs with BombSquad version higer than or equal to 1.6")
# SHARING IS CARING :)