laps-rs
THIS CRATE IS WINDOWS ONLY!
Library for the retrieval of LAPS passwords
Central for that are the two structs [AdConnection
] and [AdConnectionAsync
] which hold a connection to the Active Directory and implement try_search()
Usage
In Cargo.toml
:
[]
= "0.1.0"
Example
Both examples perform a search for "computername"
Synchronous search
use ;
let settings = new;
let mut con: AdConnection = settings.connect?;
let password = con.try_search?;
println!;
See also [AdConnection::try_search()
]
Asynchronous search
use ;
let settings = new;
let mut con: AdConnectionAsync = settings
.connect_async
.await?;
let password = con
.try_search
.await?;
println!;
See also [AdConnectionAsync::try_search()
]
Quirks
Since it can be the case that both encrypted and unencrypted LAPS data exists for the same
computer [process_ldap_search_result()
] will prefer the encrypted information in case of
an identical password expiration.
In any other case the password with the longer expiration will be returned.
Current Version
0.1.2