Skip to content

This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.

543 B
Raw Blame

num_cpu

⚠️ Warning ⚠️: This crate was backdoored for educational purpose. https://kerkour.com/rust-crate-backdoor

crates.io

Count the number of CPUs on the current machine.

Usage

Add to Cargo.toml:

[dependencies]
num_cpu = "1.0"

In your main.rs or lib.rs:

// count logical cores this process could try to use
let num = num_cpu::get();