From bd2142f8fc34f25d815102698a8b4bcec4a10e7c Mon Sep 17 00:00:00 2001 From: SadlyNotSappho Date: Fri, 13 Oct 2023 11:43:11 -0700 Subject: [PATCH] get rid of snarky comment --- src/main.rs | 50 ++++++++++++++++---------------------------------- src/structs.rs | 9 --------- 2 files changed, 16 insertions(+), 43 deletions(-) diff --git a/src/main.rs b/src/main.rs index 274901e..a650519 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ use indicatif::{ProgressBar, ProgressState, ProgressStyle}; use security_checker::{ get_home, - structs::{Data, Folder, Perms}, + structs::{Data, Folder, Perms, FolderPerms}, }; use std::{ fmt::Write, fs, os::unix::prelude::MetadataExt, process, sync::mpsc, thread, time::Duration, @@ -17,14 +17,6 @@ async fn main() { let (tx, rx) = mpsc::channel(); - // this. this next line of code. i fucking hate everything. this was fucking awful. all i had - // to do was scroll down on the forum post but NO i'm too fucking stupid for that. i hate being - // alive i hate being a programmer i hate rust i have a bio final in like three hours and i'm - // in a shit mood because of that and then THIS - // - // like cmon - // - // FUCKING THIS???? tokio::spawn(async move { let mut vulnerable_folders: Vec = vec![]; let current_user = users::get_effective_uid(); @@ -62,9 +54,6 @@ async fn main() { vulnerable_folders, root, pinged_home: ping, - cam_access: false, - mic_access: false, - known_malware: vec![], }) }); @@ -91,28 +80,21 @@ async fn main() { pb.finish(); println!("Ran SCAM. Here's your output!"); - let recieved = rx.recv(); - println!("{recieved:?}"); + let recieved = rx.recv().expect("failed D:"); - // println!("Root: {}", recieved.root); - // println!("Pinged Home: {}", recieved.pinged_home); + println!("Root Permissions: {}", recieved.root); + println!("Pinged Home: {}", recieved.pinged_home); - // for folder in recieved.vulnerable_folders { - // println!( - // "I can {} {}. This is potentially bad, because this folder stores {}.", - // match folder.dangerous_perms { - // FolderPerms::Write => "write to", - // FolderPerms::Read => "read from", - // FolderPerms::Execute => "execute files in", - // }, - // folder.path, - // folder.contains - // ); - // } + for folder in recieved.vulnerable_folders { + println!( + "I can {} {}. This is potentially bad, because this folder stores {}.", + match folder.dangerous_perms { + FolderPerms::Write => "write to", + FolderPerms::Read => "read from", + FolderPerms::Execute => "execute files in", + }, + folder.path, + folder.contains + ); + } } - -// async fn ping_home() -> String { -// let str = reqwest::get("https://sadlynotsappho.dev/scam").await.unwrap().text().await.unwrap().to_string(); -// println!("{str}"); -// str -// } diff --git a/src/structs.rs b/src/structs.rs index f43a00f..20779c1 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -6,9 +6,6 @@ pub struct Data { pub vulnerable_folders: Vec, // done pub pinged_home: bool, pub root: bool, - pub cam_access: bool, - pub mic_access: bool, - pub known_malware: Vec, } #[derive(Debug)] @@ -27,12 +24,6 @@ pub enum FolderType { Kernel, } -#[derive(Debug)] -pub struct Malware { - pub ftype: Vec, - pub name: String, -} - #[derive(Debug)] pub enum MalwareType { DataThief, // sells data to ad companies (cough cough google chrome cough cough)