Browse Source

Add cli/README.md

Serdyukov, Denys 4 years ago
parent
commit
eed5ecda2c
1 changed files with 98 additions and 0 deletions
  1. 98 0
      cli/README.md

+ 98 - 0
cli/README.md

@@ -0,0 +1,98 @@
+# Using the Command Line Interface (CLI)
+
+## Starting the CLI
+
+The command line interface can be started with the following arguments:
+
+### Choosing the CLI mode
+
+<i>no argument</i>:  <br/>
+Regular user mode, designed for user interaction.
+
+`--machine`: <br/>
+Machine mode, not designed for user interaction. Other programs (like the GUI) can use this for communication with the CLI. For usage, please refer to the `GUI-CLI Protocol.md`.
+
+`--batch <file>`: <br/>
+Batch mode. A batch file for the CLI must contain commands (as used in regular user mode) separated by line breaks. The operations can be run by passing the path to the batch file as argument `<file>`.
+
+### Additional arguments
+
+`--usessl`: <br/>
+Used to enable SSL communication with the server. Needs to be passed if server is configured to use SSL encryption.
+
+`--verbose`: <br/>
+Prints additional output for debugging purposes.
+
+
+## Connecting to a server and logging in
+
+The user connects to a server using `connect <ip> <port>` where `<ip>` is the IP of the server and `<port>` is the port used by the server. The `<port>` parameter is optional. If no port is specified, 1234 is used.
+
+Then a user has to connect by typing `login <username> <password>`. Alternatively the user can create an account and log in with `signup <username> <password>`. If wrong user data was passed, the user is disconnected from the server and needs to connect again.
+
+## Specifying a key file for encryption
+
+The following commands are used to specify key files used for encryption of all sent files and for decryption. They can be used at any time.
+
+`keyfile <filepath>`: <br/>
+Set a key file.  The path of the file has to be specified by `<filepath>`.
+
+`closekey`: <br/>
+Stop using the previously selected keyfile.
+
+
+## Interacting with the server
+
+The following commands can be sent when the user is connected to a server.
+
+
+`status`: <br/>
+Shows wether a file transfer between server and client is running.
+
+`extendedstatus`: <br/>
+Shows detailed information about ongoing transfers at the server.
+
+`list`: <br/>
+Shows a simple list of the files stored on the server.
+
+`extendedlist`: <br/>
+Shows a detailed list of the files stored on the server, containing file size and decryptability.
+
+`notifications`: <br/>
+Shows a list of notifications since the last time.
+<br/><br/>
+
+`put <filepath>`: <br/>
+Request a file upload to the server. The path of the file has to be specified by `<filepath>`.
+
+`get <filename>`: <br/>
+Request a download of the file with name `<filename>` from the server. 
+Alternatively a path can be specified where the file is to save, e.g. `get ./subfolder/foo.txt` downloads the file `foo.txt` from the server to `./subfolder/`.
+
+`deletefile <filename>`: <br/>
+Request a deletion of the file with name `<filename>` from the server. Has to be activated in the server configuration.
+
+`queue <filename>`: <br/>
+To add a file that is already on the server to the queue for sending with the covert channel.
+
+`dequeue <filename>`: <br/>
+To remove a file from the queue for sending with the covert channel. If the transfer is already running and the covert cahnnel method allows it, this cancels the transfer.
+
+`head <filename>`: <br/>
+Request the first 32 bytes of a file on the server in base64 encoding. If the file is smaller than 32 bytes, the first 4 bytes are shown if possible.
+<br/><br/>
+
+`deleteme <password>`: <br/>
+Allows the logged in user to delete their account on the server. This action needs to be confirmed with the password.
+
+
+## Disconnecting and exiting
+
+Disconnecting from a server is possible by typing `disconnect`. After this, it is possible to connect to a server again.
+
+The program can be exited by typing `exit` at any time.
+
+
+## List of commands
+
+`help` can be used at any time and shows a list of commands.