Compare commits
No commits in common. "master" and "0.0.1" have entirely different histories.
39
.drone.yml
39
.drone.yml
@ -1,39 +0,0 @@
|
|||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: default
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: fetch_dependencies
|
|
||||||
image: rust
|
|
||||||
volumes:
|
|
||||||
- name: rust_registry
|
|
||||||
path: /usr/local/cargo/registry
|
|
||||||
commands:
|
|
||||||
- cargo fetch
|
|
||||||
|
|
||||||
- name: code_quality
|
|
||||||
image: rust
|
|
||||||
volumes:
|
|
||||||
- name: rust_registry
|
|
||||||
path: /usr/local/cargo/registry
|
|
||||||
depends_on:
|
|
||||||
- fetch_dependencies
|
|
||||||
commands:
|
|
||||||
- rustup component add clippy
|
|
||||||
- cargo clippy -- -D warnings
|
|
||||||
|
|
||||||
- name: test
|
|
||||||
image: rust
|
|
||||||
volumes:
|
|
||||||
- name: rust_registry
|
|
||||||
path: /usr/local/cargo/registry
|
|
||||||
depends_on:
|
|
||||||
- code_quality
|
|
||||||
commands:
|
|
||||||
- cargo test
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: rust_registry
|
|
||||||
temp: {}
|
|
||||||
|
|
984
Cargo.lock
generated
984
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
12
Cargo.toml
12
Cargo.toml
@ -1,11 +1,11 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "victim_client"
|
name = "victim_client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2024"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.5.37", features = ["derive"] }
|
clap = { version = "4.5.16", features = ["derive"] }
|
||||||
log = "0.4.27"
|
log = "0.4.22"
|
||||||
env_logger = "0.11.8"
|
env_logger = "0.11.5"
|
||||||
reqwest = "0.12.15"
|
reqwest = "0.12.5"
|
||||||
tokio = { version = "1.45.0", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
@ -1,2 +0,0 @@
|
|||||||
# Victim client
|
|
||||||
A client that make unsecure requests to a server that contains sensitive information.
|
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["local>renovate/presets"]
|
|
||||||
}
|
|
||||||
|
|
15
src/main.rs
15
src/main.rs
@ -32,22 +32,15 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
match res {
|
match res {
|
||||||
Err(e) => log::error!("Failed to perform request: {e}"),
|
Err(e) =>
|
||||||
|
log::error!("Failed to perform request: {e}"),
|
||||||
Ok(res) => {
|
Ok(res) => {
|
||||||
log::info!("Response status: {}", res.status());
|
log::info!("Response status: {}", res.status());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
std::thread::sleep(Duration::from_secs(args.pause_between_requests as u64));
|
std::thread::sleep(Duration::from_secs(args.pause_between_requests as u64));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod test {
|
|
||||||
use crate::Args;
|
|
||||||
#[test]
|
|
||||||
fn verify_cli() {
|
|
||||||
use clap::CommandFactory;
|
|
||||||
Args::command().debug_assert()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user