NetExec icon indicating copy to clipboard operation
NetExec copied to clipboard

Add error checking to mssql_exec

Open NeffIsBack opened this issue 2 months ago • 0 comments

Description

Until now, when error occur on SQL execution there is no way to display and check that. As soon as https://github.com/fortra/impacket/pull/2082 is merged we can then check with conn.lastError if there was an error while executing the command.

This PR will check for errors when executing --query and --execute and will display it appropriately.

Type of change

Insert an "x" inside the brackets for relevant items (do not delete options)

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Deprecation of feature or functionality
  • [ ] This change requires a documentation update
  • [ ] This requires a third party update (such as Impacket, Dploot, lsassy, etc)

Setup guide for the review

Execute invalid SQL queries.

Screenshots (if appropriate):

Before&After (with the change to impacket): image

NeffIsBack avatar Nov 14 '25 14:11 NeffIsBack