pyntcli 0.1.89__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.89"
1
+ __version__ = "0.1.90"
pyntcli/commands/burp.py CHANGED
@@ -62,7 +62,7 @@ def decode_request(item) -> str:
62
62
  raise e
63
63
 
64
64
 
65
- def replay_req(session, item, proxy_port):
65
+ def replay_req(item, proxy_port):
66
66
  url = item["url"]
67
67
  if not util.is_http_handler(url):
68
68
  return None
@@ -91,9 +91,7 @@ def replay_req(session, 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(
96
- session=session,
94
+ resp = pynt_requests.request_from_xml(
97
95
  method=method,
98
96
  url=url,
99
97
  headers=headers,
@@ -103,16 +101,16 @@ def replay_req(session, item, proxy_port):
103
101
  "https": "127.0.0.1:{}".format(proxy_port),
104
102
  },
105
103
  )
104
+ ui_thread.print(ui_thread.PrinterText(resp))
106
105
 
107
106
 
108
107
  def run_burp_xml(doc, proxy_port):
109
108
  items = doc["items"]["item"]
110
109
  ui_thread.print(ui_thread.PrinterText("Creating traffic from xml file"))
111
- session = pynt_requests.get_new_session()
112
110
  if isinstance(items, dict):
113
- replay_req(session, item=items, proxy_port=proxy_port)
111
+ replay_req(item=items, proxy_port=proxy_port)
114
112
  else:
115
- [replay_req(session, i, proxy_port=proxy_port) for i in doc["items"]["item"]]
113
+ [replay_req(i, proxy_port=proxy_port) for i in doc["items"]["item"]]
116
114
 
117
115
 
118
116
  def parse_xml(xml_path):
@@ -62,16 +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 get_new_session():
66
- s = requests.session()
67
- s.max_redirects = 500
68
-
69
- return s
70
-
71
-
72
- def request_from_xml(
73
- session: requests.Session, method, url, proxies=None, data=None, **kwargs
74
- ):
75
- return session.request(
76
- method=method, url=url, data=data, verify=False, proxies=proxies, **kwargs
77
- )
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.89
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=PY93tkOmcPlWKkwp9BLM87U29v6noa-gTaI98NliUTA,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=A56AD9Cx-JmzrsHyVHEj4OQzFaXYQRIi_svU8HtBl5Y,12240
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=e-km_PonlrnQ2jwZHcCfNuv4laFWpaJjH-_f4Fge26M,1700
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.89.dist-info/METADATA,sha256=p-7mBPbyYjorg8Ksfw8-X64mbgRuaU4wcGkxcYL16No,463
40
- pyntcli-0.1.89.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
41
- pyntcli-0.1.89.dist-info/entry_points.txt,sha256=kcGmqAxXDttNk2EPRcqunc_LTVp61gzakz0v-GEE2SY,43
42
- pyntcli-0.1.89.dist-info/top_level.txt,sha256=u9MDStwVHB7UG8PUcODeWCul_NvzL2EzoLvSlgwLHFs,30
43
- pyntcli-0.1.89.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,,