pyntcli 0.1.117__py3-none-any.whl → 0.1.119__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 CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.117"
1
+ __version__ = "0.1.119"
@@ -4,15 +4,13 @@ import os
4
4
  import webbrowser
5
5
  from http import HTTPStatus
6
6
  import time
7
- import tempfile
8
- import json
9
7
  from subprocess import Popen, PIPE
10
8
  from functools import partial
11
9
 
10
+ from pyntcli.commands.util import build_scan_details_url
12
11
  from pyntcli.pynt_docker import pynt_container
13
12
  from pyntcli.ui import ui_thread
14
13
  from pyntcli.commands import util, sub_command
15
- from pyntcli.ui import report as cli_reporter
16
14
  from pyntcli.transport import pynt_requests
17
15
 
18
16
 
@@ -50,10 +48,6 @@ def command_usage():
50
48
  class CommandSubCommand(sub_command.PyntSubCommand):
51
49
  def __init__(self, name) -> None:
52
50
  super().__init__(name)
53
- self.scan_id = ""
54
- self.proxy_sleep_interval = 2
55
- self.proxy_healthcheck_buffer = 10
56
- self.proxy_server_base_url = "http://localhost:{}/api"
57
51
 
58
52
  def print_usage(self, *args):
59
53
  ui_thread.print(command_usage())
@@ -98,7 +92,8 @@ class CommandSubCommand(sub_command.PyntSubCommand):
98
92
  env_copy.update(
99
93
  {
100
94
  "http_proxy": "http://localhost:{}".format(args.proxy_port),
101
- "https_proxy": "http://localhost:{}".format(args.proxy_port)
95
+ "https_proxy": "http://localhost:{}".format(args.proxy_port),
96
+ "JAVA_TOOL_OPTIONS": "-Dhttp.proxyHost=localhost -Dhttp.proxyPort={} -Dhttps.proxyHost=localhost -Dhttps.proxyPort={}".format(args.proxy_port, args.proxy_port),
102
97
  }
103
98
  )
104
99
  return env_copy
@@ -122,27 +117,6 @@ class CommandSubCommand(sub_command.PyntSubCommand):
122
117
  time.sleep(self.proxy_sleep_interval)
123
118
  raise TimeoutError()
124
119
 
125
- def _get_report(self, args, report_format):
126
- while True:
127
- res = pynt_requests.get(
128
- self.proxy_server_base_url.format(args.port)
129
- + "/report?format={}".format(report_format),
130
- params={"scanId": self.scan_id},
131
- )
132
- if res.status_code == HTTPStatus.OK:
133
- return res.text
134
- if res.status_code == HTTPStatus.ACCEPTED:
135
- time.sleep(self.proxy_sleep_interval)
136
- continue
137
- if res.status_code == 517: # pynt did not recieve any requests
138
- ui_thread.print(
139
- ui_thread.PrinterText(
140
- res.json()["message"], ui_thread.PrinterText.WARNING
141
- )
142
- )
143
- return
144
- ui_thread.print("Error in polling for scan report: {}".format(res.text))
145
- return
146
120
 
147
121
  def run_cmd(self, args: argparse.Namespace):
148
122
  container_config = pynt_container.DockerContainerConfig(
@@ -230,34 +204,13 @@ class CommandSubCommand(sub_command.PyntSubCommand):
230
204
  "scan in progress...",
231
205
  100,
232
206
  ):
233
- html_report = self._get_report(args, "html")
234
- html_report_path = os.path.join(
235
- tempfile.gettempdir(), "pynt_report_{}.html".format(int(time.time()))
236
- )
237
-
238
- json_report = self._get_report(args, "json")
239
- json_report_path = os.path.join(
240
- tempfile.gettempdir(), "pynt_report_{}.json".format(int(time.time()))
241
- )
207
+ app_id = self.get_app_id(args.port, self.scan_id)
208
+ scan_details_url = build_scan_details_url(self.scan_id, app_id)
209
+ html_report_path = self.handle_html_report(args) # this also indicates that the scan is done
242
210
 
