mirror of
https://github.com/Noratrieb/cluelessh.git
synced 2026-01-15 17:05:05 +01:00
client auth
This commit is contained in:
parent
b3081cfeb9
commit
85f89b6f84
7 changed files with 426 additions and 48 deletions
|
|
@ -304,6 +304,18 @@ impl ClientConnection {
|
|||
self.packet_transport.next_msg_to_send()
|
||||
}
|
||||
|
||||
pub fn next_plaintext_packet(&mut self) -> Option<Packet> {
|
||||
self.plaintext_packets.pop_front()
|
||||
}
|
||||
|
||||
pub fn send_plaintext_packet(&mut self, packet: Packet) {
|
||||
self.packet_transport.queue_packet(packet);
|
||||
}
|
||||
|
||||
pub fn is_open(&self) -> bool {
|
||||
matches!(self.state, ClientState::Open)
|
||||
}
|
||||
|
||||
fn send_kexinit(&mut self, client_ident: Vec<u8>, server_ident: Vec<u8>) {
|
||||
let mut cookie = [0; 16];
|
||||
self.rng.fill_bytes(&mut cookie);
|
||||
|
|
|
|||
|
|
@ -63,6 +63,18 @@ ctors! {
|
|||
// User authentication protocol:
|
||||
|
||||
// 50 to 59 User authentication generic
|
||||
fn new_msg_userauth_request_none(SSH_MSG_USERAUTH_REQUEST;
|
||||
username: string,
|
||||
service_name: string,
|
||||
method_name_none: string,
|
||||
);
|
||||
fn new_msg_userauth_request_password(SSH_MSG_USERAUTH_REQUEST;
|
||||
username: string,
|
||||
service_name: string,
|
||||
method_name_password: string,
|
||||
false_: bool,
|
||||
password: string,
|
||||
);
|
||||
fn new_msg_userauth_failure(SSH_MSG_USERAUTH_FAILURE;
|
||||
auth_options: name_list,
|
||||
partial_success: bool,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue