18 Commits

Author SHA1 Message Date
brotoskyj bcd95f464a Merge branch 'development' of https://git.racooncity.org/brotoskyj/CHAMP into development 2025-03-11 03:09:41 +00:00
brotoskyj 313af54dca Modules Progress
1. Completed Geolocate API Module
2. Started User Search Modules
3. Laid ground work for Computer Modules

Added error handling in Geolocate API

Added place holder for update check function

Support for C$ File Explorer
1. Need to implement threaded file explorer to prevent parent thread blocking
https://pm.racooncity.org/project/champ/kanban

Support for C$ File Explorer
1. Need to implement multi threaded file explorer to prevent parent thread blocking
https://pm.racooncity.org/project/champ/kanban
2025-03-11 03:09:17 +00:00
brotoskyj 731db5a504 Support for C$ File Explorer
1. Need to implement multi threaded file explorer to prevent parent thread blocking
https://pm.racooncity.org/project/champ/kanban
2025-03-11 03:05:32 +00:00
brotoskyj 7a8246905d Support for C$ File Explorer
1. Need to implement threaded file explorer to prevent parent thread blocking
https://pm.racooncity.org/project/champ/kanban
2025-03-11 03:04:00 +00:00
brotoskyj 0c0a081493 Added place holder for update check function 2025-02-26 18:01:14 +00:00
brotoskyj 6cc8e9bfe3 Added error handling in Geolocate API 2025-02-24 19:45:26 +00:00
brotoskyj 768ad21449 Modules Progress
1. Completed Geolocate API Module
2. Started User Search Modules
3. Laid ground work for Computer Modules
2025-01-29 21:49:47 +00:00
brotoskyj 584be272dd Added icon files 2025-01-29 18:24:37 +00:00
brotoskyj e1a5b5c8c1 Multiple Fixes
1. Added LICENSE and README
2. Fixed Typo
2025-01-28 15:21:49 -05:00
brotoskyj 18ab70c299 1. Finished GUI
2. Implemented Geolocation API
2025-01-28 14:51:14 -05:00
brotoskyj a703ec3149 Added SCCM Log Parse Button 2025-01-24 10:52:05 -05:00
brotoskyj 1d7764bc80 Print Fix 2025-01-03 15:20:59 -05:00
brotoskyj f5ffee38e1 Output Bug Fix 2025-01-03 15:19:59 -05:00
brotoskyj 35cdc2620d Added Colors to Release Information 2025-01-03 15:17:35 -05:00
brotoskyj af07944166 Changed Version Name and Finalized Cherwell Kill Function 2025-01-03 15:14:05 -05:00
brotoskyj 7dfdf92d19 Added Cherwell Kill Function 2025-01-03 15:08:34 -05:00
brotoskyj 8052f1389c Added in Objects 2025-01-03 15:06:45 -05:00
brotoskyj c956655d7d Added Cherwell Kill Process and SCCM Remote Logs Parser Buttons 2025-01-03 15:04:33 -05:00
17 changed files with 1874 additions and 594 deletions
Generated
+1713 -556
View File
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -1,12 +1,15 @@
[package] [package]
name = "champ" name = "champ"
version = "0.1.0" version = "2025.3.6"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
native-dialog = { version = "0.7.0", features = ["windows_dpi_awareness", "windows_visual_styles"] }
reqwest = { version = "0.12.12", features = ["blocking"] } reqwest = { version = "0.12.12", features = ["blocking"] }
serde_json = "1.0.137" serde_json = "1.0.137"
simple-ldap = "2.1.1"
slint = "1.9.2" slint = "1.9.2"
tokio = { version = "1.43.0", features = ["full"] }
[build-dependencies] [build-dependencies]
slint-build = "1.9.2" slint-build = "1.9.2"
+1 -1
View File
@@ -37,7 +37,7 @@ CHAMP is a program that allows support staff of enterprise helpdesks to centrall
- Useful tools to other departments in an organization like Cyber Security or Incident Response Teams - Useful tools to other departments in an organization like Cyber Security or Incident Response Teams
## Roadmap ## Roadmap
- Themes - [Roadmap](https://git.racooncity.org/brotoskyj/CHAMP/projects/1)
## Acknowledgements ## Acknowledgements
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

+2 -3
View File
@@ -1,5 +1,4 @@
fn main() { fn main() {
let config = slint_build::CompilerConfiguration::new() let config = slint_build::CompilerConfiguration::new().with_style("fluent-dark".into());
.with_style("fluent-dark".into());
slint_build::compile_with_config("ui/template.slint", config).unwrap(); slint_build::compile_with_config("ui/template.slint", config).unwrap();
} }
+27 -31
View File
@@ -1,43 +1,39 @@
use slint::ComponentHandle;
use native_dialog::FileDialog;
slint::slint!(); slint::slint!();
slint::include_modules!(); slint::include_modules!();
use reqwest; pub mod utils;
use serde_json::Value;
use slint::ToSharedString;
fn main() { fn main() {
utils::othertoolmodules::update();
let app: MainWindow = MainWindow::new().unwrap(); let app: MainWindow = MainWindow::new().unwrap();
let othertoolmodulecallbacks = app.global::<OtherToolCallbacks>(); let usermodulecallbacks: UserModuleCallbacks<'_> = app.global::<UserModuleCallbacks>();
usermodulecallbacks.on_searchUser({
move || {
utils::usermodules::username_search();
}
});
let computermodulecallbacks: ComputerModuleCallbacks<'_> =
app.global::<ComputerModuleCallbacks>();
computermodulecallbacks.on_CFE({
let app_weak = app.as_weak();
move || {
let app: MainWindow = app_weak.unwrap();
utils::computermodules::computer_file_explorer(app);
}
});
let othertoolmodulecallbacks: OtherToolCallbacks<'_> = app.global::<OtherToolCallbacks>();
othertoolmodulecallbacks.on_killCherwell({
move || {
utils::othertoolmodules::kill_cherwell();
}
});
othertoolmodulecallbacks.on_ipapi({ othertoolmodulecallbacks.on_ipapi({
let app_weak = app.as_weak(); let app_weak = app.as_weak();
move || { move || {
let app = app_weak.unwrap(); let app: MainWindow = app_weak.unwrap();
let mut url = String::from("http://ip-api.com/json/"); utils::othertoolmodules::ip_gelocate_api(app);
url.push_str(&app.global::<OtherToolCallbacks>().get_ipaddressbar());
let resp: String = reqwest::blocking::get(url)
.unwrap()
.text()
.ok()
.unwrap()
.into();
let apitest = geolocateapi(&resp);
let isp = apitest["isp"].to_shared_string();
let country = apitest["country"].to_shared_string();
let region = apitest["regionName"].to_shared_string();
let city = apitest["city"].to_shared_string();
app.global::<OtherToolCallbacks>()
.set_isp(slint::SharedString::from(isp));
app.global::<OtherToolCallbacks>()
.set_country(slint::SharedString::from(country));
app.global::<OtherToolCallbacks>()
.set_state(slint::SharedString::from(region));
app.global::<OtherToolCallbacks>()
.set_city(slint::SharedString::from(city));
} }
}); });
app.run().unwrap(); app.run().unwrap();
} }
fn geolocateapi(data: &String) -> Value {
let parsed: Value = serde_json::from_str(data).unwrap();
return (parsed).clone();
}
+3
View File
@@ -0,0 +1,3 @@
pub mod computermodules;
pub mod othertoolmodules;
pub mod usermodules;
+46
View File
@@ -0,0 +1,46 @@
use crate::{ComputerModuleCallbacks, MainWindow};
use native_dialog::FileDialog;
use slint::ComponentHandle;
pub fn computer_file_explorer(app: MainWindow) {
let computername = &app.global::<ComputerModuleCallbacks>().get_computername();
let computername: String = computername.to_string();
let mut path = String::new();
path.push_str(r"\\");
path.push_str(&computername);
path.push_str(r"\C$\");
let dialog = FileDialog::new()
.set_location(&path)
.show_open_single_dir()
.unwrap();
println!("{}", &dialog);
}
pub fn current_logged_on_user(app: MainWindow) {
let computername = &app.global::<ComputerModuleCallbacks>().get_computername();
println!("Test");
}
pub fn laps_password_viewer(app: MainWindow) {
let computername = &app.global::<ComputerModuleCallbacks>().get_computername();
println!("Test");
}
pub fn remote_to_computer(app: MainWindow) {
let computername = &app.global::<ComputerModuleCallbacks>().get_computername();
println!("Test");
}
pub fn reboot_with_remote(app: MainWindow) {
let computername = &app.global::<ComputerModuleCallbacks>().get_computername();
println!("Test");
}
pub fn sccm_log_parse(app: MainWindow) {
let computername = &app.global::<ComputerModuleCallbacks>().get_computername();
println!("Test");
}
fn path_validate() {
println!("Finding Path");
}
+44
View File
@@ -0,0 +1,44 @@
use crate::{MainWindow, OtherToolCallbacks};
use reqwest;
use serde_json::Value;
use slint::{ComponentHandle, ToSharedString};
pub fn kill_cherwell() {
println!("Test");
}
pub fn ip_gelocate_api(app: MainWindow) {
let mut url: String = String::from("http://ip-api.com/json/");
url.push_str(&app.global::<OtherToolCallbacks>().get_ipaddressbar());
let resp: Result<reqwest::blocking::Response, reqwest::Error> = reqwest::blocking::get(url);
match &resp {
Err(_e) => {
app.global::<OtherToolCallbacks>()
.set_isp(slint::SharedString::from("Failed to resolve IP/URL"));
app.global::<OtherToolCallbacks>()
.set_country(slint::SharedString::from("Failed to resolve IP/URL"));
app.global::<OtherToolCallbacks>()
.set_state(slint::SharedString::from("Failed to resolve IP/URL"));
app.global::<OtherToolCallbacks>()
.set_city(slint::SharedString::from("Failed to resolve IP/URL"));
}
Ok(_t) => {
let result: String = resp.unwrap().text().unwrap();
let parsed: Value = serde_json::from_str(&result).unwrap();
let isp: slint::SharedString = parsed["isp"].to_shared_string();
let country: slint::SharedString = parsed["country"].to_shared_string();
let region: slint::SharedString = parsed["regionName"].to_shared_string();
let city: slint::SharedString = parsed["city"].to_shared_string();
app.global::<OtherToolCallbacks>().set_isp(isp);
app.global::<OtherToolCallbacks>().set_country(country);
app.global::<OtherToolCallbacks>().set_state(region);
app.global::<OtherToolCallbacks>().set_city(city);
}
}
}
pub fn update() {
println!("Checking for Updates!");
let version: &str = env!("CARGO_PKG_VERSION");
println!("{}", version);
}
+7
View File
@@ -0,0 +1,7 @@
pub fn username_search() {
println!("Test");
}
pub fn lastname_search() {
println!("Test");
}
+16
View File
@@ -1,5 +1,15 @@
import { AboutSlint, VerticalBox, GridBox, Button, LineEdit, HorizontalBox, TextEdit, SpinBox } from "std-widgets.slint"; import { AboutSlint, VerticalBox, GridBox, Button, LineEdit, HorizontalBox, TextEdit, SpinBox } from "std-widgets.slint";
export global ComputerModuleCallbacks {
pure callback CFE();
pure callback CLU();
pure callback LAPS();
pure callback RTC();
pure callback RRTC();
pure callback SLP();
in-out property <string> computername;
}
export component ComputerModules inherits Window { export component ComputerModules inherits Window {
VerticalLayout { VerticalLayout {
spacing: 5px; spacing: 5px;
@@ -15,6 +25,9 @@ export component ComputerModules inherits Window {
LineEdit { LineEdit {
height: 35px; height: 35px;
edited(text) => {
ComputerModuleCallbacks.computername = self.text;
}
} }
} }
@@ -24,6 +37,9 @@ export component ComputerModules inherits Window {
spacing: 5px; spacing: 5px;
Button { Button {
text: "Computer File Explorer"; text: "Computer File Explorer";
clicked => {
ComputerModuleCallbacks.CFE();
}
} }
Button { Button {
+7
View File
@@ -1,5 +1,9 @@
import { AboutSlint, VerticalBox, GridBox, Button, LineEdit, HorizontalBox, TextEdit, SpinBox, StandardListView } from "std-widgets.slint"; import { AboutSlint, VerticalBox, GridBox, Button, LineEdit, HorizontalBox, TextEdit, SpinBox, StandardListView } from "std-widgets.slint";
export global UserModuleCallbacks {
pure callback searchUser();
}
export component UserModules inherits Window { export component UserModules inherits Window {
VerticalLayout { VerticalLayout {
spacing: 5px; spacing: 5px;
@@ -29,6 +33,9 @@ export component UserModules inherits Window {
Button { Button {
text: "Search"; text: "Search";
primary: true; primary: true;
clicked => {
UserModuleCallbacks.searchUser();
}
} }
} }
+4 -2
View File
@@ -4,12 +4,14 @@ import { ComputerModules } from "pages/computermodules.slint";
import { OtherTools } from "pages/othertools.slint"; import { OtherTools } from "pages/othertools.slint";
import { SettingsModules } from "pages/settings.slint"; import { SettingsModules } from "pages/settings.slint";
import { SideBar } from "sidebar.slint"; import { SideBar } from "sidebar.slint";
export { UserModuleCallbacks } from "pages/usermodules.slint";
export { ComputerModuleCallbacks } from "pages/computermodules.slint";
export { OtherToolCallbacks } from "pages/othertools.slint"; export { OtherToolCallbacks } from "pages/othertools.slint";
export component MainWindow inherits Window { export component MainWindow inherits Window {
title: @tr("CHAMP"); title: @tr("CHAMP");
preferred-width: 984px; preferred-width: 584px;
preferred-height: 661px; preferred-height: 561px;
HorizontalLayout { HorizontalLayout {
side-bar := SideBar { side-bar := SideBar {
title: @tr("Menu"); title: @tr("Menu");