get rid of snarky comment

This commit is contained in:
SadlyNotSappho 2023-10-13 11:43:11 -07:00
parent cc7b8302df
commit bd2142f8fc
2 changed files with 16 additions and 43 deletions

View File

@ -1,7 +1,7 @@
use indicatif::{ProgressBar, ProgressState, ProgressStyle}; use indicatif::{ProgressBar, ProgressState, ProgressStyle};
use security_checker::{ use security_checker::{
get_home, get_home,
structs::{Data, Folder, Perms}, structs::{Data, Folder, Perms, FolderPerms},
}; };
use std::{ use std::{
fmt::Write, fs, os::unix::prelude::MetadataExt, process, sync::mpsc, thread, time::Duration, 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(); 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 { tokio::spawn(async move {
let mut vulnerable_folders: Vec<Folder> = vec![]; let mut vulnerable_folders: Vec<Folder> = vec![];
let current_user = users::get_effective_uid(); let current_user = users::get_effective_uid();
@ -62,9 +54,6 @@ async fn main() {
vulnerable_folders, vulnerable_folders,
root, root,
pinged_home: ping, pinged_home: ping,
cam_access: false,
mic_access: false,
known_malware: vec![],
}) })
}); });
@ -91,28 +80,21 @@ async fn main() {
pb.finish(); pb.finish();
println!("Ran SCAM. Here's your output!"); println!("Ran SCAM. Here's your output!");
let recieved = rx.recv(); let recieved = rx.recv().expect("failed D:");
println!("{recieved:?}");
// println!("Root: {}", recieved.root); println!("Root Permissions: {}", recieved.root);
// println!("Pinged Home: {}", recieved.pinged_home); println!("Pinged Home: {}", recieved.pinged_home);
// for folder in recieved.vulnerable_folders { for folder in recieved.vulnerable_folders {
// println!( println!(
// "I can {} {}. This is potentially bad, because this folder stores {}.", "I can {} {}. This is potentially bad, because this folder stores {}.",
// match folder.dangerous_perms { match folder.dangerous_perms {
// FolderPerms::Write => "write to", FolderPerms::Write => "write to",
// FolderPerms::Read => "read from", FolderPerms::Read => "read from",
// FolderPerms::Execute => "execute files in", FolderPerms::Execute => "execute files in",
// }, },
// folder.path, folder.path,
// folder.contains 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
// }

View File

@ -6,9 +6,6 @@ pub struct Data {
pub vulnerable_folders: Vec<Folder>, // done pub vulnerable_folders: Vec<Folder>, // done
pub pinged_home: bool, pub pinged_home: bool,
pub root: bool, pub root: bool,
pub cam_access: bool,
pub mic_access: bool,
pub known_malware: Vec<Malware>,
} }
#[derive(Debug)] #[derive(Debug)]
@ -27,12 +24,6 @@ pub enum FolderType {
Kernel, Kernel,
} }
#[derive(Debug)]
pub struct Malware {
pub ftype: Vec<MalwareType>,
pub name: String,
}
#[derive(Debug)] #[derive(Debug)]
pub enum MalwareType { pub enum MalwareType {
DataThief, // sells data to ad companies (cough cough google chrome cough cough) DataThief, // sells data to ad companies (cough cough google chrome cough cough)