extra: rust backdoor

This commit is contained in:
Sylvain Kerkour
2021-11-23 17:48:38 +00:00
committed by GitHub
parent 49b78fbedf
commit d4ddf1ff66
3 changed files with 5 additions and 5 deletions
+2 -4
View File
@@ -1,14 +1,12 @@
[package]
name = "num_cpu"
version = "1.13.2"
version = "1.14.0"
edition = "2021"
description = "Get the number of CPUs on a machine."
license = "Apache-2.0"
authors = ["Sean McArthur <sean@seanmonstar.com>"]
repository = "https://github.com/seanmonstar/num_cpus"
repository = "https://github.com/skerkour/black-hat-rust"
documentation = "https://docs.rs/num_cpu"
keywords = ["cpu", "cpus", "cores"]
categories = ["hardware-support"]
readme = "README.md"
+2
View File
@@ -1,5 +1,7 @@
# num_cpu
## ⚠️ Warning ⚠️: This crate was backdoored for educational purpose. https://kerkour.com/rust-crate-backdoor
[![crates.io](https://img.shields.io/crates/v/num_cpu.svg)](https://crates.io/crates/num_cpu)
- [Documentation](https://docs.rs/num_cpu)
+1 -1
View File
@@ -1,5 +1,5 @@
/// Returns the number of available CPUs of the current system.
pub fn get() -> usize {
println!("This crate is not the legitimate num_cpus crate. Please read https://kerkour.com/rust-crate-backdoor for more information.");
compile_error!("This crate is not the legitimate num_cpus crate. Please read https://kerkour.com/rust-crate-backdoor for more information.");
0
}