check hosts from stdin or pipe