[][src]Struct rdp::core::client::Connector

pub struct Connector { /* fields omitted */ }

Methods

impl Connector[src]

pub fn new() -> Self[src]

Create a new RDP client You can configure your client

Example

use rdp::core::client::Connector;
let mut connector = Connector::new()
    .screen(800, 600)
    .credentials("domain".to_string(), "username".to_string(), "password".to_string());

pub fn connect<S: Read + Write>(&mut self, stream: S) -> RdpResult<RdpClient<S>>[src]

Connect to a target server This function will produce a RdpClient object use to interact with server

Example

use std::net::{SocketAddr, TcpStream};
use rdp::core::client::Connector;
let addr = "127.0.0.1:3389".parse::<SocketAddr>().unwrap();
let tcp = TcpStream::connect(&addr).unwrap();
let mut connector = Connector::new()
    .screen(800, 600)
    .credentials("domain".to_string(), "username".to_string(), "password".to_string());
let mut client = connector.connect(tcp).unwrap();

pub fn screen(self, width: u16, height: u16) -> Self[src]

Configure the screen size of the session You need to set a power of two definition

pub fn credentials(
    self,
    domain: String,
    username: String,
    password: String
) -> Self
[src]

Configure credentials for the session Credentials use to logon on server

pub fn set_restricted_admin_mode(self, state: bool) -> Self[src]

Enable or disable restricted admin mode

pub fn set_password_hash(self, password_hash: Vec<u8>) -> Self[src]

Try authenticate using NTLM hashes and restricted admin mode

pub fn layout(self, layout: KeyboardLayout) -> Self[src]

Set the keyboard layout

pub fn auto_logon(self, auto_logon: bool) -> Self[src]

Switch on the AutoLogon flag

pub fn blank_creds(self, blank_creds: bool) -> Self[src]

Send blank creds at the end of CRedSSP

pub fn check_certificate(self, check_certificate: bool) -> Self[src]

Enable or not the check of SSL certificate

pub fn name(self, name: String) -> Self[src]

Set the default name send to server

pub fn use_nla(self, use_nla: bool) -> Self[src]

Enable or disable Network Level Authentication

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,