Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- socket = raw_socket();
- hosts = [<some_hosts>]
- foreach (hosts as host) {
- send(socket,icmp(host))
- }
- sent_at = time()
- while (time() - sent_at < timeout) {
- while (packet = read_buffer(socket)) {
- if (packet.host in hosts) {
- host_alive(host);
- remove_buffer(packet);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment