zscams 2.0.1__py2.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 (37) hide show
  1. zscams/__init__.py +0 -0
  2. zscams/__main__.py +101 -0
  3. zscams/agent/__init__.py +0 -0
  4. zscams/agent/certificates/.gitkeep +0 -0
  5. zscams/agent/config.yaml +121 -0
  6. zscams/agent/keys/autoport.key +27 -0
  7. zscams/agent/src/__init__.py +0 -0
  8. zscams/agent/src/core/__init__.py +1 -0
  9. zscams/agent/src/core/api/backend/bootstrap.py +21 -0
  10. zscams/agent/src/core/api/backend/client.py +242 -0
  11. zscams/agent/src/core/api/backend/exceptions.py +10 -0
  12. zscams/agent/src/core/api/backend/update_machine_info.py +16 -0
  13. zscams/agent/src/core/prerequisites.py +36 -0
  14. zscams/agent/src/core/service_health_check.py +49 -0
  15. zscams/agent/src/core/services.py +86 -0
  16. zscams/agent/src/core/tunnel/__init__.py +144 -0
  17. zscams/agent/src/core/tunnel/tls.py +56 -0
  18. zscams/agent/src/core/tunnels.py +55 -0
  19. zscams/agent/src/services/__init__.py +0 -0
  20. zscams/agent/src/services/reverse_ssh.py +73 -0
  21. zscams/agent/src/services/ssh_forwarder.py +75 -0
  22. zscams/agent/src/services/system_monitor.py +264 -0
  23. zscams/agent/src/support/__init__.py +0 -0
  24. zscams/agent/src/support/configuration.py +53 -0
  25. zscams/agent/src/support/filesystem.py +41 -0
  26. zscams/agent/src/support/logger.py +40 -0
  27. zscams/agent/src/support/mac.py +18 -0
  28. zscams/agent/src/support/network.py +49 -0
  29. zscams/agent/src/support/openssl.py +100 -0
  30. zscams/libs/getmac/__init__.py +3 -0
  31. zscams/libs/getmac/__main__.py +123 -0
  32. zscams/libs/getmac/getmac.py +1900 -0
  33. zscams/libs/getmac/shutilwhich.py +67 -0
  34. zscams-2.0.1.dist-info/METADATA +118 -0
  35. zscams-2.0.1.dist-info/RECORD +37 -0
  36. zscams-2.0.1.dist-info/WHEEL +4 -0
  37. zscams-2.0.1.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,67 @@
