pyntcli 0.1.86__py3-none-any.whl → 0.1.87__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.86"
1
+ __version__ = "0.1.87"
pyntcli/commands/burp.py CHANGED
@@ -144,6 +144,7 @@ def burp_usage():
144
144
  .with_line("\t--application-id - Attach the scan to an application, you can find the ID in your applications area at app.pynt.io")
145
145
  .with_line("\t--host-ca - Path to the CA file in PEM format to enable SSL certificate verification for pynt when running through a VPN.")
146
146
  .with_line("\t--return-error - 'all-findings' (warnings, or errors), 'errors-only', 'never' (default)")
147
+ .with_line("\t--verbose - Use to get more detailed information about the run")
147
148
  )
148
149
 
149
150
 
@@ -35,9 +35,11 @@ def command_usage():
35
35
  .with_line("\t--proxy-port - Set the port proxied traffic should be routed to (DEFAULT: 6666)")
36
36
  .with_line("\t--report - If present will save the generated report in this path.")
37
37
  .with_line("\t--insecure - Use when target uses self signed certificates")
38
+ .with_line("\t--self-signed - Use when the functional test verify SSL")
38
39
  .with_line("\t--application-id - Attach the scan to an application, you can find the ID in your applications area at app.pynt.io")
39
40
  .with_line("\t--host-ca - Path to the CA file in PEM format to enable SSL certificate verification for pynt when running through a VPN.")
40
41
  .with_line("\t--return-error - 'all-findings' (warnings, or errors), 'errors-only', 'never' (default) ")
42
+ .with_line("\t--verbose - Use to get more detailed information about the run")
41
43
  )
42
44
 
43
45
 
@@ -61,6 +63,7 @@ class CommandSubCommand(sub_command.PyntSubCommand):
61
63
  proxy_cmd.add_argument("--test-name", help="", default="", required=False)
62
64
  proxy_cmd.add_argument("--allow-errors", action="store_true")
63
65
  proxy_cmd.add_argument("--ca-path", type=str, default="")
66
+ proxy_cmd.add_argument("--self-signed", action="store_true")
64
67
  proxy_cmd.add_argument("--report", type=str, default="")
65
68
  proxy_cmd.add_argument("--return-error", choices=["all-findings", "errors-only", "never"], default="never")
66
69
  proxy_cmd.print_usage = self.print_usage
@@ -69,6 +72,16 @@ class CommandSubCommand(sub_command.PyntSubCommand):
69
72
 
70
73
  def _updated_environment(self, args):
71
74
  env_copy = deepcopy(os.environ)
75
+ if "self_signed" in args and args.self_signed:
76
+ cert_path = os.path.join(os.path.expanduser('~'), '.pynt', 'cert')
77
+ cert_file_path = os.path.join(cert_path, 'mitmproxy-ca-cert.pem')
78
+ env_copy.update(
79
+ {
80
+ "REQUESTS_CA_BUNDLE": cert_file_path,
81
+ "SSL_CERT_FILE": cert_file_path,
82
+ "NODE_EXTRA_CA_CERTS": cert_file_path
83
+ }
84
+ )
72
85
  return env_copy.update(
73
86
  {
74
87
  "HTTP_PROXY": "http://localhost:{}".format(args.proxy_port),
pyntcli/commands/har.py CHANGED
@@ -28,6 +28,7 @@ def har_usage():
28
28
  .with_line(
29
29
  "\t--host-ca - Path to the CA file in PEM format to enable SSL certificate verification for pynt when running through a VPN."
30
30
  )
31
+ .with_line("\t--verbose - Use to get more detailed information about the run")
31
32
  .with_line("")
32
33
  )
33
34
 
@@ -34,6 +34,7 @@ def listen_usage():
34
34
  .with_line("\t--insecure - use when target uses self signed certificates")
35
35
  .with_line("\t--host-ca - path to the CA file in PEM format to enable SSL certificate verification for pynt when running through a VPN.")
36
36
  .with_line("\t--return-error - 'all-findings' (warnings, or errors), 'errors-only', 'never' (default) ")
37
+ .with_line("\t--verbose - Use to get more detailed information about the run")
37
38
  )
38
39
 
39
40
 
@@ -31,6 +31,7 @@ def newman_usage():
31
31
  .with_line(
32
32
  "\t--return-error - 'all-findings' (warnings, or errors), 'errors-only', 'never' (default) "
33
33
  )
34
+ .with_line("\t--verbose - Use to get more detailed information about the run")
34
35
  )
35
36
 
36
37
 
@@ -35,7 +35,8 @@ def postman_usage():
35
35
  .with_line("Options:", style=ui_thread.PrinterText.HEADER) \
36
36
  .with_line("\t--port - set the port pynt will listen to (DEFAULT: 5001)") \
37
37
  .with_line("\t--insecure - use when target uses self signed certificates") \
