diff --git a/README.md b/README.md index 7bb32d9..f009226 100644 --- a/README.md +++ b/README.md @@ -11,29 +11,33 @@ ## Features -- [x] `cd`: Change the current working directory. -- [x] `close`: Closes the SMB connection to the remote machine. -- [x] `dir`: List the contents of the current working directory. -- [x] `exit`: Exits the smbclient-ng script. -- [x] `get`: Get a remote file to a local directory. (`get -r` to recursively download a remote directory to local). -- [x] `help`: Displays this help message. -- [x] `info`: Get information about the server and or the share. -- [x] `lcd`: Changes the current local directory. -- [x] `lls`: Lists the contents of the current local directory. -- [x] `lmkdir`: Creates a new local directory. -- [x] `lpwd`: Shows the current local directory. -- [x] `lrm`: Removes a local file. -- [x] `lrmdir`: Removes a local directory. -- [x] `ls`: List the contents of the current remote working directory. -- [x] `mkdir`: Creates a new remote directory. -- [x] `module`: Loads a specific module for additional functionalities. -- [x] `put`: Put a local file to a remote directory. (`put -r` to recursively upload a local directory to remote). -- [x] `rm`: Removes a remote file. -- [x] `rmdir`: Removes a local directory. -- [x] `reconnect`: Reconnect to the remote machine (useful if connection timed out). -- [x] `shares`: Lists the SMB shares served by the remote machine. -- [x] `use`: Use a SMB share. -- [x] `tree`: Displays a tree view of the nested subfolders. +- [x] `cd`: Change the current working directory. Syntax: `cd ` +- [x] `close`: Closes the SMB connection to the remote machine. Syntax: `close` +- [x] `connect`: Connect to the remote machine (useful if connection timed out). Syntax: `connect` +- [x] `dir`: List the contents of the current working directory. Syntax: `dir` +- [x] `exit`: Exits the smbclient-ng script. Syntax: `exit` +- [x] `get`: Get a remote file. Syntax: `get [-r] ` +- [x] `help`: Displays this help message. Syntax: `help` +- [x] `info`: Get information about the server and or the share. Syntax: `info [server|share]` +- [x] `lcd`: Changes the current local directory. Syntax: `lcd ` +- [x] `lls`: Lists the contents of the current local directory. Syntax: `lls` +- [x] `lmkdir`: Creates a new local directory. Syntax: `lmkdir ` +- [x] `lpwd`: Shows the current local directory. Syntax: `lpwd` +- [x] `lrm`: Removes a local file. Syntax: `lrm ` +- [x] `lrmdir`: Removes a local directory. Syntax: `lrmdir ` +- [x] `ls`: List the contents of the current remote working directory. Syntax: `ls` +- [x] `ltree`: Displays a tree view of the local directories. Syntax: `ltree [directory]` +- [x] `mkdir`: Creates a new remote directory. Syntax: `mkdir ` +- [x] `module`: Loads a specific module for additional functionalities. Syntax: `module ` +- [x] `put`: Put a local file or directory in a remote directory. Syntax: `put [-r] ` +- [x] `reconnect`: Reconnect to the remote machine (useful if connection timed out). Syntax: `reconnect` +- [x] `reset`: Reset the TTY output, useful if it was broken after printing a binary file on stdout. Syntax: `reset` +- [x] `rmdir`: Removes a remote directory. Syntax: `rmdir ` +- [x] `rm`: Removes a remote file. Syntax: `rm ` +- [x] `shares`: Lists the SMB shares served by the remote machine. Syntax: `shares` +- [x] `use`: Use a SMB share. Syntax: `use ` +- [x] `tree`: Displays a tree view of the remote directories. Syntax: `tree [directory]` + ## Install diff --git a/smbclientng/core/CommandCompleter.py b/smbclientng/core/CommandCompleter.py index befff6e..7251625 100644 --- a/smbclientng/core/CommandCompleter.py +++ b/smbclientng/core/CommandCompleter.py @@ -27,107 +27,185 @@ class CommandCompleter(object): commands = { "cd": { - "description": ["Change the current working directory.", "Syntax: 'cd '"], + "description": [ + "Change the current working directory.", + "Syntax: 'cd '" + ], "subcommands": [] }, "close": { - "description": ["Closes the SMB connection to the remote machine.", "Syntax: 'close'"], + "description": [ + "Closes the SMB connection to the remote machine.", + "Syntax: 'close'" + ], "subcommands": [] }, "connect": { - "description": ["Connect to the remote machine (useful if connection timed out).", "Syntax: 'Connect'"], + "description": [ + "Connect to the remote machine (useful if connection timed out).", + "Syntax: 'connect'" + ], "subcommands": [] }, "dir": { - "description": ["List the contents of the current working directory.", "Syntax: 'dir'"], + "description": [ + "List the contents of the current working directory.", + "Syntax: 'dir'" + ], "subcommands": [] }, "exit": { - "description": ["Exits the smbclient-ng script.", "Syntax: 'exit'"], + "description": [ + "Exits the smbclient-ng script.", + "Syntax: 'exit'" + ], "subcommands": [] }, "get": { - "description": ["Get a remote file.", "Syntax: 'get [-r] '"], + "description": [ + "Get a remote file.", + "Syntax: 'get [-r] '" + ], "subcommands": [] }, "help": { - "description": ["Displays this help message.", "Syntax: 'help'"], + "description": [ + "Displays this help message.", + "Syntax: 'help'" + ], "subcommands": ["format"] }, "info": { - "description": ["Get information about the server and or the share.", "Syntax: 'info [server|share]'"], + "description": [ + "Get information about the server and or the share.", + "Syntax: 'info [server|share]'" + ], "subcommands": ["server", "share"] }, "lcd": { - "description": ["Changes the current local directory.", "Syntax: 'lcd '"], + "description": [ + "Changes the current local directory.", + "Syntax: 'lcd '" + ], "subcommands": [] }, "lls": { - "description": ["Lists the contents of the current local directory.", "Syntax: 'lls'"], + "description": [ + "Lists the contents of the current local directory.", + "Syntax: 'lls'" + ], "subcommands": [] }, "lmkdir": { - "description": ["Creates a new local directory.", "Syntax: 'lmkdir '"], + "description": [ + "Creates a new local directory.", + "Syntax: 'lmkdir '" + ], "subcommands": [] }, "lpwd": { - "description": ["Shows the current local directory.", "Syntax: 'lpwd'"], + "description": [ + "Shows the current local directory.", + "Syntax: 'lpwd'" + ], "subcommands": [] }, "lrm": { - "description": ["Removes a local file.", "Syntax: 'lrm '"], + "description": [ + "Removes a local file.", + "Syntax: 'lrm '" + ], "subcommands": [] }, "lrmdir": { - "description": ["Removes a local directory.", "Syntax: 'lrmdir '"], + "description": [ + "Removes a local directory.", + "Syntax: 'lrmdir '" + ], "subcommands": [] }, "ls": { - "description": ["List the contents of the current remote working directory.", "Syntax: 'ls'"], + "description": [ + "List the contents of the current remote working directory.", + "Syntax: 'ls'" + ], "subcommands": [] }, "ltree": { - "description": ["Displays a tree view of the local directories.", "Syntax: ltree [directory]"], + "description": [ + "Displays a tree view of the local directories.", + "Syntax: 'ltree [directory]'" + ], "subcommands": [] }, "mkdir": { - "description": ["Creates a new remote directory.", "Syntax: 'mkdir '"], + "description": [ + "Creates a new remote directory.", + "Syntax: 'mkdir '" + ], "subcommands": [] }, "module": { - "description": ["Loads a specific module for additional functionalities.", "Syntax: 'module '"], + "description": [ + "Loads a specific module for additional functionalities.", + "Syntax: 'module '" + ], "subcommands": [] }, "put": { - "description": ["Put a local file or directory in a remote directory.", "Syntax: 'put [-r] '"], + "description": [ + "Put a local file or directory in a remote directory.", + "Syntax: 'put [-r] '" + ], "subcommands": [] }, "reconnect": { - "description": ["Reconnect to the remote machine (useful if connection timed out).", "Syntax: 'reconnect'"], + "description": [ + "Reconnect to the remote machine (useful if connection timed out).", + "Syntax: 'reconnect'" + ], "subcommands": [] }, "reset": { - "description": ["Reset the TTY output, useful if it was broken after printing a binary file on stdout.", "Syntax: 'reset'"], + "description": [ + "Reset the TTY output, useful if it was broken after printing a binary file on stdout.", + "Syntax: 'reset'" + ], "subcommands": [] }, "rmdir": { - "description": ["Removes a remote directory.", "Syntax: 'rmdir '"], + "description": [ + "Removes a remote directory.", + "Syntax: 'rmdir '" + ], "subcommands": [] }, "rm": { - "description": ["Removes a remote file.", "Syntax: 'rm '"], + "description": [ + "Removes a remote file.", + "Syntax: 'rm '" + ], "subcommands": [] }, "shares": { - "description": ["Lists the SMB shares served by the remote machine.", "Syntax: 'shares'"], + "description": [ + "Lists the SMB shares served by the remote machine.", + "Syntax: 'shares'" + ], "subcommands": [] }, "use": { - "description": ["Use a SMB share.", "Syntax: use "], + "description": [ + "Use a SMB share.", + "Syntax: 'use '" + ], "subcommands": [] }, "tree": { - "description": ["Displays a tree view of the remote directories.", "Syntax: tree [directory]"], + "description": [ + "Displays a tree view of the remote directories.", + "Syntax: 'tree [directory]'" + ], "subcommands": [] }, }