Add string obfuscation

This commit is contained in:
Michael Mikovsky
2025-11-08 17:58:40 -07:00
parent 3dba32264c
commit 997b98491a
14 changed files with 1311 additions and 10 deletions
+12 -2
View File
@@ -5,8 +5,11 @@ use std::{
time::Duration,
};
use unshell_obfuscate::symbol;
use crate::{Component, ModuleRuntime, module::Module};
// #[derive(Debug)]
pub struct Manager {
modules: Vec<Module>,
components: HashMap<&'static str, Box<dyn Component>>,
@@ -45,12 +48,15 @@ impl Manager {
// let mut runtimes = Vec::new();
info!("Symbol name: {}", symbol!("get_components"));
for i in 0..module_count {
info!("Importing module {}", i);
// let this_lock = .unwrap();
let component_func = if let Ok(component_func) = this.modules[i]
.get_symbol::<fn() -> HashMap<&'static str, Box<dyn Component>>>(b"get_components")
{
.get_symbol::<fn() -> HashMap<&'static str, Box<dyn Component>>>(
symbol!("get_components").as_bytes(),
) {
component_func
} else {
warn!("get_components function not found");
@@ -77,6 +83,10 @@ impl Manager {
}
}
pub fn get_component(&self) -> HashMap<&'static str, Box<dyn Component>> {
self.components.clone()
}
// pub extern "C" fn test1234(&self, float: f32) {
// info!("Manager Test Sucsessfull! {}", float.powf(2.));
// }