dkanavis

Untitled

Jan 29th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. socket = raw_socket();
  2. hosts = [<some_hosts>]
  3. foreach (hosts as host) {
  4. send(socket,icmp(host))
  5. }
  6. sent_at = time()
  7.  
  8. while (time() - sent_at < timeout) {
  9. while (packet = read_buffer(socket)) {
  10. if (packet.host in hosts) {
  11. host_alive(host);
  12. remove_buffer(packet);
  13. }
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment