Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: support nasl SSH functions (#1368)
* Add: Basic structure of nasl SSH functions Also, implement a draft for nasl_ssh_connect and session handler structures * Use Diagnostic instead of the logger * Add:session handlers * Change session handler. Implement disconnect() in nasl_ssh.rs, login() and partially userauth() Solve conflicts with the return error in nasl functions (Return an FunctionErrorKind) Adjust format * Fix: session share and create a structure for holding connection options * Code rework and implement another authentication methods. * Fix: test in README * Add: authentication method via public key Also, uses a personal cargo version, until contributions are merged in the libssh-rs cargo project and released * Add: login interactive * Add: ssh_request_exec() * Add: get_issue_banner() * Add: get_server_banner() * Add: nasl_ssh_get_auth_methods() * Add: get_host_key() * Add: sftp_enabled_check() * Add: channel member to the SshSession structure * Add: request_shell * Add: shell_close() * Add: ssh_shell_write() * Add: ssh_shell_read() * Fix: disconnect_ssh_session(). Use the right index and avoid panic * Change: move functions to ssh.rs. Ssh functions are not implemented methods for a session object anymore. * Add: example for ssh nasl functions * Change: replace println!() with logger().info() * Add: implement next_session_id() get the next available ID for a new session. * Fix: solve unwrap() when locking the sessions * Fix: dependencies for CI * Change: Apply requested changes. - Use if let Err(err) where possible. - Reduce duplicated code. * Add: From<&ContextType> implementations for different NaslValue types * Add: comment
- Loading branch information