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

View File

@@ -0,0 +1,13 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# elasticsearch-syskeygen
> Create a system key file in the Elasticsearch configuration directory.
> More information: <https://www.elastic.co/docs/reference/elasticsearch/command-line-tools/syskeygen>.
- Generate the `system_key` file in the default `$ES_HOME/config` directory:
`elasticsearch-syskeygen`

View File

@@ -5,13 +5,19 @@ source: https://github.com/tldr-pages/tldr.git
---
# gettext
> Get string translations.
> Translates a string using stored translations in a compiled `.mo` file.
> Translations are stored in `/usr/share/locale/<locale_name>/LC_MESSAGES/` with `domain` being the filename without its extension.
> See also: `msgfmt`, `msgunfmt`.
> More information: <https://www.gnu.org/software/gettext/manual/html_node/gettext-Invocation.html>.
- Get the translation of a string or output a default string if it doesn't exist:
- Get the translation of a string as specified in the domain file (falls back to given `msgid` if no translation exists):
`LANGUAGE={{locale}} gettext {{msgid}} {{default_value}}`
`LANGUAGE={{locale}} gettext {{[-d|--domain]}} {{domain}} "{{msgid}}"`
- Display help:
`gettext {{[-h|--help]}}`
- Display gettext version:
`gettext {{[-V|--version]}}`

View File

@@ -21,3 +21,11 @@ source: https://github.com/tldr-pages/tldr.git
- List all root nodes found:
`git fsck --root`
- Show all unreachable and dangling objects, ignore reflogs, and perform a full integrity check:
`git fsck --dangling --no-reflogs --unreachable --full`
- Check connectivity only (skip object integrity verification):
`git fsck --connectivity-only`

12
tldr/impacket-smbclient Normal file
View File

@@ -0,0 +1,12 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# impacket-smbclient
> This command is an alias of `smbclient.py`.
- View documentation for the original command:
`tldr smbclient.py`

12
tldr/impacket-smbserver Normal file
View File

@@ -0,0 +1,12 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# impacket-smbserver
> This command is an alias of `smbserver.py`.
- View documentation for the original command:
`tldr smbserver.py`

41
tldr/smbclient.py Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# smbclient.py
> A Python-based SMB client for interacting with SMB servers.
> More information: <https://github.com/fortra/impacket>.
- Connect to an SMB server with username and password:
`smbclient.py {{domain}}/{{username}}:{{password}}@{{target}}`
- Connect using NTLM hashes for authentication:
`smbclient.py -hashes {{LM_HASH}}:{{NT_HASH}} {{domain}}/{{username}}@{{target}}`
- Connect using Kerberos authentication:
`smbclient.py -k {{domain}}/{{username}}@{{target}}`
- Connect specifying a domain controller IP:
`smbclient.py -dc-ip {{domain_controller_ip}} {{domain}}/{{username}}:{{password}}@{{target}}`
- Connect to a specific target IP instead of NetBIOS name:
`smbclient.py -target-ip {{target_ip}} {{domain}}/{{username}}:{{password}}@{{target}}`
- Connect to a non-standard SMB port:
`smbclient.py -port {{port}} {{domain}}/{{username}}:{{password}}@{{target}}`
- Execute commands from an input file in the SMB shell:
`smbclient.py -inputfile {{path/to/input_file}} {{domain}}/{{username}}:{{password}}@{{target}}`
- Log SMB client commands to an output file:
`smbclient.py -outputfile {{path/to/output_file}} {{domain}}/{{username}}:{{password}}@{{target}}`

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}}`