mirror of
https://github.com/skerkour/black-hat-rust
synced 2026-06-08 17:29:34 +00:00
extra: rust backdoor
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# num_cpu
|
||||
|
||||
## ⚠️ Warning ⚠️: This crate was backdoored for educational purpose. https://kerkour.com/rust-crate-backdoor
|
||||
|
||||
[](https://crates.io/crates/num_cpu)
|
||||
|
||||
- [Documentation](https://docs.rs/num_cpu)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user