pyntcli 0.1.100__py3-none-any.whl → 0.1.101__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.
- pyntcli/__init__.py +1 -1
- pyntcli/commands/har.py +1 -1
- pyntcli/commands/newman.py +1 -1
- pyntcli/commands/postman.py +1 -1
- pyntcli/pynt_docker/pynt_container.py +11 -6
- {pyntcli-0.1.100.dist-info → pyntcli-0.1.101.dist-info}/METADATA +1 -2
- {pyntcli-0.1.100.dist-info → pyntcli-0.1.101.dist-info}/RECORD +10 -10
- {pyntcli-0.1.100.dist-info → pyntcli-0.1.101.dist-info}/WHEEL +0 -0
- {pyntcli-0.1.100.dist-info → pyntcli-0.1.101.dist-info}/entry_points.txt +0 -0
- {pyntcli-0.1.100.dist-info → pyntcli-0.1.101.dist-info}/top_level.txt +0 -0
pyntcli/__init__.py
CHANGED
pyntcli/commands/har.py
CHANGED
|
@@ -61,7 +61,7 @@ class HarSubCommand(sub_command.PyntSubCommand):
|
|
|
61
61
|
container_config = pynt_container.DockerContainerConfig(
|
|
62
62
|
args,
|
|
63
63
|
"har",
|
|
64
|
-
pynt_container.PyntDockerPort(src=
|
|
64
|
+
pynt_container.PyntDockerPort(src=port, dest=PYNT_CONTAINER_INTERNAL_PORT, name="--port")
|
|
65
65
|
)
|
|
66
66
|
|
|
67
67
|
if not os.path.isfile(args.har):
|
pyntcli/commands/newman.py
CHANGED
|
@@ -60,7 +60,7 @@ class NewmanSubCommand(sub_command.PyntSubCommand):
|
|
|
60
60
|
container_config = pynt_container.DockerContainerConfig(
|
|
61
61
|
args,
|
|
62
62
|
"newman",
|
|
63
|
-
pynt_container.PyntDockerPort(src=
|
|
63
|
+
pynt_container.PyntDockerPort(src=port, dest=PYNT_CONTAINER_INTERNAL_PORT, name="--port")
|
|
64
64
|
)
|
|
65
65
|
|
|
66
66
|
if not os.path.isfile(args.collection):
|
pyntcli/commands/postman.py
CHANGED
|
@@ -98,7 +98,7 @@ class PostmanSubCommand(sub_command.PyntSubCommand):
|
|
|
98
98
|
container_config = pynt_container.DockerContainerConfig(
|
|
99
99
|
args,
|
|
100
100
|
"postman",
|
|
101
|
-
pynt_container.PyntDockerPort(
|
|
101
|
+
pynt_container.PyntDockerPort(args.port, PYNT_CONTAINER_INTERNAL_PORT, name="--port"))
|
|
102
102
|
|
|
103
103
|
postman_docker = pynt_container.PyntContainerNative(container_config)
|
|
104
104
|
postman_docker.prepare_client()
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import platform
|
|
2
2
|
import subprocess
|
|
3
|
-
from docker.types import Mount
|
|
4
3
|
import os
|
|
5
4
|
import json
|
|
6
5
|
import argparse
|
|
@@ -21,7 +20,13 @@ PYNT_CONTAINER_INTERNAL_PORT = "5001"
|
|
|
21
20
|
|
|
22
21
|
|
|
23
22
|
def create_mount(src, destination, mount_type="bind"):
|
|
24
|
-
return
|
|
23
|
+
return {
|
|
24
|
+
'Target': destination,
|
|
25
|
+
'Source': src,
|
|
26
|
+
'Type': mount_type,
|
|
27
|
+
'ReadOnly': False,
|
|
28
|
+
'NoCopy': False,
|
|
29
|
+
}
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
class DockerNotAvailableException(Exception):
|
|
@@ -188,7 +193,7 @@ def get_docker_mounts(args: argparse.Namespace) -> list:
|
|
|
188
193
|
class PyntContainerNative:
|
|
189
194
|
def __init__(self, container_config: DockerContainerConfig):
|
|
190
195
|
self.config = container_config
|
|
191
|
-
self.container_name = ""
|
|
196
|
+
self.container_name = "pynt_engine"
|
|
192
197
|
self.system = platform.system().lower()
|
|
193
198
|
self.stdout = None
|
|
194
199
|
self.running = False
|
|
@@ -216,7 +221,7 @@ class PyntContainerNative:
|
|
|
216
221
|
|
|
217
222
|
self.fetch_and_validate_image()
|
|
218
223
|
args = self.config.docker_arguments if self.config.docker_arguments else None
|
|
219
|
-
docker_command = ["docker", "run", "-d"]
|
|
224
|
+
docker_command = ["docker", "run", "--rm", "-d", "--name", self.container_name]
|
|
220
225
|
|
|
221
226
|
mounts = []
|
|
222
227
|
for mount in self.config.mounts:
|
|
@@ -270,7 +275,7 @@ class PyntContainerNative:
|
|
|
270
275
|
ui_thread.print_verbose("Killing other pynt containers if such exist")
|
|
271
276
|
try:
|
|
272
277
|
for _ in IMAGE_TAGS:
|
|
273
|
-
command = ["docker", "ps", "-q", "-f", f"
|
|
278
|
+
command = ["docker", "ps", "-q", "-f", f"name={self.container_name}"]
|
|
274
279
|
containers_output = subprocess.check_output(command, text=True)
|
|
275
280
|
if not containers_output:
|
|
276
281
|
continue
|
|
@@ -293,7 +298,7 @@ class PyntContainerNative:
|
|
|
293
298
|
pull_command = ['docker', 'pull', self.config.image.name]
|
|
294
299
|
get_image_command = ['docker', 'images', '-q', f'{self.config.image.name}']
|
|
295
300
|
pull_process = subprocess.Popen(pull_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
296
|
-
|
|
301
|
+
_, pull_stderr = pull_process.communicate()
|
|
297
302
|
get_process = subprocess.Popen(get_image_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
298
303
|
get_stdout, _ = get_process.communicate()
|
|
299
304
|
local_image_id = get_stdout.decode('utf-8')
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyntcli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.101
|
|
4
4
|
Summary: Command line utility to handle all of Pynt's different integrations
|
|
5
5
|
Author-email: Pynt-io <support@pynt.io>
|
|
6
6
|
Project-URL: Homepage, https://pynt.io
|
|
7
7
|
Requires-Python: >=3.7
|
|
8
|
-
Requires-Dist: docker
|
|
9
8
|
Requires-Dist: rich
|
|
10
9
|
Requires-Dist: requests==2.31.0
|
|
11
10
|
Requires-Dist: pem
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
ignoreTests/conftest.py,sha256=gToq5K74GtgeGQXjFvXSzMaE6axBYxAzcFG5XJPOXjI,427
|
|
2
2
|
ignoreTests/auth/login.py,sha256=KFlzWhXBAuwdi7GXf16gCB3ya94LQG2wjcSChE149rQ,3798
|
|
3
3
|
ignoreTests/store/cred_store.py,sha256=_7-917EtNC9eKEumO2_lt-7KuDmCwOZFaowCm7DbA_A,254
|
|
4
|
-
pyntcli/__init__.py,sha256
|
|
4
|
+
pyntcli/__init__.py,sha256=QzGQWEX3yxu6r8-t7XWvYoCSv5J8shJ6psVFM2wOqZ8,403
|
|
5
5
|
pyntcli/main.py,sha256=WEbWyqzDjtnZGSWgqru1FCT7wmHdi11uzd1LmwTTCI4,6095
|
|
6
6
|
pyntcli/analytics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
pyntcli/analytics/send.py,sha256=9TRAEoPbv4rWOZfcNaGanrRJAFvNs39P-uKSl49GcQE,3679
|
|
@@ -10,11 +10,11 @@ pyntcli/auth/login.py,sha256=TljsRXbEkNI1YUrKm5mlTw4YiecYScYUsit8Z8vstss,5228
|
|
|
10
10
|
pyntcli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
pyntcli/commands/burp.py,sha256=5lZKSDHJvmVNvxEkQPKQ4lNx8pSzEK-rTHhSvn-ZBtY,12253
|
|
12
12
|
pyntcli/commands/command.py,sha256=7x5eGXGz1rHtAy-Shdh3KLIqQ7TVAZEKd5DiKaCLOSQ,10998
|
|
13
|
-
pyntcli/commands/har.py,sha256=
|
|
13
|
+
pyntcli/commands/har.py,sha256=NJ_xnx6ONwHXWEr1PQ8julW3IHfBFtifSAIzHtVGyKg,4329
|
|
14
14
|
pyntcli/commands/id_command.py,sha256=UBEgMIpm4vauTCsKyixltiGUolNg_OfHEJvJ_i5BpJY,943
|
|
15
15
|
pyntcli/commands/listen.py,sha256=oxgMvJYpPEu6h8qRFoueGF3a_nmwzaWMPL8ucfy7yxE,8983
|
|
16
|
-
pyntcli/commands/newman.py,sha256=
|
|
17
|
-
pyntcli/commands/postman.py,sha256=
|
|
16
|
+
pyntcli/commands/newman.py,sha256=MuY_y0-UGMATXbe2rAHVzq40TfQWLecN9_F2ulvZolw,5173
|
|
17
|
+
pyntcli/commands/postman.py,sha256=u7LFpsxs8kcraZMY_iDAfNPOCfg1ZrfQlXURbW1dCYg,4971
|
|
18
18
|
pyntcli/commands/pynt_cmd.py,sha256=T7jee0yw67Zth3lTkSDInCLnbu_IhpNqb7GqnTiTceQ,7012
|
|
19
19
|
pyntcli/commands/root.py,sha256=6dSzKSjUX-ZetE2KYJNkBmfDDrcYJligmHBqIAIc2aQ,4140
|
|
20
20
|
pyntcli/commands/static_file_extensions.py,sha256=PZJb02BI-64tbU-j3rdCNsXzTh7gkIDGxGKbKNw3h5k,1995
|
|
@@ -24,7 +24,7 @@ pyntcli/log/__init__.py,sha256=cOGwOYzMoshEbZiiasBGkj6wF0SBu3Jdpl-AuakDesw,19
|
|
|
24
24
|
pyntcli/log/log.py,sha256=cWCdWmUaAwePwdhYDcgNMEG9d9RM34sGahxBCYEdv2Y,1069
|
|
25
25
|
pyntcli/pynt_docker/__init__.py,sha256=PQIOVxc7XXtMLfEX7ojgwf_Z3mmTllO3ZvzUZTPOxQY,30
|
|
26
26
|
pyntcli/pynt_docker/container_utils.py,sha256=_Onn7loInzyJAG2-Uk6CGpsuRyelmUFHOvtJj4Uzi9A,175
|
|
27
|
-
pyntcli/pynt_docker/pynt_container.py,sha256=
|
|
27
|
+
pyntcli/pynt_docker/pynt_container.py,sha256=RoRn_prg-0xcg3H8aRV5psUsmYoM6j-4Ri7DonPFjVM,13215
|
|
28
28
|
pyntcli/store/__init__.py,sha256=1fP8cEAQCF_myja3gnhHH9FEqtBiOJ-2aBmUXSKBdFA,41
|
|
29
29
|
pyntcli/store/json_connector.py,sha256=UGs3uORw3iyn0YJ8kzab-veEZToA6d-ByXYuqEleWsA,560
|
|
30
30
|
pyntcli/store/store.py,sha256=ZLSe0WAjHDp8cSt4BBFDkPGRux4cgOo5UfF7V4naM7U,2559
|
|
@@ -39,8 +39,8 @@ pyntcli/ui/report.py,sha256=W-icPSZrGLOubXgam0LpOvHLl_aZg9Zx9qIkL8Ym5PE,1930
|
|
|
39
39
|
pyntcli/ui/ui_thread.py,sha256=XUBgLpYQjVhrilU-ofw7VSXgTiwneSdTxm61EvC3x4Q,5091
|
|
40
40
|
tests/test_utils.py,sha256=t5fTQUk1U_Js6iMxcGYGqt4C-crzOJ0CqCKtLkRtUi0,2050
|
|
41
41
|
tests/commands/test_pynt_cmd.py,sha256=BjGFCFACcSziLrNA6_27t6TjSmvdu54wx9njwLpRSJY,8379
|
|
42
|
-
pyntcli-0.1.
|
|
43
|
-
pyntcli-0.1.
|
|
44
|
-
pyntcli-0.1.
|
|
45
|
-
pyntcli-0.1.
|
|
46
|
-
pyntcli-0.1.
|
|
42
|
+
pyntcli-0.1.101.dist-info/METADATA,sha256=xU3ZbcTk4XwPMDcuJcy7Io715m1xc4soqJEImm7loTQ,472
|
|
43
|
+
pyntcli-0.1.101.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
44
|
+
pyntcli-0.1.101.dist-info/entry_points.txt,sha256=kcGmqAxXDttNk2EPRcqunc_LTVp61gzakz0v-GEE2SY,43
|
|
45
|
+
pyntcli-0.1.101.dist-info/top_level.txt,sha256=64XSgBzSpgwjYjEKHZE7q3JH2a816zEeyZBXfJi3AKI,42
|
|
46
|
+
pyntcli-0.1.101.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|