pyservx 1.0.0__py3-none-any.whl → 1.0.1__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.
pyservx/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.0.0"
1
+ __version__ = "1.0.1" # Changed from 1.0.0
pyservx/server.py CHANGED
@@ -90,10 +90,10 @@ class FileRequestHandler(http.server.SimpleHTTPRequestHandler):
90
90
  # Prevent path traversal attacks
91
91
  path = posixpath.normpath(urllib.parse.unquote(path))
92
92
  rel_path = path.lstrip('/')
93
- abs_path = os.path.abspath(os.path.join(self.server.base_dir, rel_path))
94
- if not abs_path.startswith(self.server.base_dir):
93
+ abs_path = os.path.abspath(os.path.join(self.base_dir, rel_path))
94
+ if not abs_path.startswith(self.base_dir):
95
95
  logging.warning(f"Path traversal attempt detected: {path}")
96
- return self.server.base_dir # Prevent access outside the base directory
96
+ return self.base_dir # Prevent access outside the base directory
97
97
  return abs_path
98
98
 
99
99
  def do_GET(self):
@@ -585,7 +585,7 @@ def run(base_dir):
585
585
  # Set up the server with the base directory
586
586
  class Handler(FileRequestHandler):
587
587
  def __init__(self, *args, **kwargs):
588
- self.server.base_dir = base_dir
588
+ self.base_dir = base_dir
589
589
  super().__init__(*args, **kwargs)
590
590
 
591
591
  # Print IP addresses before starting the server
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyservx
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: A simple HTTP server for file sharing with folder zipping and file upload capabilities
5
5
  Author-email: SubZ3r0x01 <your.email@example.com>
6
6
  License: MIT License
@@ -0,0 +1,7 @@
1
+ pyservx/__init__.py,sha256=P46sCZCW1SAUson0VT-PllU42gLB5p1DFWEt12Kdn38,43
2
+ pyservx/server.py,sha256=cyowYkXVR3PhffeNVO5YKb4UYYmDwAIEmRhOwN5ENtA,21882
3
+ pyservx-1.0.1.dist-info/METADATA,sha256=1p3PW36RHHyRFLdkE1DGo10SHqW68KIN4Irsh6BacMY,1382
4
+ pyservx-1.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
+ pyservx-1.0.1.dist-info/entry_points.txt,sha256=tRdMhIAJUa2bpIJ5h9ZkKPdSSp8fnYlPDGcJhdh01TY,48
6
+ pyservx-1.0.1.dist-info/licenses/LICENSE,sha256=RQfbbgFORXVcSaR2_p6XSOR7k0yw1iGfpnW7mg1NW9c,1074
7
+ pyservx-1.0.1.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- pyservx/__init__.py,sha256=Aj77VL1d5Mdku7sgCgKQmPuYavPpAHuZuJcy6bygQZE,21
2
- pyservx/server.py,sha256=4SnNXHazlkRfXybqbwT7RZzXhBkd8d7ZY_FOlmJlPRw,21910
3
- pyservx-1.0.0.dist-info/METADATA,sha256=Kk2bXyOOtftvrYVrA6Yoadr0Xgeon9wJG5ez0-O5h-8,1382
4
- pyservx-1.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
- pyservx-1.0.0.dist-info/entry_points.txt,sha256=tRdMhIAJUa2bpIJ5h9ZkKPdSSp8fnYlPDGcJhdh01TY,48
6
- pyservx-1.0.0.dist-info/licenses/LICENSE,sha256=RQfbbgFORXVcSaR2_p6XSOR7k0yw1iGfpnW7mg1NW9c,1074
7
- pyservx-1.0.0.dist-info/RECORD,,