pyntcli 0.1.88__py3-none-any.whl → 0.1.90__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.88"
1
+ __version__ = "0.1.90"
pyntcli/commands/burp.py CHANGED
@@ -91,8 +91,7 @@ def replay_req(item, proxy_port):
91
91
  headers[key] = value
92
92
 
93
93
  body = decoded_req.split("\r\n\r\n")[1]
94
- ui_thread.print(ui_thread.PrinterText(f"{url}"))
95
- pynt_requests.request_from_xml(
94
+ resp = pynt_requests.request_from_xml(
96
95
  method=method,
97
96
  url=url,
98
97
  headers=headers,
@@ -102,6 +101,7 @@ def replay_req(item, proxy_port):
102
101
  "https": "127.0.0.1:{}".format(proxy_port),
103
102
  },
104
103
  )
104
+ ui_thread.print(ui_thread.PrinterText(resp))
105
105
 
106
106
 
107
107
  def run_burp_xml(doc, proxy_port):
@@ -136,6 +136,7 @@ def burp_usage():
136
136
  .with_line("")
137
137
  .with_line("Options:", style=ui_thread.PrinterText.HEADER)
138
138
  .with_line("\t--xml - Path to the xml to run tests on")
139
+ .with_line('\t--captured-domains - Pynt will scan only these domains and subdomains. For all domains write "*"')
139
140
  .with_line("\t--port - Set the port pynt will listen to (DEFAULT: 5001)")
140
141
  .with_line("\t--ca-path - The path to the CA file in PEM format")
141
142
  .with_line("\t--proxy-port - Set the port proxied traffic should be routed to (DEFAULT: 6666)")
@@ -166,10 +167,11 @@ class BurpCommand(sub_command.PyntSubCommand):
166
167
  burp_cmd.add_argument("--xml", help="", default="", required=True)
167
168
  burp_cmd.add_argument("--ca-path", type=str, default="")
168
169
  burp_cmd.add_argument("--report", type=str, default="")
170
+ burp_cmd.add_argument("--captured-domains", nargs="+", help="", default="")
169
171
  burp_cmd.add_argument(
170
172
  "--return-error",
171
173
  choices=["all-findings", "errors-only", "never"],
172
- default="never"
174
+ default="never",
173
175
  )
174
176
  burp_cmd.print_usage = self.print_usage
175
177
  burp_cmd.print_help = self.print_usage
@@ -233,6 +235,10 @@ class BurpCommand(sub_command.PyntSubCommand):
233
235
  args.proxy_port, args.proxy_port, "--proxy-port"
234
236
  ),
235
237
  )
238
+
239
+ for host in args.captured_domains:
240
+ container.docker_arguments += ["--host-targets", host]
241
+
236
242
  if "ca_path" in args and args.ca_path:
237
243
  if not os.path.isfile(args.ca_path):
238
244
  ui_thread.print(
@@ -312,10 +318,10 @@ class BurpCommand(sub_command.PyntSubCommand):
312
318
  )
313
319
 
314
320
  with ui_thread.progress(
315
- "ws://localhost:{}/progress?scanId={}".format(args.port, self.scan_id),
316
- partial(lambda *args: None),
317
- "scan in progress...",
318
- 100,
321
+ "ws://localhost:{}/progress?scanId={}".format(args.port, self.scan_id),
322
+ partial(lambda *args: None),
323
+ "scan in progress...",
324
+ 100,
319
325
  ):
320
326
  html_report = self._get_report(args, "html")
