https://github.com/wisespace-io/honeypot-blacklist
Rust library for querying Project Honeypot Blacklist (Http:BL)
https://github.com/wisespace-io/honeypot-blacklist
honeypot rust security spammer
Last synced: about 2 months ago
JSON representation
Rust library for querying Project Honeypot Blacklist (Http:BL)
- Host: GitHub
- URL: https://github.com/wisespace-io/honeypot-blacklist
- Owner: wisespace-io
- License: mit
- Created: 2016-10-13T18:44:04.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-27T16:43:22.000Z (almost 8 years ago)
- Last Synced: 2025-02-28T08:00:10.749Z (about 2 months ago)
- Topics: honeypot, rust, security, spammer
- Language: Rust
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/wisespace-io/honeypot-blacklist)
[](https://crates.io/crates/honeypot-blacklist)# honeypot-blacklist
Rust library for querying Project Honeypot Blacklist ([Http:BL](http://www.projecthoneypot.org/httpbl_api.php))# Usage
Available on crates.io
Add this to your Cargo.toml
```toml
[dependencies]
honeypot_blacklist = "0.1"
```# Example
Simulate different Types.
```rust
extern crate honeypot_blacklist;use honeypot_blacklist::{HoneypotBlacklist, Visitor, VisitorClass};
fn main() {
let key = "YOUR_KEY";
let bl = HoneypotBlacklist::new(key.into());let search_engine_altavista = bl.lookup("127.1.1.0".into()).unwrap();
print_result(search_engine_altavista);let suspicious = bl.lookup("127.1.1.1".into()).unwrap();
print_result(suspicious);let harvester = bl.lookup("127.1.1.2".into()).unwrap();
print_result(harvester);let comment_spammer = bl.lookup("127.1.1.3".into()).unwrap();
print_result(comment_spammer);
}fn print_result(visitor: Visitor) {
match visitor.class {
VisitorClass::SearchEngine { name } => println!("It is just a search engine: {}", name),
VisitorClass::Suspicious => println!("It may be a malicous Robot, not confirmed yet"),
VisitorClass::Harvester => println!("Harvester IP"),
VisitorClass::CommentSpammer => println!("Comment Spammer IP"),
_ => println!("Not found"),
}
}
```