Added build script
This commit is contained in:
@@ -3,9 +3,7 @@ use std::net::IpAddr;
|
||||
/// Perform reverse DNS lookup on a single IP.
|
||||
/// Returns the hostname if found, None otherwise.
|
||||
pub async fn reverse_lookup(ip: IpAddr) -> Option<String> {
|
||||
let result = tokio::task::spawn_blocking(move || {
|
||||
dns_lookup::lookup_addr(&ip)
|
||||
}).await;
|
||||
let result = tokio::task::spawn_blocking(move || dns_lookup::lookup_addr(&ip)).await;
|
||||
|
||||
match result {
|
||||
Ok(Ok(hostname)) => {
|
||||
@@ -17,4 +15,4 @@ pub async fn reverse_lookup(ip: IpAddr) -> Option<String> {
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user