38
- .with_line("\t--host-ca - path to the CA file in PEM format to enable SSL certificate verification for pynt when running through a VPN.")
38
+ .with_line("\t--host-ca - path to the CA file in PEM format to enable SSL certificate verification for pynt when running through a VPN.") \
39
+ .with_line("\t--verbose - Use to get more detailed information about the run")
39
40
 
40
41
 
41
42
  class PostmanSubCommand(sub_command.PyntSubCommand):
@@ -109,6 +109,11 @@ def get_container_with_arguments(args: argparse.Namespace, *port_args: PyntDocke
109
109
  if "verbose" in args and args.verbose:
110
110
  docker_arguments.append("--verbose")
111
111
 
112
+ creds_path = os.path.dirname(CredStore().file_location)
113
+ mitm_cert_path = os.path.join(creds_path,"cert")
114
+ os.makedirs(mitm_cert_path,exist_ok=True)
115
+ mounts.append(create_mount(mitm_cert_path, "/root/.mitmproxy"))
116
+
112
117
  env = {PYNT_ID: CredStore().get_tokens(), "PYNT_SAAS_URL": PYNT_SAAS}
113
118
  if user_set_all_variables():
114
119
  add_env_variables(env)
pyntcli/ui/pynt_errors.py CHANGED
@@ -5,10 +5,9 @@ def unexpected_error(original):
5
5
  printer_text = ui_thread.PrinterText("An Unexpected Error Occurred", style=ui_thread.PrinterText.WARNING) \
6
6
  .with_line("")
7
7
 
8
- if ui_thread.VERBOSE:
9
- msg = str(original) or repr(original)
10
- if msg:
11
- printer_text.with_line(f"e: {msg}")
8
+ msg = str(original) or repr(original)
9
+ if msg:
10
+ printer_text.with_line(f"e: {msg}")
12
11
 
13
12
  printer_text = printer_text.with_line(
14
13
  "Please tell us about it in our community channel and we will help you figure it out:",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyntcli
3
- Version: 0.1.86
3
+ Version: 0.1.87
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,17 +1,17 @@
1
- pyntcli/__init__.py,sha256=daW0dTSMLeXJ53ouWqpbphS98YVWhR0zyXXnZpqK-Ps,23
1
+ pyntcli/__init__.py,sha256=DqFIxZO1qWYGIooEyrZV7d6zn4AaSeN_vya1dM6dtRc,23
2
2
  pyntcli/main.py,sha256=eJFpT-haLVQAYP71_ZHjNaA5iG2wvDXy8km84GU0Mwo,6009
3
3
  pyntcli/analytics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  pyntcli/analytics/send.py,sha256=pJOyOWl3g_Vm9apKK3LzNVqsnC6zsWA1bCK3ZegbLpc,3637
5
5
  pyntcli/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  pyntcli/auth/login.py,sha256=TljsRXbEkNI1YUrKm5mlTw4YiecYScYUsit8Z8vstss,5228
7
7
  pyntcli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- pyntcli/commands/burp.py,sha256=tDGWzgHKfMnKot1jI7JghvHk29VMZsnfcyNuRZTO2Lk,11753
9
- pyntcli/commands/command.py,sha256=076tUOnqHBSogoGt8h2fnyZWeGWO5eEfHIECbefdS1s,9715
10
- pyntcli/commands/har.py,sha256=-RxuX_lw7JAY46oxHlp5N9Twm5Sc3VLVbHpWEwtuGFg,3976
8
+ pyntcli/commands/burp.py,sha256=O-KKyp6kcbTeHMEKsABlLQfI6rFqz229pef53UkpGlQ,11840
9
+ pyntcli/commands/command.py,sha256=0lCMxXIyj3vAd8NfeQ2Ik1WhV8RHq17cwwaQn2isRzQ,10411
10
+ pyntcli/commands/har.py,sha256=iBFd_Zqjths3JztmHHJBvIbrfT98ANVK180tVXqFXFk,4063
11
11
  pyntcli/commands/id_command.py,sha256=UBEgMIpm4vauTCsKyixltiGUolNg_OfHEJvJ_i5BpJY,943
12
- pyntcli/commands/listen.py,sha256=Mm5TY5e896-NhDOImRUB3N8gaaXtcZdCSdV92NLt8eM,8702
13
- pyntcli/commands/newman.py,sha256=qvrVLL3BqiugdNPTi-KBI-BXXDYMSRMu4BPEs6Dfz_U,5094
14
- pyntcli/commands/postman.py,sha256=CgX4KTF8qR008LiIsiSrNLyXdgPre3CwVz3AENnOcB8,4924
12
+ pyntcli/commands/listen.py,sha256=L8lpa8r-mZor9F_ad9L7KQAznljSEOgn_LPURm4e6dM,8789
13
+ pyntcli/commands/newman.py,sha256=MQ7EG1QTm-Xnb_gfpx_DYo1BeoV_Y5SFIBJrtKCZZB8,5181
14
+ pyntcli/commands/postman.py,sha256=wh0sgJTTkUDY5GFKxCKMrcE9OmSZk6nufltsIlJb6As,5013
15
15
  pyntcli/commands/pynt_cmd.py,sha256=KOl9guUtesO2JcMM5nPKKkjnK6F9HV4jHHcoUk4KVhw,2825
16
16
  pyntcli/commands/root.py,sha256=inffMhaMJykoRC0T2f7uF3f5BEdJw_c6Q1e2FTG4bfU,3511
17
17
  pyntcli/commands/static_file_extensions.py,sha256=PZJb02BI-64tbU-j3rdCNsXzTh7gkIDGxGKbKNw3h5k,1995
@@ -21,7 +21,7 @@ pyntcli/log/__init__.py,sha256=cOGwOYzMoshEbZiiasBGkj6wF0SBu3Jdpl-AuakDesw,19
21
21
  pyntcli/log/log.py,sha256=cWCdWmUaAwePwdhYDcgNMEG9d9RM34sGahxBCYEdv2Y,1069
22
22
  pyntcli/pynt_docker/__init__.py,sha256=PQIOVxc7XXtMLfEX7ojgwf_Z3mmTllO3ZvzUZTPOxQY,30
23
23
  pyntcli/pynt_docker/container_utils.py,sha256=_Onn7loInzyJAG2-Uk6CGpsuRyelmUFHOvtJj4Uzi9A,175
24
- pyntcli/pynt_docker/pynt_container.py,sha256=c3gwOpPvDRWofHqv1p-jsQ24TQOlBFdFqYbwFMiJ0Rs,9079
24
+ pyntcli/pynt_docker/pynt_container.py,sha256=Lz4WJlzJj3YeRQ6bb9D34oeLGnY1c0UDIugoHu-zBWA,9318
25
25
  pyntcli/store/__init__.py,sha256=xuS9OB21F6B1sUx5XPGxz_6WpG6-KTMbuq50RrZS5OY,29
26
26
  pyntcli/store/json_connector.py,sha256=UGs3uORw3iyn0YJ8kzab-veEZToA6d-ByXYuqEleWsA,560
27
27
  pyntcli/store/store.py,sha256=9KwalOd1EA1VtYwr9oJgBsPgUYakX5uyif_sNXGQ614,1917
@@ -30,14 +30,14 @@ pyntcli/transport/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
30
30
  pyntcli/transport/pynt_requests.py,sha256=KiEG3hNcwY7DLIJDCq-7LIPq54yYQcDBhHe3KhpqRTc,1563
31
31
  pyntcli/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
32
  pyntcli/ui/progress.py,sha256=RrnO_jJNunoyupylakmWmHOEPw3lh99OHpKBzL6OBiE,1008
33
- pyntcli/ui/pynt_errors.py,sha256=Pwxf2eIkXbQg060vnaMm4ivthbohDalxVDK6-Kag2iU,727
33
+ pyntcli/ui/pynt_errors.py,sha256=00UprD4tFViREv7kuXGQ99PAKGTpXYixxi3Ndeoeiew,689
34
34
  pyntcli/ui/report.py,sha256=W-icPSZrGLOubXgam0LpOvHLl_aZg9Zx9qIkL8Ym5PE,1930
35
35
  pyntcli/ui/ui_thread.py,sha256=4YzpO5dDrWpbTovMdHvv9ZQdLFJamZEAKXjF9rIIIoQ,5039
36
36
  tests/conftest.py,sha256=gToq5K74GtgeGQXjFvXSzMaE6axBYxAzcFG5XJPOXjI,427
37
37
  tests/auth/test_login.py,sha256=KFlzWhXBAuwdi7GXf16gCB3ya94LQG2wjcSChE149rQ,3798
38
38
  tests/store/test_cred_store.py,sha256=_7-917EtNC9eKEumO2_lt-7KuDmCwOZFaowCm7DbA_A,254
39
- pyntcli-0.1.86.dist-info/METADATA,sha256=7vQ3Epe9eMRgT06mRKDpiwrzSNi-qsa1lwubvzouPDM,463
40
- pyntcli-0.1.86.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
41
- pyntcli-0.1.86.dist-info/entry_points.txt,sha256=kcGmqAxXDttNk2EPRcqunc_LTVp61gzakz0v-GEE2SY,43
42
- pyntcli-0.1.86.dist-info/top_level.txt,sha256=u9MDStwVHB7UG8PUcODeWCul_NvzL2EzoLvSlgwLHFs,30
43
- pyntcli-0.1.86.dist-info/RECORD,,
39
+ pyntcli-0.1.87.dist-info/METADATA,sha256=buf6PtP3EoTWbUyD7cqhPJpPkj_stwuVePNRSfMzoDY,463
40
+ pyntcli-0.1.87.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
41
+ pyntcli-0.1.87.dist-info/entry_points.txt,sha256=kcGmqAxXDttNk2EPRcqunc_LTVp61gzakz0v-GEE2SY,43
42
+ pyntcli-0.1.87.dist-info/top_level.txt,sha256=u9MDStwVHB7UG8PUcODeWCul_NvzL2EzoLvSlgwLHFs,30
43
+ pyntcli-0.1.87.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (70.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5