Skip to content

Commit

Permalink
Release 2.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
p0dalirius committed Nov 27, 2024
1 parent ea343aa commit 2575fea
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 24 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

## Features

- [x] `acls`: List ACLs of files and folders in cwd. Syntax: `acls`
- [x] `bat`: Pretty prints the contents of a file. Syntax: `bat <file>`
- [x] `cat`: Get the contents of a file. Syntax: `cat <file>`
- [x] `cd`: Change the current working directory. Syntax: `cd <directory>`
Expand Down Expand Up @@ -58,7 +59,6 @@ To install `smbclient-ng`, you can use pip. Run the following command in your te
python3 -m pip install smbclientng
```


## Demonstration

![](./.github/example.png)
Expand All @@ -73,9 +73,11 @@ $ ./smbclient-ng.py
/ __| '_ ` _ \| '_ \ / __| | |/ _ \ '_ \| __|____| '_ \ / _` |
\__ \ | | | | | |_) | (__| | | __/ | | | ||_____| | | | (_| |
|___/_| |_| |_|_.__/ \___|_|_|\___|_| |_|\__| |_| |_|\__, |
by @podalirius_ v2.1.5 |___/
by @podalirius_ v2.1.6 |___/
usage: smbclient-ng.py [-h] [--debug] [--no-colors] [-S startup_script] [-N] [-L LOGFILE] --host HOST [--port PORT] [--kdcHost FQDN KDC] [-d DOMAIN] [-u USER] [--no-pass | -p [PASSWORD] | -H [LMHASH:]NTHASH | --aes-key hex key] [-k]
usage: smbclient-ng.py [-h] [--debug] [--no-colors] [-S startup_script] [-N] [-L LOGFILE] [--timeout TIMEOUT]
[--advertised-name ADVERTISED_NAME] --host HOST [--port PORT] [--kdcHost FQDN KDC] [-d DOMAIN] [-u USER]
[--no-pass | -p [PASSWORD] | -H [LMHASH:]NTHASH | --aes-key hex key] [-k]
smbclient-ng, a fast and user friendly way to interact with SMB shares.
Expand All @@ -89,6 +91,9 @@ options:
Non interactive mode.
-L LOGFILE, --logfile LOGFILE
File to write logs to.
--timeout TIMEOUT Timeout in seconds for SMB connections (default: 3)
--advertised-name ADVERTISED_NAME
Advertised name of your machine to the SMB client.
Target:
--host HOST IP address or hostname of the SMB Server to connect to.
Expand All @@ -106,19 +111,18 @@ Authentication & connection:
-H [LMHASH:]NTHASH, --hashes [LMHASH:]NTHASH
NT/LM hashes, format is LMhash:NThash.
--aes-key hex key AES key to use for Kerberos Authentication (128 or 256 bits).
-k, --kerberos Use Kerberos authentication. Grabs credentials from .ccache file (KRB5CCNAME) based on target parameters. If valid credentials cannot be found, it will use the ones specified in the command line.
-k, --kerberos Use Kerberos authentication. Grabs credentials from .ccache file (KRB5CCNAME) based on target parameters. If
valid credentials cannot be found, it will use the ones specified in the command line.
```


## Quick win commands

+ Connect to a remote SMB server:
```
./smbclient-ng.py -d "LAB" -u "Administrator" -p 'Admin123!' --host "10.0.0.201"
```
## Contributing
Pull requests are welcome. Feel free to open an issue if you want to add other features.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "smbclientng"
version = "2.1.6"
version = "2.1.7"
description = "smbclient-ng, a fast and user friendly way to interact with SMB shares."
authors = ["p0dalirius"]

Expand Down
22 changes: 14 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
import setuptools


VERSION = "2.1.6"
VERSION = "2.1.7"


long_description = """
<p align="center">
smbclient-ng, a fast and user friendly way to interact with SMB shares.
<br>
Expand All @@ -21,9 +22,9 @@
<br>
</p>
## Features
- [x] `acls`: List ACLs of files and folders in cwd. Syntax: `acls`
- [x] `bat`: Pretty prints the contents of a file. Syntax: `bat <file>`
- [x] `cat`: Get the contents of a file. Syntax: `cat <file>`
- [x] `cd`: Change the current working directory. Syntax: `cd <directory>`
Expand Down Expand Up @@ -70,7 +71,6 @@
python3 -m pip install smbclientng
```
## Demonstration
![](./.github/example.png)
Expand All @@ -85,9 +85,11 @@
/ __| '_ ` _ \| '_ \ / __| | |/ _ \ '_ \| __|____| '_ \ / _` |
\__ \ | | | | | |_) | (__| | | __/ | | | ||_____| | | | (_| |
|___/_| |_| |_|_.__/ \___|_|_|\___|_| |_|\__| |_| |_|\__, |
by @podalirius_ v2.1.5 |___/
by @podalirius_ v2.1.6 |___/
usage: smbclient-ng.py [-h] [--debug] [--no-colors] [-S startup_script] [-N] [-L LOGFILE] --host HOST [--port PORT] [--kdcHost FQDN KDC] [-d DOMAIN] [-u USER] [--no-pass | -p [PASSWORD] | -H [LMHASH:]NTHASH | --aes-key hex key] [-k]
usage: smbclient-ng.py [-h] [--debug] [--no-colors] [-S startup_script] [-N] [-L LOGFILE] [--timeout TIMEOUT]
[--advertised-name ADVERTISED_NAME] --host HOST [--port PORT] [--kdcHost FQDN KDC] [-d DOMAIN] [-u USER]
[--no-pass | -p [PASSWORD] | -H [LMHASH:]NTHASH | --aes-key hex key] [-k]
smbclient-ng, a fast and user friendly way to interact with SMB shares.
Expand All @@ -101,6 +103,9 @@
Non interactive mode.
-L LOGFILE, --logfile LOGFILE
File to write logs to.
--timeout TIMEOUT Timeout in seconds for SMB connections (default: 3)
--advertised-name ADVERTISED_NAME
Advertised name of your machine to the SMB client.
Target:
--host HOST IP address or hostname of the SMB Server to connect to.
Expand All @@ -118,9 +123,10 @@
-H [LMHASH:]NTHASH, --hashes [LMHASH:]NTHASH
NT/LM hashes, format is LMhash:NThash.
--aes-key hex key AES key to use for Kerberos Authentication (128 or 256 bits).
-k, --kerberos Use Kerberos authentication. Grabs credentials from .ccache file (KRB5CCNAME) based on target parameters. If valid credentials cannot be found, it will use the ones specified in the command line.
```
-k, --kerberos Use Kerberos authentication. Grabs credentials from .ccache file (KRB5CCNAME) based on target parameters. If
valid credentials cannot be found, it will use the ones specified in the command line.
```
## Quick win commands
Expand All @@ -129,10 +135,10 @@
./smbclient-ng.py -d "LAB" -u "Administrator" -p 'Admin123!' --host "10.0.0.201"
```
## Contributing
Pull requests are welcome. Feel free to open an issue if you want to add other features.
""".strip()

with open("requirements.txt", "r", encoding="utf-8") as f:
Expand Down
2 changes: 1 addition & 1 deletion smbclientng/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from smbclientng.core.SessionsManager import SessionsManager


VERSION = "2.1.6"
VERSION = "2.1.7"


def parseArgs():
Expand Down
16 changes: 8 additions & 8 deletions smbclientng/core/CommandCompleter.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ class CommandCompleter(object):
"""

commands = {
"acls": {
"description": [
"List ACLs of files and folders in cwd.",
"Syntax: 'acls'"
],
"subcommands": [],
"autocomplete": ["remote_directory"]
},
"bat": {
"description": [
"Pretty prints the contents of a remote file.",
Expand Down Expand Up @@ -220,14 +228,6 @@ class CommandCompleter(object):
"subcommands": [],
"autocomplete": ["remote_directory"]
},
"acls": {
"description": [
"List ACLs of files and folders in cwd.",
"Syntax: 'acls'"
],
"subcommands": [],
"autocomplete": ["remote_directory"]
},
"ltree": {
"description": [
"Displays a tree view of the local directories.",
Expand Down

0 comments on commit 2575fea

Please sign in to comment.