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 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<Folder> = 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
// }

View File

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