243
- if "report" in args and args.report:
244
- full_path = os.path.abspath(args.report)
245
- html_report_path = util.get_user_report_path(full_path, "html")
246
- json_report_path = util.get_user_report_path(full_path, "json")
247
-
248
- if html_report:
249
- with open(html_report_path, "w", encoding="utf-8") as html_file:
250
- html_file.write(html_report)
251
- webbrowser.open("file://{}".format(html_report_path))
252
-
253
- if json_report:
254
- with open(json_report_path, "w", encoding="utf-8") as json_file:
255
- json_file.write(json_report)
256
- reporter = cli_reporter.PyntReporter(json_report_path)
257
- reporter.print_summary()
211
+ if scan_details_url:
212
+ webbrowser.open(scan_details_url)
213
+ else:
214
+ webbrowser.open("file://{}".format(html_report_path))
258
215
 
259
- if json_report:
260
- json_obj = json.loads(json_report)
261
- if json_obj:
262
- util.check_for_findings_or_warnings(args, json_obj)
263
- util.check_severity(args.severity_level, json_obj)
216
+ self.handle_json_report(args)
pyntcli/commands/har.py CHANGED
@@ -2,10 +2,9 @@ import argparse
2
2
  import time
3
3
  import os
4
4
  from functools import partial
5
-
5
+ import webbrowser
6
6
  from pyntcli.pynt_docker import pynt_container
7
7
  from pyntcli.ui import ui_thread
8
- from pyntcli.ui.progress import PyntProgress
9
8
  from pyntcli.commands import sub_command, util
10
9
 
11
10
 
@@ -116,11 +115,22 @@ class HarSubCommand(sub_command.PyntSubCommand):
116
115
 
117
116
  ui_thread.print_generator(har_docker.stdout)
118
117
 
118
+ scan_details_url = ""
119
119
  with ui_thread.progress(
120
120
  "ws://localhost:{}/progress".format(port),
121
121
  healthcheck,
122
122
  "scan in progress...",
123
123
  100,
124
124
  ):
125
+ scan_details_url = self.get_scan_details_url(port)
125
126
  while har_docker.is_alive():
126
127
  time.sleep(1)
128
+
129
+ if scan_details_url:
130
+ webbrowser.open(scan_details_url)
131
+ else:
132
+ ui_thread.print(ui_thread.PrinterText(
133
+ "Could not get report url",
134
+ ui_thread.PrinterText.WARNING,
135
+ ))
136
+ util.open_report_from_file()
@@ -1,18 +1,14 @@
1
1
  import argparse
2
- from copy import deepcopy
3
2
  import os
4
3
  import webbrowser
5
4
  from http import HTTPStatus
6
5
  import time
7
- import tempfile
8
- import json
9
- from subprocess import Popen, PIPE
10
6
  from functools import partial
11
7
 
8
+ from pyntcli.commands.util import build_scan_details_url
12
9
  from pyntcli.pynt_docker import pynt_container
13
10
  from pyntcli.ui import ui_thread
14
11
  from pyntcli.commands import util, sub_command
15
- from pyntcli.ui import report as cli_reporter
16
12
  from pyntcli.transport import pynt_requests
17
13
 
18
14
 
@@ -43,10 +39,6 @@ def listen_usage():
43
39
  class ListenSubCommand(sub_command.PyntSubCommand):
44
40
  def __init__(self, name) -> None:
45
41
  super().__init__(name)
46
- self.scan_id = ""
47
- self.proxy_sleep_interval = 2
48
- self.proxy_healthcheck_buffer = 10
49
- self.proxy_server_base_url = "http://localhost:{}/api"
50
42
 
51
43
  def print_usage(self, *args):
52
44
  ui_thread.print(listen_usage())
@@ -82,27 +74,6 @@ class ListenSubCommand(sub_command.PyntSubCommand):
82
74
  time.sleep(self.proxy_sleep_interval)
83
75
  raise TimeoutError()
84
76
 
85
- def _get_report(self, args, report_format):
86
- while True:
87
- res = pynt_requests.get(
88
- self.proxy_server_base_url.format(args.port)
89
- + "/report?format={}".format(report_format),
90
- params={"scanId": self.scan_id},
91
- )
92
- if res.status_code == HTTPStatus.OK:
93
- return res.text
94
- if res.status_code == HTTPStatus.ACCEPTED:
95
- time.sleep(self.proxy_sleep_interval)
96
- continue
97
- if res.status_code == 517: # pynt did not recieve any requests
98
- ui_thread.print(
99
- ui_thread.PrinterText(
100
- res.json()["message"], ui_thread.PrinterText.WARNING
101
- )
102
- )
103
- return
104
- ui_thread.print("Error in polling for scan report: {}".format(res.text))
105
- return
106
77
 