321
327
  html_report_path = os.path.join(
@@ -39,12 +39,12 @@ def add_host_ca(ca_path):
39
39
  cert_data = open(ca_path, "rb").read()
40
40
 
41
41
  cafile = certifi.where()
42
- ca_chain = open(cafile, 'rb').read()
42
+ ca_chain = open(cafile, "rb").read()
43
43
 
44
44
  bundle_path = os.path.join(tempfile.gettempdir(), "bundle.pem")
45
45
  with open(bundle_path, "wb") as f:
46
46
  f.write(ca_chain)
47
- f.write(b'\n')
47
+ f.write(b"\n")
48
48
  f.write(cert_data)
49
49
 
50
50
  verify = bundle_path
@@ -62,5 +62,12 @@ def put(url, data=None, **kwargs):
62
62
  return requests.put(url, data=data, verify=verify, **kwargs)
63
63
 
64
64
 
65
- def request_from_xml(method, url, proxies=None, data=None, **kwargs):
66
- return requests.request(method=method, url=url, data=data, verify=False, proxies=proxies, **kwargs)
65
+ def request_from_xml(method, url, proxies=None, data=None, **kwargs):
66
+ try:
67
+ requests.request(
68
+ method=method, url=url, data=data, verify=False, proxies=proxies, **kwargs
69
+ )
70
+
71
+ return url
72
+ except requests.exceptions.TooManyRedirects as e:
73
+ return "Too many redirects for {}".format(url)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyntcli
3
- Version: 0.1.88
3
+ Version: 0.1.90
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,11 +1,11 @@
1
- pyntcli/__init__.py,sha256=z3tdRNeN2w75cDNIzvfmZ76HO3oZkxihdKKzDRqb2Ow,23
1
+ pyntcli/__init__.py,sha256=bnzQYkv0W1HPYQ8zWLUuEesEQPEnHaMFqe4y4oHaN4w,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=O-KKyp6kcbTeHMEKsABlLQfI6rFqz229pef53UkpGlQ,11840
8
+ pyntcli/commands/burp.py,sha256=506wYqM-7rjoXQ8pM9mUpmY4b5uB-A77JtsMpJJzS7w,12145
9
9
  pyntcli/commands/command.py,sha256=0lCMxXIyj3vAd8NfeQ2Ik1WhV8RHq17cwwaQn2isRzQ,10411
10
10
  pyntcli/commands/har.py,sha256=pl-qPZE6yOlLrruZ2bGiDkEpEVkLmnxb68bRxgzdszg,4120
11
11
  pyntcli/commands/id_command.py,sha256=UBEgMIpm4vauTCsKyixltiGUolNg_OfHEJvJ_i5BpJY,943
@@ -27,7 +27,7 @@ pyntcli/store/json_connector.py,sha256=UGs3uORw3iyn0YJ8kzab-veEZToA6d-ByXYuqEleW
27
27
  pyntcli/store/store.py,sha256=9KwalOd1EA1VtYwr9oJgBsPgUYakX5uyif_sNXGQ614,1917
28
28
  pyntcli/store/store_connector.py,sha256=w4LzcpRZesUZL1f63RmLlWEFRtJ6Y6rcS6PkkGtO4MA,357
29
29
  pyntcli/transport/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
- pyntcli/transport/pynt_requests.py,sha256=KiEG3hNcwY7DLIJDCq-7LIPq54yYQcDBhHe3KhpqRTc,1563
30
+ pyntcli/transport/pynt_requests.py,sha256=C7OPvcKkRTcxSYuyiWKE59KgA9sRX0d6fm1wnopAmPo,1719
31
31
  pyntcli/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
32
  pyntcli/ui/progress.py,sha256=RrnO_jJNunoyupylakmWmHOEPw3lh99OHpKBzL6OBiE,1008
33
33
  pyntcli/ui/pynt_errors.py,sha256=00UprD4tFViREv7kuXGQ99PAKGTpXYixxi3Ndeoeiew,689
@@ -36,8 +36,8 @@ 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.88.dist-info/METADATA,sha256=8-E1WzSYJbsxxHp1v3Qpyw8DDpQnN3KYHUL4E3-OO24,463
40
- pyntcli-0.1.88.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
41
- pyntcli-0.1.88.dist-info/entry_points.txt,sha256=kcGmqAxXDttNk2EPRcqunc_LTVp61gzakz0v-GEE2SY,43
42
- pyntcli-0.1.88.dist-info/top_level.txt,sha256=u9MDStwVHB7UG8PUcODeWCul_NvzL2EzoLvSlgwLHFs,30
43
- pyntcli-0.1.88.dist-info/RECORD,,
39
+ pyntcli-0.1.90.dist-info/METADATA,sha256=O5T5pKEMZtYF8cqDWYW8i7TojcmW89iFQwfAPvIXvsc,463
40
+ pyntcli-0.1.90.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
41
+ pyntcli-0.1.90.dist-info/entry_points.txt,sha256=kcGmqAxXDttNk2EPRcqunc_LTVp61gzakz0v-GEE2SY,43
42
+ pyntcli-0.1.90.dist-info/top_level.txt,sha256=u9MDStwVHB7UG8PUcODeWCul_NvzL2EzoLvSlgwLHFs,30
43
+ pyntcli-0.1.90.dist-info/RECORD,,