Update cheatsheets

This commit is contained in:
ivuorinen
2025-05-27 00:19:48 +00:00
parent 7b30c71887
commit 03f282e95b
7 changed files with 136 additions and 3 deletions

41
tldr/smbserver.py Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# smbserver.py
> A Python-based SMB server for hosting shares (requires root for port 445).
> More information: <https://github.com/fortra/impacket>.
- Set up a basic SMB share:
`smbserver.py {{sharename}} {{path/to/share}}`
- Set up a share with a custom comment:
`smbserver.py -comment {{my_share}} {{sharename}} {{path/to/share}}`
- Set up a share with username and password authentication:
`smbserver.py -username {{username}} -password {{password}} {{sharename}} {{path/to/share}}`
- Set up a share with NTLM hash authentication:
`smbserver.py -hashes {{LMHASH}}:{{NTHASH}} {{sharename}} {{path/to/share}}`
- Set up a share on a specific interface:
`smbserver.py {{[-ip|--interface-address]}} {{interface_ip_address}} {{sharename}} {{path/to/share}}`
- Set up a share on a non-standard SMB port:
`smbserver.py -port {{port}} {{sharename}} {{path/to/share}}`
- Set up a share with SMB2 support:
`smbserver.py -smb2support {{sharename}} {{path/to/share}}`
- Set up a share and log commands to an output file:
`smbserver.py -outputfile {{path/to/output_file}} {{sharename}} {{path/to/share}}`