mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-23 04:15:27 +02:00
mssqlclient.py, impacket-mssqlclient: add page (#15908)
This commit is contained in:
parent
4048f4921c
commit
c51da85576
2 changed files with 46 additions and 0 deletions
9
pages/common/impacket-mssqlclient.md
Normal file
9
pages/common/impacket-mssqlclient.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# impacket-mssqlclient
|
||||
|
||||
> This command is an alias of `mssqlclient.py`.
|
||||
> Part of the Impacket suite.
|
||||
> More information: <https://github.com/fortra/impacket>.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr mssqlclient.py`
|
37
pages/common/mssqlclient.py.md
Normal file
37
pages/common/mssqlclient.py.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# mssqlclient.py
|
||||
|
||||
> Connect to Microsoft SQL Server instances and execute queries.
|
||||
> Part of the Impacket suite.
|
||||
> More information: <https://github.com/fortra/impacket>.
|
||||
|
||||
- Connect to an MSSQL server using Windows authentication:
|
||||
|
||||
`mssqlclient.py -windows-auth {{domain}}/{{username}}:{{password}}@{{target}}`
|
||||
|
||||
- Connect using SQL server authentication:
|
||||
|
||||
`mssqlclient.py {{username}}:{{password}}@{{target}}`
|
||||
|
||||
- Connect using pass-the-hash authentication:
|
||||
|
||||
`mssqlclient.py {{domain}}/{{username}}@{{target}} -hashes {{LM_Hash}}:{{NT_Hash}}`
|
||||
|
||||
- Connect using Kerberos authentication (requires valid tickets):
|
||||
|
||||
`mssqlclient.py -k {{domain}}/{{username}}@{{target}}`
|
||||
|
||||
- Execute a specific SQL command upon connection:
|
||||
|
||||
`mssqlclient.py {{username}}:{{password}}@{{target}} -query "{{SELECT user_name();}}"`
|
||||
|
||||
- Execute multiple SQL commands from a file:
|
||||
|
||||
`mssqlclient.py {{username}}:{{password}}@{{target}} -file {{path/to/sql_file.sql}}`
|
||||
|
||||
- Connect to a specific database instance (default is `None`):
|
||||
|
||||
`mssqlclient.py {{username}}:{{password}}@{{target}} -db {{database_name}}`
|
||||
|
||||
- Display SQL queries before execution:
|
||||
|
||||
`mssqlclient.py {{username}}:{{password}}@{{target}} -show`
|
Loading…
Add table
Reference in a new issue