rapid7 / ruby_smb

A native Ruby implementation of the SMB Protocol Family
Other
80 stars 80 forks source link

Ensure CommunicationError is raised correctly, not EncryptionError #263

Closed cgranleese-r7 closed 4 months ago

cgranleese-r7 commented 4 months ago

[!note] This PR is in conjunction with a PR in Metasploit-Framework . This PR will need to be landed before the framework PR.

This PR is to add a more precise error being raised when a session is dead. Currently in Metasploit-Framework if a session dies we would have had a RubySMB::Error::EncryptionError error being raised which wasn't accurate. This change will now raise an RubySMB::Error::CommunicationError when a session dies, which feels a lot closer in terms of accuracy.