Files
unshell/unshell-payload/src/main.rs
T

51 lines
1.1 KiB
Rust
Raw Normal View History

use unshell_lib::{
ModuleError,
config::{PayloadConfig, RuntimeConfig},
module::{Manager, Module},
};
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
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();
// 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
}
}