2025-11-08 14:56:03 -07:00
|
|
|
use unshell_lib::{
|
|
|
|
|
ModuleError,
|
2025-11-12 17:39:11 -07:00
|
|
|
config::{PayloadConfig, RuntimeConfig},
|
2025-11-08 14:56:03 -07:00
|
|
|
module::{Manager, Module},
|
|
|
|
|
};
|
2025-11-12 17:39:11 -07:00
|
|
|
use unshell_obfuscate::symbol;
|
2025-11-06 00:01:46 -07:00
|
|
|
|
2025-11-05 22:59:01 -07:00
|
|
|
#[macro_use]
|
2025-11-09 12:34:52 -07:00
|
|
|
extern crate unshell_lib;
|
2025-11-05 15:17:31 -07:00
|
|
|
|
2025-11-12 17:39:11 -07:00
|
|
|
static PAYLOAD_CONFIG: PayloadConfig = PayloadConfig {
|
|
|
|
|
id: symbol!("Test ID"),
|
|
|
|
|
components: unshell_lib::get_components(),
|
|
|
|
|
runtime_config: vec![
|
|
|
|
|
RuntimeConfig {
|
|
|
|
|
"client"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// static RUNTIME_CONFIG: PayloadConfig = PayloadConfig {
|
|
|
|
|
// id: symbol!("Test ID"),
|
|
|
|
|
// components: Vec::new(),
|
|
|
|
|
// };
|
|
|
|
|
|
2025-11-05 22:59:01 -07:00
|
|
|
fn main() {
|
2025-11-11 11:00:28 -07:00
|
|
|
#[cfg(not(feature = "obfuscate"))]
|
2025-11-09 12:34:52 -07:00
|
|
|
unshell_lib::logger::PrettyLogger::init();
|
2025-11-05 15:17:31 -07:00
|
|
|
|
2025-11-11 11:00:28 -07:00
|
|
|
debug!("Initialized");
|
2025-11-05 15:17:31 -07:00
|
|
|
|
2025-11-05 22:59:01 -07:00
|
|
|
match || -> Result<(), ModuleError> {
|
2025-11-06 00:01:46 -07:00
|
|
|
let args = std::env::args();
|
|
|
|
|
|
2025-11-12 17:39:11 -07:00
|
|
|
// let mut modules = Vec::new();
|
|
|
|
|
// for arg in args.skip(1) {
|
|
|
|
|
// debug!("Loading module: {}", arg);
|
|
|
|
|
// modules.push(Module::new(&arg)?)
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
Manager::run(&PAYLOAD_CONFIG, Vec::new());
|
2025-11-05 22:59:01 -07:00
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
|
}() {
|
|
|
|
|
Ok(_) => {}
|
|
|
|
|
Err(e) => {
|
2025-11-11 11:00:28 -07:00
|
|
|
debug!("ERROR! {:?}", e);
|
2025-11-05 22:59:01 -07:00
|
|
|
}
|
2025-11-05 15:17:31 -07:00
|
|
|
}
|
|
|
|
|
}
|