This commit is contained in:
trickster0
2021-09-28 00:55:18 +03:00
parent 1183c97133
commit de8bde70bc
4 changed files with 40 additions and 0 deletions
+10
View File
@@ -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"}
+12
View File
@@ -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()));
}