107
78
  def run_cmd(self, args: argparse.Namespace):
108
79
  container_config = pynt_container.DockerContainerConfig(
@@ -178,35 +149,16 @@ class ListenSubCommand(sub_command.PyntSubCommand):
178
149
  with ui_thread.progress(
179
150
  "ws://localhost:{}/progress?scanId={}".format(args.port, self.scan_id),
180
151
  partial(lambda *args: None),
181
- "scan in progress...", 100):
182
- html_report = self._get_report(args, "html")
183
- html_report_path = os.path.join(
184
- tempfile.gettempdir(), "pynt_report_{}.html".format(int(time.time()))
185
- )
186
-
187
- json_report = self._get_report(args, "json")
188
- json_report_path = os.path.join(
189
- tempfile.gettempdir(), "pynt_report_{}.json".format(int(time.time()))
190
- )
191
-
192
- if "report" in args and args.report:
193
- full_path = os.path.abspath(args.report)
194
- html_report_path = util.get_user_report_path(full_path, "html")
195
- json_report_path = util.get_user_report_path(full_path, "json")
196
-
197
- if html_report:
198
- with open(html_report_path, "w", encoding="utf-8") as html_file:
199
- html_file.write(html_report)
200
- webbrowser.open("file://{}".format(html_report_path))
201
-
202
- if json_report:
203
- with open(json_report_path, "w", encoding="utf-8") as json_file:
204
- json_file.write(json_report)
205
- reporter = cli_reporter.PyntReporter(json_report_path)
206
- reporter.print_summary()
207
-
208
- if json_report:
209
- json_obj = json.loads(json_report)
210
- if json_obj:
211
- util.check_for_findings_or_warnings(args, json_obj)
212
- util.check_severity(args.severity_level, json_obj)
152
+ "scan in progress...",
153
+ 100,
154
+ ):
155
+ app_id = self.get_app_id(args.port, self.scan_id)
156
+ scan_details_url = build_scan_details_url(self.scan_id, app_id)
157
+ html_report_path = self.handle_html_report(args) # this also indicates that the scan is done
158
+
159
+ if scan_details_url:
160
+ webbrowser.open(scan_details_url)
161
+ else:
162
+ webbrowser.open("file://{}".format(html_report_path))
163
+
164
+ self.handle_json_report(args)
@@ -1,12 +1,12 @@
1
1
  import argparse
2
2
  import time
3
3
  import os
4
+ import webbrowser
4
5
  from functools import partial
5
6
 
6
7
  from pyntcli.pynt_docker import pynt_container
7
8
  from pyntcli.commands import sub_command, util
8
9
  from pyntcli.ui import ui_thread
9
- from pyntcli.ui.progress import PyntProgress
10
10
 
11
11
 
12
12
  def newman_usage():
@@ -128,5 +128,17 @@ class NewmanSubCommand(sub_command.PyntSubCommand):
128
128
  "scan in progress...",
129
129
  100,
130
130
  ):
131
+ scan_details_url = None
131
132
  while newman_docker.is_alive():
133
+ if not scan_details_url:
134
+ scan_details_url = self.get_scan_details_url(port)
132
135
  time.sleep(1)
136
+
137
+ if scan_details_url:
138
+ webbrowser.open(scan_details_url)
139
+ else:
140
+ ui_thread.print(ui_thread.PrinterText(
141
+ "Could not get report url",
142
+ ui_thread.PrinterText.WARNING,
143
+ ))
144
+ util.open_report_from_file()
@@ -1,5 +1,4 @@
1
1
  import argparse
2
- import time
3
2
  import websocket
4
3
  import webbrowser
5
4
  import os
@@ -13,6 +12,7 @@ from . import sub_command, util
13
12
  from pyntcli.pynt_docker import pynt_container
14
13
  from pyntcli.ui import ui_thread
15
14
  from pyntcli.transport import pynt_requests
15
+ from .util import build_scan_details_url
16
16
 
17
17
 
18
18
  class PyntPostmanException(Exception):
@@ -118,7 +118,12 @@ class PostmanSubCommand(sub_command.PyntSubCommand):
118
118
  html_report = self.get_report(args.port, "html", scan_id)
119
119
  html_report_path = os.path.join(tempfile.gettempdir(), "pynt_report_{}.html".format(int(time.time())))
120
120
 
121
- if html_report:
121
+ app_id = self.get_app_id(args.port, scan_id)
122
+ scan_details_url = build_scan_details_url(scan_id, app_id)
123
+
124
+ if scan_details_url:
125
+ webbrowser.open(scan_details_url)
126
+ elif html_report:
122
127
  with open(html_report_path, "w", encoding="utf-8") as html_file:
123
128
  html_file.write(html_report)
124
129
  webbrowser.open("file://{}".format(html_report_path))
@@ -1,5 +1,4 @@
1
1
  import argparse
2
- import requests
3
2
  from typing import Dict, List
4
3
  from datetime import datetime, timedelta
5
4
  from pyntcli import __version__ as cli_version
@@ -134,30 +133,36 @@ class PyntCommand:
134
133
  return False
135
134
 
136
135
  def _post_login_args_validation(self, args: argparse.Namespace, command: str, is_business_plan_user: bool):
136
+ if not is_business_plan_user:
137
+ # All other validations only relevant for business plan users
138
+ return
139
+
140
+ if command in commands_without_app_id:
141
+ # Skip application validation if it isn't required
142
+ return
143
+
144
+
137
145
  if getattr(args, "application_name"):
138
- try:
139
- pynt_client.get_application_by_name(args.application_name)
140
- except HTTPError as e:
141
- if e.response.status_code == 404:
142
- if getattr(args, "yes") or self._is_auto_create_app_confirmed(args.application_name):
143
- return
144
- else:
145
- raise UserAbortedException()
146
- if getattr(args, "yes") or self._is_missing_app_id_confirmed():
146
+ # When `--application-name` exists, we'll validate its existence.
147
+ # If the validation fails due to some error, we'll throw it back as we can't continue the execution.
148
+ #
149
+ # In any case, when `application-name` is provided, we don't need `application-id`
150
+ if pynt_client.validate_application_name_exists(args.application_name):
151
+ return
152
+
153
+ # Application does not exist, validate if the user wants to create it automatically
154
+ if getattr(args, "yes") or self._is_auto_create_app_confirmed(args.application_name):
147
155
  return
148
156
  else:
149
157
  raise UserAbortedException()
150
158
 
151
- # Confirm not using application-id flag if applicable
152
- if getattr(args, "application_id") or command in commands_without_app_id:
159
+ if getattr(args, "application_id"):
153
160
  return
154
161
 
155
- # For a business user, it's recommended to always provide the application-id.
156
- if is_business_plan_user:
157
- if getattr(args, "yes") or self._is_missing_app_id_confirmed():
158
- return
159
- else:
160
- raise UserAbortedException()
162
+ if getattr(args, "yes") or self._is_missing_app_id_confirmed():
163
+ return
164
+ else:
165
+ raise UserAbortedException()
161
166
 
162
167
  def is_confirmed(self, prompt_history_key: str, confirmation_message: str, default_confirmation: str) -> bool:
