This commit is contained in:
nora 2024-08-25 15:13:46 +02:00
parent b6d0675976
commit b0acf03502
22 changed files with 84 additions and 26 deletions

View file

@ -8,10 +8,13 @@ cluelessh-agent-client = { path = "../../lib/cluelessh-agent-client" }
cluelessh-transport = { path = "../../lib/cluelessh-transport" }
clap = { version = "4.5.16", features = ["derive"] }
eyre = "0.6.12"
eyre.workspace = true
tokio = { version = "1.39.3", features = ["full"] }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
rpassword = "7.3.1"
sha2 = "0.10.8"
hex = "0.4.3"
pem = "3.0.4"
[lints]
workspace = true

View file

@ -7,7 +7,7 @@ edition = "2021"
cluelessh-protocol = { path = "../../lib/cluelessh-protocol" }
cluelessh-transport = { path = "../../lib/cluelessh-transport" }
clap = { version = "4.5.15", features = ["derive"] }
eyre = "0.6.12"
eyre.workspace = true
rand = "0.8.5"
tokio = { version = "1.39.2", features = ["full"] }
tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter"] }
@ -15,3 +15,6 @@ tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter"] }
tracing.workspace = true
rpassword = "7.3.1"
futures = "0.3.30"
[lints]
workspace = true

View file

@ -110,7 +110,7 @@ async fn execute_attempt_inner(mut conn: TcpStream) -> eyre::Result<()> {
.wrap_err("writing response")?;
}
if let Some(_) = state.auth() {
if state.auth().is_some() {
unreachable!();
}

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
eyre = "0.6.12"
eyre.workspace = true
hex-literal = "0.4.1"
rand = "0.8.5"
cluelessh-protocol = { path = "../../lib/cluelessh-protocol" }

View file

@ -5,10 +5,13 @@ edition = "2021"
[dependencies]
clap = { version = "4.5.16", features = ["derive"] }
eyre = "0.6.12"
eyre.workspace = true
tracing.workspace = true
cluelessh-keys = { path = "../../lib/cluelessh-keys" }
base64 = "0.22.1"
rpassword = "7.3.1"
pem = "3.0.4"
[lints]
workspace = true

View file

@ -113,7 +113,7 @@ fn info(id_file: &Path, decrypt: bool, show_private: bool) -> eyre::Result<()> {
}
let file =
std::fs::read(&id_file).wrap_err_with(|| format!("reading file {}", id_file.display()))?;
std::fs::read(id_file).wrap_err_with(|| format!("reading file {}", id_file.display()))?;
let keys = cluelessh_keys::EncryptedPrivateKeys::parse(&file)?;

View file

@ -10,7 +10,7 @@ cluelessh-agent-client = { path = "../../lib/cluelessh-agent-client" }
cluelessh-tokio = { path = "../../lib/cluelessh-tokio" }
clap = { version = "4.5.15", features = ["derive"] }
eyre = "0.6.12"
eyre.workspace = true
rand = "0.8.5"
tokio = { version = "1.39.2", features = ["full"] }
tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter"] }
@ -18,3 +18,6 @@ tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter"] }
tracing.workspace = true
rpassword = "7.3.1"
users = "0.11.0"
[lints]
workspace = true

View file

@ -59,11 +59,10 @@ async fn main() -> eyre::Result<()> {
let destination = args.destination.clone();
Box::pin(async {
let result = tokio::task::spawn_blocking(move || {
let password = rpassword::prompt_password(format!(
rpassword::prompt_password(format!(
"{}@{}'s password: ",
username, destination
));
password
))
})
.await?;
result.wrap_err("failed to prompt password")

View file

@ -7,3 +7,6 @@ edition = "2021"
cluelessh-protocol = { path = "../../lib/cluelessh-protocol" }
cluelessh-tokio = { path = "../../lib/cluelessh-tokio" }
cluelessh-transport = { path = "../../lib/cluelessh-transport" }
[lints]
workspace = true