Skip to content

Releases: jborean93/smbprotocol

v1.17.0

Choose a tag to compare

@jborean93 jborean93 released this 07 Jul 03:15
55e643a

What's Changed

New Contributors

1.17.0 - 2026-07-07

  • Drop support for Python 3.9, minimum verison if now 3.10
  • Added the hostname_override kwarg to smbprotocol.Session that can override the hostname used in the SPN for authentication
  • Correctly perform a DFS referral lookup in the query_directory on a directory
  • Fix the FlagField str representation when the flag_type contains a dunder attribute with an int value
  • Added some extra flags from MS-SMB2 that have been added recently
  • Fix Connection.client_security_mode to be SMB2_NEGOTIATE_SIGNING_REQUIRED when server reports signing is required
  • Solve numerous issues with smbclient.rmtree and ignore_errors not working with various exceptions
  • Make smbclient.scandir return a context manager that can close SMB resources. This method should now be called like
    • The return value is still an iterable and will continue to work as it did before but code should still be updated to use the context manager to ensure resources are released
with smbclient.scandir(...) as scan_gen:
    for entry in scan_gen:
        ...
  • Handle STATUS_NO_SUCH_FILE during smbclient.scandir when using a pattern that matches no file in the specified path
  • Improve various threading race conditions and deadlocks in the underlying client handler

Full Changelog: v1.16.1...v1.17.0

v1.16.1

Choose a tag to compare

@jborean93 jborean93 released this 02 Apr 02:52
7323426

1.16.1 - 2026-04-02

  • Fix memory leaks in Structure and subclasses by converting lambda default values to static methods and using weakref.proxy to prevent circular references
  • Fix smbclient.shutil.copyfile to fallback to client-side copy when server-side SMB copy is not supported (STATUS_NOT_SUPPORTED)
  • Fix create context offset calculation when opening a file or directory
  • Fix potential deadlock when worker thread attempts to disconnect and join itself
  • Handle ECONNABORTED socket error during connection teardown

What's Changed

  • Fix create_context offset when opening a dir/file by @laxa in #338
  • Fix Memory Leaks in Structure and Structure Subclasses by @PyWoody in #340
  • Fix copyfile fallback when server-side SMB copy is unsupported by @K3N44N in #337
  • Handle ECONNABORTED and avoid joining the current thread by @avivbrg in #323

New Contributors

Full Changelog: v1.16.0...v1.16.1

v1.16.0

Choose a tag to compare

@jborean93 jborean93 released this 09 Feb 00:48
cd7d206

What's Changed

New Contributors

Full Changelog: v1.15.0...v1.16.0

v1.15.0

Choose a tag to compare

@jborean93 jborean93 released this 11 Nov 21:18
af78f1a

What's Changed

  • Fix Impacket logoff session id check by @jborean93 in #291
  • Update session id logic by @jborean93 in #293
  • Add smbclient.liststreams to enumerate ADS streams by @mon in #294
  • Add some type annotations, most notably to smbclient.open_file by @mon in #295
  • Add Python 3.13 support and prepare for release by @jborean93 in #299

1.15.0 - 2024-11-12

  • Update session id lookup logic to comply with MS-SMB2 spec
  • Remove connection from global connection cache even if failing to close it
  • Added smbclient.liststreams as a way to list the Alternate Data Streams in a file/directory
  • Added official support for Python 3.13

New Contributors

  • @mon made their first contribution in #294

Full Changelog: v1.14.0...v1.15.0

v1.14.0

Choose a tag to compare

@jborean93 jborean93 released this 25 Aug 21:21
a951779

What's Changed

1.14.0 - 2024-08-26

  • Dropped support for Python 3.7
  • SMBDirEntryInformation.last_write_time is now annotated as datetime.datetime. Previously, it was datetime.date. #279

New Contributors

Full Changelog: v1.13.0...v1.14.0

v1.13.0

Choose a tag to compare

@jborean93 jborean93 released this 21 Mar 00:48
355239c

What's Changed

New Contributors

1.13.0 - 2024-03-21

  • Added the property smb_info on SMBDirEntry which returns a named tuple SMBDirEntryInformation containing metadata already retrieved in the scandir operation.
    • This avoid having to call stat() to retrieve data like the file attributes or datetime fields that is already available
  • Ensure DateTimeField values are set to UTC timezones as FILETIME values are in UTC
  • Stop using datetime.datetime.utcfromtimestamp() as it has been deprecated
  • Added default timeout for disconnect operations for 60 seconds to ensure the process doesn't hang forever when closing a broken connection
  • smbprotocol.connection.Connection.disconnect() now waits (with a timeout) for the message processing threads to be stopped before returning.
  • Do not set the SMB SessionId and TreeId in the headers to 0xFFFFFFFF for related compound requests
  • Ensures the source file for shutil.copyfile is opened with share_access="r" for better compatibility with files already opened by something else
  • Remove endless authentication loop when the context is complete and no more input messages are needed

Full Changelog: v1.12.0...v1.13.0

v1.12.0

Choose a tag to compare

@jborean93 jborean93 released this 09 Nov 06:11
190667f

What's Changed

1.12.0 - 2023-11-09

  • Added the DiskFull error and message for the NTSTATUS code 0xC000007F - #245

New Contributors

Full Changelog: v1.11.0...v1.12.0

v1.11.0

Choose a tag to compare

@jborean93 jborean93 released this 05 Sep 20:33
0caa9f5

What's Changed

1.11.0 - 2023-09-06

  • Fix up pre authenticated session id lookups that were failing with Linux ksmbd
  • Removes logging.NullHandler() being set in the root smbprotocol namespace
  • Adds basic support for remote to local and vice versa file operations with smbclient.shutil.copytree
  • Fixes DFS infinite recursion error when dealing with a file that does not exist on a DFS namespace

New Contributors

Full Changelog: v1.10.1...v1.11.0

v1.10.1

Choose a tag to compare

@jborean93 jborean93 released this 13 Nov 19:18
1ea33ab

1.10.1 - 2022-11-14

  • Raise the original BadNetworkName error if the server doesn't indicate it supports DFS or FSDriverRequired was raised trying to lookup the DFS information - #196
  • Fix pre auth session id tracking if the intermediate token messages return 0 as the session id - #203

Full Changelog: v1.10.0...v1.10.1

v1.10.0

Choose a tag to compare

@jborean93 jborean93 released this 06 Nov 20:22
f3d40c5

What's Changed

New Contributors

Full Changelog: v1.9.0...v1.10.0