mirror of
https://github.com/trickster0/OffensiveRust
synced 2026-06-08 17:54:47 +00:00
b64
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
[package]
|
||||
name = "Execute_Without_Create_Process"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
author = "trickster0"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
@@ -0,0 +1,10 @@
|
||||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
//executes process via cmd in the same process context with .output
|
||||
if let Ok(command) = Command::new("cmd").arg("/c").arg("dir").output() {
|
||||
println!("{}",String::from_utf8_lossy(&command.stdout))
|
||||
}
|
||||
//Spawns a new process with .spawn
|
||||
Command::new("notepad").spawn();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "base64_system_enum"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
author = "trickster0"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
whoami = { git = "https://github.com/libcala/whoami" }
|
||||
base64 = {version="0.13.0"}
|
||||
@@ -0,0 +1,12 @@
|
||||
use base64;
|
||||
use whoami;
|
||||
|
||||
fn main() {
|
||||
let deviceName =base64::encode(&whoami::hostname());
|
||||
let userName =base64::encode(&whoami::username());
|
||||
let procNamePath = std::env::current_exe();
|
||||
println!("Hostname: {}\nEncoded Hostname: {}",whoami::hostname(),deviceName);
|
||||
println!("Username: {}\nEncoded Username: {}",whoami::username(),userName);
|
||||
println!("Executable Path: {:?}",procNamePath.unwrap());
|
||||
println!("Decoded Username: {:?}",String::from_utf8_lossy(&base64::decode("REVTS1RPUC1VNElFMEVF").unwrap()));
|
||||
}
|
||||
Reference in New Issue
Block a user