1
+ # -*- coding: utf-8 -*-
2
+ # This is a stopgap to maintain Python 2.7 support for the 0.9.0 release.
3
+ #
4
+ # Code copied from the "shutilwhich" project by Marc Brinkmann (@mbr)
5
+ # Source: https://github.com/mbr/shutilwhich
6
+ #
7
+ # We can't depend on it in setup.py since getmac has the __version__,
8
+ # which is imported in setup.py, which requires shutilwhich to be installed,
9
+ # leading to the typical problem: which came first, the Python or the Egg? :)
10
+ import os
11
+ import sys
12
+
13
+
14
+ # Everything below this point has been copied verbatim from the Python-3.3
15
+ # sources.
16
+ def which(cmd, mode=os.F_OK | os.X_OK, path=None):
17
+ """Given a command, mode, and a PATH string, return the path which
18
+ conforms to the given mode on the PATH, or None if there is no such
19
+ file.
20
+
21
+ `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
22
+ of os.environ.get("PATH"), or can be overridden with a custom search
23
+ path.
24
+
25
+ """
26
+
27
+ # Check that a given file can be accessed with the correct mode.
28
+ # Additionally check that `file` is not a directory, as on Windows
29
+ # directories pass the os.access check.
30
+ def _access_check(fn, mode):
31
+ return os.path.exists(fn) and os.access(fn, mode) and not os.path.isdir(fn)
32
+
33
+ # Short circuit. If we're given a full path which matches the mode
34
+ # and it exists, we're done here.
35
+ if _access_check(cmd, mode):
36
+ return cmd
37
+
38
+ path = (path or os.environ.get("PATH", os.defpath)).split(os.pathsep)
39
+
40
+ if sys.platform == "win32":
41
+ # The current directory takes precedence on Windows.
42
+ if os.curdir not in path:
43
+ path.insert(0, os.curdir)
44
+
45
+ # PATHEXT is necessary to check on Windows.
46
+ pathext = os.environ.get("PATHEXT", "").split(os.pathsep)
47
+ # See if the given file matches any of the expected path extensions.
48
+ # This will allow us to short circuit when given "python.exe".
49
+ matches = [cmd for ext in pathext if cmd.lower().endswith(ext.lower())]
50
+ # If it does match, only test that one, otherwise we have to try
51
+ # others.
52
+ files = [cmd] if matches else [cmd + ext.lower() for ext in pathext]
53
+ else:
54
+ # On other platforms you don't have things like PATHEXT to tell you
55
+ # what file suffixes are executable, so just pass on cmd as-is.
56
+ files = [cmd]
57
+
58
+ seen = set()
59
+ for dir in path:
60
+ dir = os.path.normcase(dir)
61
+ if dir not in seen:
62
+ seen.add(dir)
63
+ for thefile in files:
64
+ name = os.path.join(dir, thefile)
65
+ if _access_check(name, mode):
66
+ return name
67
+ return None
@@ -0,0 +1,118 @@
1
+ Metadata-Version: 2.1
2
+ Name: zscams
3
+ Version: 2.0.1
4
+ Summary: Async TLS tunnel client with SNI routing, auto-reconnect, and health checks
5
+ Author: OCD - Cairo Software Team
6
+ Maintainer: OCD - Cairo Software Team
7
+ Classifier: Programming Language :: Python :: 2
8
+ Classifier: Programming Language :: Python :: 2.7
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.4
11
+ Classifier: Programming Language :: Python :: 3.5
12
+ Classifier: Programming Language :: Python :: 3.6
13
+ Classifier: Programming Language :: Python :: 3.7
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Requires-Dist: PyYAML
21
+ Requires-Dist: cryptography
22
+ Requires-Dist: psutil
23
+ Description-Content-Type: text/markdown
24
+
25
+ # Agent
26
+
27
+
28
+
29
+ ## Getting started
30
+
31
+ To make it easy for you to get started with GitLab, here's a list of recommended next steps.
32
+
33
+ Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
34
+
35
+ ## Add your files
36
+
37
+ - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
38
+ - [ ] [Add files using the command line](https://docs.gitlab.com/topics/git/add_files/#add-files-to-a-git-repository) or push an existing Git repository with the following command:
39
+
40
+ ```
41
+ cd existing_repo
42
+ git remote add origin https://gitlab.tech.orange/cairo-engineering-software-team/zscams/agent.git
43
+ git branch -M main
44
+ git push -uf origin main
45
+ ```
46
+
47
+ ## Integrate with your tools
48
+
49
+ - [ ] [Set up project integrations](https://gitlab.tech.orange/cairo-engineering-software-team/zscams/agent/-/settings/integrations)
50
+
51
+ ## Collaborate with your team
52
+
53
+ - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
54
+ - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
55
+ - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
56
+ - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
57
+ - [ ] [Set auto-merge](https://docs.gitlab.com/user/project/merge_requests/auto_merge/)
58
+
59
+ ## Test and Deploy
60
+
61
+ Use the built-in continuous integration in GitLab.
62
+
63
+ - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/)
64
+ - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
65
+ - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
66
+ - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
67
+ - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
68
+
69
+ ***
70
+
71
+ # Editing this README
72
+
73
+ When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
74
+
75
+ ## Suggestions for a good README
76
+
77
+ Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
78
+
79
+ ## Name
80
+ Choose a self-explaining name for your project.
81
+
82
+ ## Description
83
+ Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
84
+
85
+ ## Badges
86
+ On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
87
+
88
+ ## Visuals
89
+ Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
90
+
91
+ ## Installation
92
+ Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
93
+
94
+ ## Usage
95
+ Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
96
+
97
+ ## Support
98
+ Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
99
+
100
+ ## Roadmap
101
+ If you have ideas for releases in the future, it is a good idea to list them in the README.
102
+
103
+ ## Contributing
104
+ State if you are open to contributions and what your requirements are for accepting them.
105
+
106
+ For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
107
+
108
+ You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
109
+
110
+ ## Authors and acknowledgment
111
+ Show your appreciation to those who have contributed to the project.
112
+
113
+ ## License
114
+ For open source projects, say how it is licensed.
115
+
116
+ ## Project status
117
+ If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
118
+
@@ -0,0 +1,37 @@
1
+ zscams/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ zscams/__main__.py,sha256=gawDyVPTo-ef-7IStyvS93Ch9cCmGxdhkvc-rBxq8sg,3105
3
+ zscams/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ zscams/agent/certificates/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ zscams/agent/config.yaml,sha256=6_nYDe0CuOxcCdYWWnoA7kZiPLLhK504QyoaaVuZ7z4,3556
6
+ zscams/agent/keys/autoport.key,sha256=hZBmtw_nLsZwe11LYlwLL-P_blQ_qpUDpFwvqOZDZFE,1679
7
+ zscams/agent/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ zscams/agent/src/core/__init__.py,sha256=CEDwvbxojtNZOfOOFBj-URg4Q0KB0cq9AqIiD0uzPic,24
9
+ zscams/agent/src/core/api/backend/bootstrap.py,sha256=MJ1ceskHmlRpan1Oj6nN2HQdMuwwSxNWCUPPsCXcmNs,667
10
+ zscams/agent/src/core/api/backend/client.py,sha256=0vjLOUXEMrrPERPKGsan8LzjQICIDsTKDbcGVrPBWGY,8542
11
+ zscams/agent/src/core/api/backend/exceptions.py,sha256=osMbVb_ZGvrGbw5cOCMG1s4yBLukJl7T8TITCcVPyXA,383
12
+ zscams/agent/src/core/api/backend/update_machine_info.py,sha256=9s2lmTwXqSJPrOq46ZUFHQ3dcOGZ45wzk11gLYJKA20,478
13
+ zscams/agent/src/core/prerequisites.py,sha256=LNPjDj2AQhZ3xBiLDNurG2osBTjepcU6tzDIm5PT_GA,1159
14
+ zscams/agent/src/core/service_health_check.py,sha256=9VUWQitXcDEwLcHTTeequi6om98OXN-JIIMZCCH5y4A,1733
15
+ zscams/agent/src/core/services.py,sha256=GvAYODh1Pg_FatnZO_8iqReiIeBfq7Hfwj9zxlXYm-0,2840
16
+ zscams/agent/src/core/tunnel/__init__.py,sha256=BvJmqtjliO-UvmEguOwky8KSGLY_w8xqM67Q3v2_jc0,4658
17
+ zscams/agent/src/core/tunnel/tls.py,sha256=EIRR7aLq6BkW6jUVseM1YCqm7E_UDVSQ9CffQri2U6U,2006
18
+ zscams/agent/src/core/tunnels.py,sha256=FwYi9cV3V7c_su5cEgXmyNdr8VyfCBKzU5olvi2MzBw,1736
19
+ zscams/agent/src/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
+ zscams/agent/src/services/reverse_ssh.py,sha256=-q9RJwyUvzSDftP7NNSmfHJHbx-2vmYrMy9KEjUmlyU,2081
21
+ zscams/agent/src/services/ssh_forwarder.py,sha256=BZ7-9i2YxdxtVfaxu5JDkwhFyNKDruIkph10bT6Ms-g,2223
22
+ zscams/agent/src/services/system_monitor.py,sha256=7VeSYHbr1Lv8tGVg0AMMd5_o7EgMGuRDlxJjxpGM27g,7529
23
+ zscams/agent/src/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
+ zscams/agent/src/support/configuration.py,sha256=gipsCDDjHH-ncxEURcu5b_ws4wmq9R58sRL-Fgx2O_Y,939
25
+ zscams/agent/src/support/filesystem.py,sha256=Cts8Sx1mr5Ndd15K9OQpvgAMgylBtZDUZIQtGibK7qI,962
26
+ zscams/agent/src/support/logger.py,sha256=lDkj-eTCdOlhyYO-ySH9UT_C4xh9S_jyMWM51N4i0xI,931
27
+ zscams/agent/src/support/mac.py,sha256=tCn6kB4m0VfrrQ04JEZrgOPEngLEZd5vDPdVdtFtvcg,465
28
+ zscams/agent/src/support/network.py,sha256=VwVVNqykZxvrTPwPYQ3sSVMc_Z2XUwASlo_kd_wdGDs,1453
29
+ zscams/agent/src/support/openssl.py,sha256=_Rd76Y2168hkLjeQlC7alvjUoWbiUWBum4yVpEfmVfw,3399
30
+ zscams/libs/getmac/__init__.py,sha256=iunkDFEtpGaRw1Y0lzr9OZ7LsZ-GH81E836ZJQC25Vg,80
31
+ zscams/libs/getmac/__main__.py,sha256=PTkcTMZSbvJ-qwMyVuo-Bf-RKI47y7Kwxqroo92EVS4,3547
32
+ zscams/libs/getmac/getmac.py,sha256=bFYx0WNBojEtNbIWKfNMm4mWI1Q2YLOx67Qluhs-fWU,64504
33
+ zscams/libs/getmac/shutilwhich.py,sha256=cTd3vGTZqKB44FOQhk7UG5M-Vb3qKg9HmuIy6hxkus0,2627
34
+ zscams-2.0.1.dist-info/METADATA,sha256=DX3VqzEC6Z32uJbOocIgiyEBYQg3k-YSn_CoF9uJt14,7156
35
+ zscams-2.0.1.dist-info/WHEEL,sha256=iAMR_6Qh95yyjYIwRxyjpiFq4FhDPemrEV-SyWIQB3U,92
36
+ zscams-2.0.1.dist-info/entry_points.txt,sha256=IXiMYjEq4q0tUiD9O7eCWhqKBuOssXrMW42siTBAgG8,47
37
+ zscams-2.0.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 1.9.1
3
+ Root-Is-Purelib: true
4
+ Tag: py2.py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ zscams=zscams.__main__:main
3
+