Major overhaul to the theme and now functioning.

This commit is contained in:
2026-01-05 16:07:30 -05:00
parent 5823ca3c39
commit a475dfeab6
5218 changed files with 1643729 additions and 13229 deletions
@@ -7,9 +7,16 @@ class SambaManager:
def __init__(self, server_ip, share_name, username, password, client_machine_name="smbclient"):
self.server_ip = server_ip
self.share_name = share_name
self.username = username
self.password = password
self.client_machine_name = client_machine_name
self.conn = SMBConnection(username, password, client_machine_name, "server_name", use_ntlm_v2=True)
self.conn.connect(server_ip, 139)
def clone(self):
"""Creates a new independent connection with the same credentials."""
return SambaManager(self.server_ip, self.share_name, self.username, self.password, self.client_machine_name)
def list_path(self, current_dir_path="/"):
try:
files = self.conn.listPath(self.share_name, current_dir_path)
@@ -45,6 +52,7 @@ class SambaManager:
def upload_file(self, path, file_obj):
try:
logger.info(f"Uploading file to share '{self.share_name}' at path: '{path}'")
self.conn.storeFile(self.share_name, path, file_obj)
return {"success": True}
except Exception as e: