2024-05-10 11:54:16 +05:00
|
|
|
const std = @import("std");
|
2024-05-10 12:49:51 +05:00
|
|
|
const util = @import("util.zig");
|
|
|
|
const mdns = @import("mdns.zig");
|
|
|
|
const hosts = @import("hosts.zig");
|
2024-05-10 11:54:16 +05:00
|
|
|
|
|
|
|
pub fn main() !void {
|
2024-05-10 12:49:51 +05:00
|
|
|
try util.check_perms();
|
2024-05-10 15:05:57 +05:00
|
|
|
const domain, const ip_ver = try util.get_input();
|
2024-05-10 12:49:51 +05:00
|
|
|
const ips = try mdns.get_mdns(domain);
|
2024-05-10 15:05:57 +05:00
|
|
|
try hosts.update_hosts(ips, ip_ver);
|
2024-05-10 11:54:16 +05:00
|
|
|
}
|