pyntcli 0.1.83__py3-none-any.whl → 0.1.84__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.83"
1
+ __version__ = "0.1.84"
pyntcli/commands/burp.py CHANGED
@@ -64,6 +64,9 @@ def decode_request(item) -> str:
64
64
 
65
65
  def replay_req(item, proxy_port):
66
66
  url = item["url"]
67
+ if not util.is_http_handler(url):
68
+ return None
69
+
67
70
  decoded_req = decode_request(item)
68
71
 
69
72
  method = decoded_req.split("\r\n")[0].split(" ")[0]
@@ -293,6 +296,13 @@ class BurpCommand(sub_command.PyntSubCommand):
293
296
 
294
297
  self._stop_proxy(args)
295
298
 
299
+ ui_thread.print(
300
+ ui_thread.PrinterText(
301
+ "Please wait while we scan and generate the report, it may take a few minutes...",
302
+ ui_thread.PrinterText.INFO,
303
+ )
304
+ )
305
+
296
306
  with ui_thread.progress(
297
307
  "ws://localhost:{}/progress?scanId={}".format(args.port, self.scan_id),
298
308
  partial(lambda *args: None),
@@ -0,0 +1,167 @@
1
+ STATIC_FILE_EXTENSIONS = [
2
+ '.css',
3
+ '.js',
4
+ '.jpg',
5
+ '.jpeg',
6
+ '.png',
7
+ '.gif',
8
+ '.svg',
9
+ '.ico',
10
+ '.html',
11
+ '.woff',
12
+ '.woff2',
13
+ '.ttf',
14
+ '.eot',
15
+ '.otf',
16
+ '.map',
17
+ '.json',
18
+ '.xml',
19
+ '.txt',
20
+ '.csv',
21
+ '.pdf',
22
+ '.doc',
23
+ '.docx',
24
+ '.xls',
25
+ '.xlsx',
26
+ '.ppt',
27
+ '.pptx',
28
+ '.mp3',
29
+ '.mp4',
30
+ '.avi',
31
+ '.mov',
32
+ '.wmv',
33
+ '.flv',
34
+ '.wav',
35
+ '.zip',
36
+ '.tar',
37
+ '.gz',
38
+ '.7z',
39
+ '.rar',
40
+ '.exe',
41
+ '.msi',
42
+ '.apk',
43
+ '.dmg',
44
+ '.iso',
45
+ '.img',
46
+ '.bin',
47
+ '.deb',
48
+ '.rpm',
49
+ '.sh',
50
+ '.bat',
51
+ '.cmd',
52
+ '.ps1',
53
+ '.py',
54
+ '.java',
55
+ '.c',
56
+ '.cpp',
57
+ '.h',
58
+ '.hpp',
59
+ '.cs',
60
+ '.php',
61
+ '.rb',
62
+ '.pl',
63
+ '.go',
64
+ '.swift',
65
+ '.kt',
66
+ '.ts',
67
+ '.html',
68
+ '.css',
69
+ '.js',
70
+ '.json',
71
+ '.xml',
72
+ '.yaml',
73
+ '.yml',
74
+ '.md',
75
+ '.rst',
76
+ '.txt',
77
+ '.csv',
78
+ '.tsv',
79
+ '.xls',
80
+ '.xlsx',
81
+ '.ods',
82
+ '.odt',
83
+ '.doc',
84
+ '.docx',
85
+ '.ppt',
86
+ '.pptx',
87
+ '.pdf',
88
+ '.zip',
89
+ '.tar',
90
+ '.gz',
91
+ '.7z',
92
+ '.rar',
93
+ '.apk',
94
+ '.exe',
95
+ '.msi',
96
+ '.dmg',
97
+ '.iso',
98
+ '.img',
99
+ '.bin',
100
+ '.deb',
101
+ '.rpm',
102
+ '.sh',
103
+ '.bat',
104
+ '.cmd',
105
+ '.ps1',
106
+ '.py',
107
+ '.java',
108
+ '.c',
109
+ '.cpp',
110
+ '.h',
111
+ '.hpp',
112
+ '.cs',
113
+ '.php',
114
+ '.rb',
115
+ '.pl',
116
+ '.go',
117
+ '.swift',
118
+ '.kt',
119
+ '.ts',
120
+ '.html',
121
+ '.css',
122
+ '.js',
123
+ '.json',
124
+ '.xml',
125
+ '.yaml',
126
+ '.yml',
127
+ '.md',
128
+ '.rst',
129
+ '.txt',
130
+ '.csv',
131
+ '.tsv',
132
+ '.xls',
133
+ '.xlsx',
134
+ '.ods',
135
+ '.odt',
136
+ '.doc',
137
+ '.docx',
138
+ '.ppt',
139
+ '.pptx',
140
+ '.pdf',
141
+ '.zip',
142
+ '.tar',
143
+ '.gz',
144
+ '.7z',
145
+ '.rar',
146
+ '.apk',
147
+ '.exe',
148
+ '.msi',
149
+ '.dmg',
150
+ '.iso',
151
+ '.img',
152
+ '.bin',
153
+ '.deb',
154
+ '.rpm',
155
+ '.sh',
156
+ '.bat',
157
+ '.cmd',
158
+ '.ps1',
159
+ '.py',
160
+ '.java',
161
+ '.c',
162
+ '.cpp',
163
+ '.h',
164
+ '.hpp',
165
+ '.cs',
166
+ '.php',
167
+ ]
pyntcli/commands/util.py CHANGED
@@ -8,6 +8,7 @@ import webbrowser
8
8
  import json
9
9
  import pyntcli.log.log as log
10
10
 
11
+ from pyntcli.commands.static_file_extensions import STATIC_FILE_EXTENSIONS
11
12
  from pyntcli.pynt_docker import pynt_container
12
13
  from pyntcli.ui import report
13
14
  from pyntcli.transport import pynt_requests
@@ -16,6 +17,15 @@ from pyntcli.transport import pynt_requests
16
17
  logger = log.get_logger()
17
18
 
18
19
 
20
+ def is_http_handler(url):
21
+ path = url.split("/")[-1]
22
+ for ext in STATIC_FILE_EXTENSIONS:
23
+ if ext in path:
24
+ return False
25
+
26
+ return True
27
+
28
+
19
29
  def find_open_port() -> int:
20
30
  with socket.socket() as s:
21
31
  s.bind(('', 0))
@@ -31,6 +41,7 @@ def wait_for_healthcheck(address):
31
41
  while start + HEALTHCHECK_TIMEOUT > time.time():
32
42
  try:
33
43
  res = pynt_requests.get(address + "/healthcheck")
44
+ logger.debug("Health check response: {}".format(res.status_code))
34
45
  if res.status_code == 418:
35
46
  return
36
47
  except:
@@ -56,7 +67,7 @@ class SomeFindingsOrWarningsException(Exception):
56
67
  pass
57
68
 
58
69
 
59
- @contextmanager
70
+ @ contextmanager
60
71
  def create_default_file_mounts(args):
61
72
  html_report_path = os.path.join(tempfile.gettempdir(), "results.html")
62
73
  json_report_path = os.path.join(tempfile.gettempdir(), "results.json")
@@ -66,7 +77,7 @@ def create_default_file_mounts(args):
66
77
  json_report_path = os.path.join(os.getcwd(), "pynt_results.json")
67
78
 
68
79
  mounts = []
69
- with open(html_report_path, "w",encoding="utf-8"), open(json_report_path, "w",encoding="utf-8"):
80
+ with open(html_report_path, "w", encoding="utf-8"), open(json_report_path, "w", encoding="utf-8"):
70
81
  mounts.append(pynt_container.create_mount(json_report_path, "/etc/pynt/results/results.json"))
71
82
  mounts.append(pynt_container.create_mount(html_report_path, "/etc/pynt/results/results.html"))
72
83
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyntcli
3
- Version: 0.1.83
3
+ Version: 0.1.84
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=YNVbuQj-JrlVU3yGuccLkZ5P-L-37tQUcshGno0Ijlo,23
1
+ pyntcli/__init__.py,sha256=3Ugcq_g7QAJpn2vNez96An4skXBk9KuWBd2osYpu08Y,23
2
2
  pyntcli/main.py,sha256=wg2Is1ckRCb3EwsLFshDsbPKvntPOR7sDB2Nq-DW4wk,5689
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=2FqLc65SjuXdenUS1ggC6dGRU_iSA52Ft_8OnfGsm_8,11193
8
+ pyntcli/commands/burp.py,sha256=7OCLgmIpgXcrUdx0wUAnWg1ER982vsGGvtptNpNENMk,11480
9
9
  pyntcli/commands/command.py,sha256=0O7Za_cjT6vDkDfM0OTMPB6DLI3U1r1R7lXQydz7458,9495
10
10
  pyntcli/commands/har.py,sha256=mSCbTUnxQrKzJd-dAWoc6Tkw6tU1LDH7Ha1w2ylrrrg,3654
11
11
  pyntcli/commands/id_command.py,sha256=UBEgMIpm4vauTCsKyixltiGUolNg_OfHEJvJ_i5BpJY,943
@@ -14,8 +14,9 @@ pyntcli/commands/newman.py,sha256=y0KolwMgsvoqPz2mp0QRug_qNr-ftOZbu_tN7h4bH7I,48
14
14
  pyntcli/commands/postman.py,sha256=GWq4NJJ_9WdFiXk5rv2nTyMM27w50XLh4LKkuuWpw4I,4721
15
15
  pyntcli/commands/pynt_cmd.py,sha256=KOl9guUtesO2JcMM5nPKKkjnK6F9HV4jHHcoUk4KVhw,2825
16
16
  pyntcli/commands/root.py,sha256=dmgdzoFuf5LkwrkwvWf1MtlwTBgsVpS85Yr_cQCVuGA,3291
17
+ pyntcli/commands/static_file_extensions.py,sha256=PZJb02BI-64tbU-j3rdCNsXzTh7gkIDGxGKbKNw3h5k,1995
17
18
  pyntcli/commands/sub_command.py,sha256=GF3-rE_qk2L4jGPFqHLm9SdGINmu3EakhjJTFyWjRms,374
18
- pyntcli/commands/util.py,sha256=NJBJk4tKzrWmilYdo-7CROH5IXKl0UQAPKaMzRZtxm8,2827
19
+ pyntcli/commands/util.py,sha256=oc3xrc7lUI3sM1-__5hw0COt8JcREHKFkOccFtG-rt0,3146
19
20
  pyntcli/log/__init__.py,sha256=cOGwOYzMoshEbZiiasBGkj6wF0SBu3Jdpl-AuakDesw,19
20
21
  pyntcli/log/log.py,sha256=cWCdWmUaAwePwdhYDcgNMEG9d9RM34sGahxBCYEdv2Y,1069
21
22
  pyntcli/pynt_docker/__init__.py,sha256=PQIOVxc7XXtMLfEX7ojgwf_Z3mmTllO3ZvzUZTPOxQY,30
@@ -35,8 +36,8 @@ pyntcli/ui/ui_thread.py,sha256=OVTbiIFMg2KgxAvHf7yy86xGm4RVS2vj_VYZkMi-SRY,4956
35
36
  tests/conftest.py,sha256=gToq5K74GtgeGQXjFvXSzMaE6axBYxAzcFG5XJPOXjI,427
36
37
  tests/auth/test_login.py,sha256=KFlzWhXBAuwdi7GXf16gCB3ya94LQG2wjcSChE149rQ,3798
37
38
  tests/store/test_cred_store.py,sha256=_7-917EtNC9eKEumO2_lt-7KuDmCwOZFaowCm7DbA_A,254
38
- pyntcli-0.1.83.dist-info/METADATA,sha256=XcLyBCUa_7GOUyGDqDBpGeWC5M-i1C4DM1CoWtCL7ok,463
39
- pyntcli-0.1.83.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
40
- pyntcli-0.1.83.dist-info/entry_points.txt,sha256=kcGmqAxXDttNk2EPRcqunc_LTVp61gzakz0v-GEE2SY,43
41
- pyntcli-0.1.83.dist-info/top_level.txt,sha256=u9MDStwVHB7UG8PUcODeWCul_NvzL2EzoLvSlgwLHFs,30
42
- pyntcli-0.1.83.dist-info/RECORD,,
39
+ pyntcli-0.1.84.dist-info/METADATA,sha256=IDf8-YB7CT9f2B4tdFgj7mzSZ9TVpvpEDfKvZGYysh4,463
40
+ pyntcli-0.1.84.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
41
+ pyntcli-0.1.84.dist-info/entry_points.txt,sha256=kcGmqAxXDttNk2EPRcqunc_LTVp61gzakz0v-GEE2SY,43
42
+ pyntcli-0.1.84.dist-info/top_level.txt,sha256=u9MDStwVHB7UG8PUcODeWCul_NvzL2EzoLvSlgwLHFs,30
43
+ pyntcli-0.1.84.dist-info/RECORD,,