163
168
  """
@@ -195,5 +200,5 @@ class PyntCommand:
195
200
 
196
201
 
197
202
  def _is_auto_create_app_confirmed(self, application_name: str) -> bool:
198
- return self.is_confirmed("", f"Application {application_name} will be created automatically if it does not exist.\n" +
203
+ return self.is_confirmed("", f"Application {application_name} will be created automatically as it does not exist.\n" +
199
204
  f"Do you want to continue with the application name {application_name}?", "yes")
@@ -1,10 +1,133 @@
1
1
  import argparse
2
+ import os
3
+ import tempfile
4
+ import json
5
+ import time
6
+
7
+ from pyntcli.commands import util
8
+ from pyntcli.commands.util import build_scan_details_url
9
+ from pyntcli.transport import pynt_requests
10
+ from pyntcli.ui import report as cli_reporter
11
+
12
+ from http import HTTPStatus
13
+ from pyntcli.ui import ui_thread
2
14
 
3
15
  class PyntSubCommand:
4
16
  def __init__(self, name) -> None:
5
17
  self.name = name
18
+ self.scan_id = ""
19
+ self.scan_id_url = "http://localhost:{}/scan/scan_id"
20
+ self.app_id_url = "http://localhost:{}/scan/app_id?scanId={}"
21
+ self.proxy_sleep_interval = 2
22
+ self.proxy_healthcheck_buffer = 10
23
+ self.proxy_server_base_url = "http://localhost:{}/api"
6
24
  pass
7
25
 
26
+ def get_scan_id(self, port):
27
+ try:
28
+ res_scan_id = pynt_requests.get(
29
+ self.scan_id_url.format(port)
30
+ )
31
+ if res_scan_id.status_code == HTTPStatus.OK:
32
+ return res_scan_id.json()["scan_id"]
33
+ else:
34
+ return None
35
+ except Exception as e:
36
+ ui_thread.print_verbose("Error in getting scan id: " + str(e))
37
+ return None
38
+
39
+ def get_app_id(self, port, scan_id):
40
+ try:
41
+ res_app_id = pynt_requests.get(
42
+ self.app_id_url.format(port, scan_id)
43
+ )
44
+ if res_app_id.status_code == HTTPStatus.OK:
45
+ return res_app_id.json()["app_id"]
46
+ else:
47
+ return None
48
+ except Exception as e:
49
+ ui_thread.print_verbose("Error in getting app id: " + str(e))
50
+ return None
51
+
52
+ def get_scan_details_url(self, port):
53
+ try:
54
+ scan_id = self.get_scan_id(port)
55
+ if not scan_id:
56
+ return None
57
+
58
+ app_id = self.get_app_id(port, scan_id)
59
+ if not app_id:
60
+ return None
61
+
62
+ scan_details_url = build_scan_details_url(scan_id, app_id)
63
+ return scan_details_url
64
+ except Exception as e:
65
+ ui_thread.print_verbose("Error in getting report url: " + str(e))
66
+ return None
67
+
68
+
69
+ def handle_html_report(self, args):
70
+ html_report = self._get_report(args, "html")
71
+ if not html_report:
72
+ return None
73
+ else:
74
+ html_report_path = os.path.join(
75
+ tempfile.gettempdir(), "pynt_report_{}.html".format(int(time.time()))
76
+ )
77
+
78
+ if "report" in args and args.report:
79
+ full_path = os.path.abspath(args.report)
80
+ html_report_path = util.get_user_report_path(full_path, "html")
81
+
82
+ with open(html_report_path, "w", encoding="utf-8") as html_file:
83
+ html_file.write(html_report)
84
+ return html_report_path
85
+
86
+
87
+ def handle_json_report(self, args):
88
+ json_report = self._get_report(args, "json")
89
+ if json_report:
90
+ json_report_path = os.path.join(
91
+ tempfile.gettempdir(), "pynt_report_{}.json".format(int(time.time()))
92
+ )
93
+
94
+ if "report" in args and args.report:
95
+ full_path = os.path.abspath(args.report)
96
+ json_report_path = util.get_user_report_path(full_path, "json")
97
+
98
+ with open(json_report_path, "w", encoding="utf-8") as json_file:
99
+ json_file.write(json_report)
100
+ reporter = cli_reporter.PyntReporter(json_report_path)
101
+ reporter.print_summary()
102
+
103
+ json_obj = json.loads(json_report)
104
+ if json_obj:
105
+ util.check_for_findings_or_warnings(args, json_obj)
106
+ util.check_severity(args.severity_level, json_obj)
107
+
108
+ def _get_report(self, args, report_format):
109
+ while True:
110
+ res = pynt_requests.get(
111
+ self.proxy_server_base_url.format(args.port)
112
+ + "/report?format={}".format(report_format),
113
+ params={"scanId": self.scan_id},
114
+ )
115
+ if res.status_code == HTTPStatus.OK:
116
+ return res.text
117
+ if res.status_code == HTTPStatus.ACCEPTED:
118
+ time.sleep(self.proxy_sleep_interval)
119
+ continue
120
+ if res.status_code == 517: # pynt did not recieve any requests
121
+ ui_thread.print(
122
+ ui_thread.PrinterText(
123
+ res.json()["message"], ui_thread.PrinterText.WARNING
124
+ )
125
+ )
126
+ return None
127
+ ui_thread.print("Error in polling for scan report: {}".format(res.text))
128
+ return None
129
+
130
+
8
131
  def get_name(self):
9
132
  return self.name
10
133
 
pyntcli/commands/util.py CHANGED
@@ -7,6 +7,7 @@ import webbrowser
7
7
  import json
8
8
  import pyntcli.log.log as log
9
9
  import pyntcli.store.store as store
10
+ from pyntcli.auth.login import PYNT_APP_URL
10
11
 
11
12
  from pyntcli.commands.static_file_extensions import STATIC_FILE_EXTENSIONS
12
13
  from pyntcli.pynt_docker import pynt_container
@@ -93,8 +94,6 @@ def create_default_file_mounts(args):
93
94
  if os.stat(html_report_path).st_size == 0:
94
95
  raise HtmlReportNotCreatedException()
95
96
 
96
- webbrowser.open("file://{}".format(html_report_path))
97
-
98
97
  if os.stat(html_report_path).st_size > 0:
99
98
  report.PyntReporter(json_report_path).print_summary()
100
99
 
@@ -102,6 +101,19 @@ def create_default_file_mounts(args):
102
101
  check_severity(args.severity_level, json.load(open(json_report_path)))
103
102
 
104
103
 
104
+ def open_report_from_file():
105
+ html_report_path = os.path.join(store.get_default_store_dir(), "results.html")
106
+ if not os.path.exists(html_report_path):
107
+ raise FileNotFoundError(f"Report file not found: {html_report_path}")
108
+ webbrowser.open("file://{}".format(html_report_path))
109
+
110
+
111
+ def build_scan_details_url(scan_id, app_id):
112
+ if not scan_id or not app_id:
113
+ return None
114
+ return "{}/dashboard/application/{}/{}".format(PYNT_APP_URL, app_id, scan_id)
115
+
116
+
105
117
  # Deprecate - keep it for backward customers that use it
106
118
  def check_for_findings_or_warnings(args, json_report):
107
119
  security_tests = json_report.get("securityTests", {})
@@ -1,3 +1,4 @@
1
+ import json
1
2
  import os
2
3
  import requests
3
4
 
@@ -5,7 +6,6 @@ import pyntcli.log.log as log
5
6
  from pyntcli.store import CredStore
6
7
 
7
8
  PYNT_SAAS = os.environ.get("PYNT_SAAS_URL", "https://api.pynt.io/v1")
8
- logger = log.get_logger()
9
9
 
10
10
  class PyntClient:
11
11
  def __init__(self, base_url=PYNT_SAAS):
@@ -29,28 +29,29 @@ class PyntClient:
29
29
  return response.json() # returning actual data
30
30
 
31
31
  except requests.exceptions.HTTPError as e:
32
- logger.error(f"HTTP error accessing '{url}': {e}")
33
32
  raise e
34
- except requests.exceptions.RequestException as e:
35
- logger.error(f"Error accessing '{url}': {e}")
33
+ except requests.exceptions.RequestException:
34
+ pass
36
35
 
37
36
  return None
38
37
 
39
- def get_application_by_name(self, application_name):
40
- url = f"{self.base_url}/application/{application_name}"
38
+ def validate_application_name_exists(self, application_name):
39
+ url = f"{self.base_url}/application"
41
40
  headers = self._get_headers()
42
-
43
- try:
44
- response = requests.get(url, headers=headers)
45
- response.raise_for_status()
46
- return response.json() # returning actual data
47
-
48
- except requests.exceptions.HTTPError as e:
49
- logger.error(f"HTTP error accessing '{url}': {e}")
50
- raise e
51
- except requests.exceptions.RequestException as e:
52
- logger.error(f"Error accessing '{url}': {e}")
53
-
54
- return None
41
+ query_filter = {
42
+ "filter": json.dumps({
43
+ "where": {
44
+ "name": application_name,
45
+ },
46
+ })
47
+ }
48
+
49
+ applications_response = requests.get(url, headers=headers, params=query_filter)
50
+ if applications_response.status_code == 404:
51
+ return False
52
+ applications_response.raise_for_status()
53
+
54
+ applications = applications_response.json()
55
+ return len(applications) == 1
55
56
 
56
57
  pynt_client = PyntClient()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyntcli
3
- Version: 0.1.117
3
+ Version: 0.1.119
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
@@ -1,7 +1,7 @@
1
1
  ignoreTests/conftest.py,sha256=gToq5K74GtgeGQXjFvXSzMaE6axBYxAzcFG5XJPOXjI,427
2
2
  ignoreTests/auth/login.py,sha256=7GeBirHTD9t6EassLYsegCw1FZHkfjvVW1Z5uybHzgM,3801
3
3
  ignoreTests/store/cred_store.py,sha256=_7-917EtNC9eKEumO2_lt-7KuDmCwOZFaowCm7DbA_A,254
4
- pyntcli/__init__.py,sha256=tC6Ly5NZvDBZKJuC4iaO2NyJcqX7enbauSAG6rxadFU,24
4
+ pyntcli/__init__.py,sha256=3ZqJ3Vi00OaPp6vSehRlnYIM7d4es0e1-TVHlbwgtsA,24
5
5
  pyntcli/main.py,sha256=RD0W2_0ogYBCXubo-YewxHYkiIXxNv6NkZOh3n1VujE,5964
6
6
  pyntcli/analytics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  pyntcli/analytics/send.py,sha256=0hJ0WJNFHLqyohtRr_xOg5WEXzxHrUOlcePPg-k65Hk,3846
@@ -9,25 +9,25 @@ pyntcli/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  pyntcli/auth/login.py,sha256=qtdoCgWIPi3_YXehI7SVk_E8aDVhH39wGc87tlkazSE,5558
10
10
  pyntcli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  pyntcli/commands/burp.py,sha256=9kcqjC9Rgj5oZimGZuA_oO71Hn2Z3py8k5vr-eMKnUM,14317
12
- pyntcli/commands/command.py,sha256=ulxhWyTnuqQfyNy5somqBbQoTCvd0Hg4OnPJ8thJzAs,11078
13
- pyntcli/commands/har.py,sha256=laVRjG35LDEykoSfRIuEwHYfLstui6EpPxSjcam64ng,4719
12
+ pyntcli/commands/command.py,sha256=ZeK2MFhSZnWPb4vtwsBBTAef2dk65-ERP6qvA-Gv7iE,9186
13
+ pyntcli/commands/har.py,sha256=rs858ruqpIby-ecEzcTrwma0GFBumdjnmm1o307NP-U,5112
14
14
  pyntcli/commands/id_command.py,sha256=UBEgMIpm4vauTCsKyixltiGUolNg_OfHEJvJ_i5BpJY,943
15
- pyntcli/commands/listen.py,sha256=RTlUt2oq5_BPeBZpG5yQ6GPAG_Cf0JVrUrkzz8uw9ns,9042
16
- pyntcli/commands/newman.py,sha256=w0d0Pi1swJQ8E3oRs6vsgw_591sl-4bcLpWZwuBXmDI,5282
17
- pyntcli/commands/postman.py,sha256=kN1PkzPpcUnsbirg17AN9JwJZu6VBt6OeKYrLGrvtFc,4964
18
- pyntcli/commands/pynt_cmd.py,sha256=TcsKVl0QZLEDIZjo-977IY6k4MAXVk_hljraW1eJmyg,7790
15
+ pyntcli/commands/listen.py,sha256=HKq2oXIkj_qKTV_o5dDQBu7YuVGWtRODtNG2AjodAKk,6933
16
+ pyntcli/commands/newman.py,sha256=TNcs_G5DAT_ToSS5LIM0KFTgxoyjOzVEo8wfDhA0C24,5734
17
+ pyntcli/commands/postman.py,sha256=h3ZZoIYmP2N5WyL8LrRqvBjPJ2pvNlIoBU-bvXCO9lE,5207
18
+ pyntcli/commands/pynt_cmd.py,sha256=oRKgiG9i84sxkS-C5Nw4vv9mIO6zL8YfqhOUJ-XVpas,7934
19
19
  pyntcli/commands/root.py,sha256=bTGlFroeK7WG9dAhFkVTVnpEM-Gdp8QKCuTxW_QWNlQ,4441
20
20
  pyntcli/commands/static_file_extensions.py,sha256=PZJb02BI-64tbU-j3rdCNsXzTh7gkIDGxGKbKNw3h5k,1995
21
- pyntcli/commands/sub_command.py,sha256=GF3-rE_qk2L4jGPFqHLm9SdGINmu3EakhjJTFyWjRms,374
21
+ pyntcli/commands/sub_command.py,sha256=SxTSDXE7x4y6W-8hW5GmRu15a2-8gUUoU9XDHE-2yMc,4814
22
22
  pyntcli/commands/template.py,sha256=wl-0GhIUUqdO39fyoO7mMsEKXnYqG32XkQdUJhLkdiA,8047
23
- pyntcli/commands/util.py,sha256=ev06aUlJ9tCSw1eAGVIsGlVVY4u0H6AJG9b5MB_bAzs,4594
23
+ pyntcli/commands/util.py,sha256=awNG4qz9ni1S6l1hIROnoGxIOj5UVPcaFk6mmkmwrgk,5058
24
24
  pyntcli/log/__init__.py,sha256=cOGwOYzMoshEbZiiasBGkj6wF0SBu3Jdpl-AuakDesw,19
25
25
  pyntcli/log/log.py,sha256=YXCvcCzuhQ5QUT2L02uQEdN_lTCzLEuet4OnLuEnjlM,112
26
26
  pyntcli/pynt_docker/__init__.py,sha256=PQIOVxc7XXtMLfEX7ojgwf_Z3mmTllO3ZvzUZTPOxQY,30
27
27
  pyntcli/pynt_docker/container_utils.py,sha256=DeI-uSgdcO_2rGs2dvQ5gBDNo_iKKuPIQO2D9oej5Gw,1485
28
28
  pyntcli/pynt_docker/pynt_container.py,sha256=7VG7e8mCabFUJoX-AuSnxVoXtO9ben-QQdNBL5Y5z9g,13861
29
29
  pyntcli/saas_client/__init__.py,sha256=HPBzoC5a6F5_WkHubcjq_W4m1OQ9i0TX8QXBtJlKm1M,26
30
- pyntcli/saas_client/saas_client.py,sha256=7mJNo2x4Oy2N4NKdHyGRxXZUk_VHZvRu1x586rojrp0,1756
30
+ pyntcli/saas_client/saas_client.py,sha256=Cpf1pitVlxjW7KpchPL7Q-DgUqw6A8ldCtDlBXaPig0,1663
31
31
  pyntcli/store/__init__.py,sha256=1fP8cEAQCF_myja3gnhHH9FEqtBiOJ-2aBmUXSKBdFA,41
32
32
  pyntcli/store/json_connector.py,sha256=UGs3uORw3iyn0YJ8kzab-veEZToA6d-ByXYuqEleWsA,560
33
33
  pyntcli/store/store.py,sha256=Kl_HT9FJFdKlAH7SwAt3g4-bW-r-1ve_u13OPggQai0,2529
@@ -42,8 +42,8 @@ pyntcli/ui/report.py,sha256=W-icPSZrGLOubXgam0LpOvHLl_aZg9Zx9qIkL8Ym5PE,1930
42
42
  pyntcli/ui/ui_thread.py,sha256=XUBgLpYQjVhrilU-ofw7VSXgTiwneSdTxm61EvC3x4Q,5091
43
43
  tests/test_utils.py,sha256=t5fTQUk1U_Js6iMxcGYGqt4C-crzOJ0CqCKtLkRtUi0,2050
44
44
  tests/commands/test_pynt_cmd.py,sha256=J4JrEuD_qSVN76Fu6bKRjrxWSwCTXVEAzVPYdXMa0tI,8826
45
- pyntcli-0.1.117.dist-info/METADATA,sha256=R8P0CNK4GXBEwOB-ky2Qxu9lHrURd-eogrp1lIF3pwo,427
46
- pyntcli-0.1.117.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
47
- pyntcli-0.1.117.dist-info/entry_points.txt,sha256=kcGmqAxXDttNk2EPRcqunc_LTVp61gzakz0v-GEE2SY,43
48
- pyntcli-0.1.117.dist-info/top_level.txt,sha256=64XSgBzSpgwjYjEKHZE7q3JH2a816zEeyZBXfJi3AKI,42
49
- pyntcli-0.1.117.dist-info/RECORD,,
45
+ pyntcli-0.1.119.dist-info/METADATA,sha256=ui9RR7gtHhEBfKKJqcFyIAd_tsvDyov49GIgN7mJ4DM,427
46
+ pyntcli-0.1.119.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
47
+ pyntcli-0.1.119.dist-info/entry_points.txt,sha256=kcGmqAxXDttNk2EPRcqunc_LTVp61gzakz0v-GEE2SY,43
48
+ pyntcli-0.1.119.dist-info/top_level.txt,sha256=64XSgBzSpgwjYjEKHZE7q3JH2a816zEeyZBXfJi3AKI,42
49
+ pyntcli-0.1.119.dist-info/RECORD,,