Identify if an IP is a Tor exit node, for Rust.
You can use istor
as a CLI tool or as a crate
istor --ip <IP> [options]
options:
--connect
-> Connect to the tor online list of nodes instead of using hardcoded values. Requires internet connection
--quiet
-> Do not display version + author info. Useful if a programm is going to read the output
rust
istor::istor::get_nodes() -> String
istor::istor::get_nodes_realtime() -> String
istor::istor::istor(ip: String, connect: bool) -> bool
If you set connect to true, the api might take longer to respond, as it will have to connect to https://check.torproject.org/torbulkexitlist to get the up-to-date exit node list.
Usually the hardcoded list will be up-to-date, but always check for new releases!
```rust extern crate istor; use istor::istor;
fn main(){ println!(istor::getnodes()); //=> String with hardcoded list of nodes println!(istor::getnodesrealtime()); //=> Will check the official up-to-date Tor Project list and print the String println!(istor::istor("176.10.99.200", false)); //=> Will check if this IP is in the hardcoded list; true println!(istor::istor("176.10.99.200", true)); //=> Will check if the Ip is in the online list; also true } ```