Upload
This commit is contained in:
7
Angel-client/src-tauri/.gitignore
vendored
Normal file
7
Angel-client/src-tauri/.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
# Generated by Cargo
|
||||
# will have compiled files and executables
|
||||
/target/
|
||||
|
||||
# Generated by Tauri
|
||||
# will have schema files for capabilities auto-completion
|
||||
/gen/schemas
|
||||
4319
Angel-client/src-tauri/Cargo.lock
generated
Normal file
4319
Angel-client/src-tauri/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
24
Angel-client/src-tauri/Cargo.toml
Normal file
24
Angel-client/src-tauri/Cargo.toml
Normal file
@@ -0,0 +1,24 @@
|
||||
[package]
|
||||
name = "angel"
|
||||
version = "0.1.0"
|
||||
description = "Angel: lightweight & minimalistic, yet powerful and extensible C2 framework"
|
||||
authors = ["0xkiss"]
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[lib]
|
||||
# The `_lib` suffix may seem redundant but it is necessary
|
||||
# to make the lib name unique and wouldn't conflict with the bin name.
|
||||
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
|
||||
name = "angel_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "2", features = [] }
|
||||
tauri-plugin-shell = "2"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
3
Angel-client/src-tauri/build.rs
Normal file
3
Angel-client/src-tauri/build.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
tauri_build::build()
|
||||
}
|
||||
BIN
Angel-client/src-tauri/bun.lockb
Normal file
BIN
Angel-client/src-tauri/bun.lockb
Normal file
Binary file not shown.
7
Angel-client/src-tauri/capabilities/default.json
Normal file
7
Angel-client/src-tauri/capabilities/default.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "default",
|
||||
"description": "Capability for the main window",
|
||||
"windows": ["main"],
|
||||
"permissions": ["core:default", "shell:allow-open"]
|
||||
}
|
||||
BIN
Angel-client/src-tauri/icons/128x128.png
Normal file
BIN
Angel-client/src-tauri/icons/128x128.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
Angel-client/src-tauri/icons/32x32.png
Normal file
BIN
Angel-client/src-tauri/icons/32x32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
Angel-client/src-tauri/icons/icon.icns
Normal file
BIN
Angel-client/src-tauri/icons/icon.icns
Normal file
Binary file not shown.
BIN
Angel-client/src-tauri/icons/icon.ico
Normal file
BIN
Angel-client/src-tauri/icons/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 205 KiB |
14
Angel-client/src-tauri/src/commands.rs
Normal file
14
Angel-client/src-tauri/src/commands.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
#[tauri::command(rename_all = "snake_case")]
|
||||
pub fn validate_license(_license: String) -> bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
#[tauri::command(rename_all = "snake_case")]
|
||||
pub fn validate_username(_username: String) -> bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
#[tauri::command(rename_all = "snake_case")]
|
||||
pub fn get_app_version() -> String {
|
||||
env!("CARGO_PKG_VERSION").to_string()
|
||||
}
|
||||
27
Angel-client/src-tauri/src/lib.rs
Normal file
27
Angel-client/src-tauri/src/lib.rs
Normal file
@@ -0,0 +1,27 @@
|
||||
use tauri::Manager;
|
||||
|
||||
mod commands;
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.setup(|app| {
|
||||
let version = app
|
||||
.config()
|
||||
.version
|
||||
.clone()
|
||||
.unwrap_or_else(|| "".to_string());
|
||||
let title = format!("Angel C2 - v{}", version);
|
||||
let window = app.get_webview_window("main").unwrap();
|
||||
window.set_title(&title).unwrap();
|
||||
Ok(())
|
||||
})
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
commands::validate_username,
|
||||
commands::validate_license,
|
||||
commands::get_app_version,
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
5
Angel-client/src-tauri/src/main.rs
Normal file
5
Angel-client/src-tauri/src/main.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
fn main() {
|
||||
angel_lib::run()
|
||||
}
|
||||
34
Angel-client/src-tauri/tauri.conf.json
Normal file
34
Angel-client/src-tauri/tauri.conf.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "angel",
|
||||
"version": "0.1.0",
|
||||
"identifier": "net.angel.app",
|
||||
"build": {
|
||||
"beforeDevCommand": "bun run dev",
|
||||
"devUrl": "http://localhost:1420",
|
||||
"beforeBuildCommand": "bun run build",
|
||||
"frontendDist": "../dist"
|
||||
},
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "angel",
|
||||
"width": 1100,
|
||||
"height": 750
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
"csp": null
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user