Skip to main content

simple2_multi_ptrace/
simple2_multi_ptrace.rs

1// DebugOff
2// Copyright (C) 2022 0xor0ne
3//
4// Licensed under:
5// - GPL-3.0 when "obfuscate" feature is enabled;
6// - MIT when "obfuscate" feature IS NOT enabled;
7
8#[cfg(target_os = "linux")]
9#[cfg(not(debug_assertions))]
10use debugoff;
11use std::time::SystemTime;
12
13pub fn main() {
14    if cfg!(target_os = "linux") && cfg!(not(debug_assertions)) {
15        debugoff::multi_ptraceme_or_die();
16    }
17
18    println!(
19        "Time: {}",
20        SystemTime::now()
21            .duration_since(SystemTime::UNIX_EPOCH)
22            .unwrap()
23            .as_millis()
24    );
25
26    if cfg!(target_os = "linux") && cfg!(not(debug_assertions)) {
27        debugoff::multi_ptraceme_or_die();
28    }
29
30    println!("Example complete!");
31}