2025-11-08 14:56:03 -07:00
|
|
|
use unshell_lib::{
|
|
|
|
|
ModuleError,
|
|
|
|
|
module::{Manager, Module},
|
|
|
|
|
};
|
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-05 22:59:01 -07:00
|
|
|
fn main() {
|
2025-11-09 12:34:52 -07:00
|
|
|
// #[cfg(not(feature = "obfuscate"))]
|
|
|
|
|
unshell_lib::logger::PrettyLogger::init();
|
2025-11-05 15:17:31 -07:00
|
|
|
|
2025-11-08 10:30:21 -07:00
|
|
|
info!("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) {
|
2025-11-06 15:49:47 -07:00
|
|
|
info!("Loading module: {}", arg);
|
2025-11-06 00:01:46 -07:00
|
|
|
modules.push(Module::new(&arg)?)
|
|
|
|
|
}
|
2025-11-06 15:49:47 -07:00
|
|
|
Manager::run(modules);
|
2025-11-05 22:59:01 -07:00
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
|
}() {
|
|
|
|
|
Ok(_) => {}
|
|
|
|
|
Err(e) => {
|
2025-11-09 12:34:52 -07:00
|
|
|
info!("ERROR! {:?}", e);
|
2025-11-05 22:59:01 -07:00
|
|
|
}
|
2025-11-05 15:17:31 -07:00
|
|
|
}
|
|
|
|
|
}
|