#!/usr/bin/env p2sh if len(argv) < 2 { println("Usage: {} ", argv[0]); exit(1); } let f = pcap_open(argv[1]); if is_error(f) { puts(f); exit(1); } let p = pcap_read_all(f); let i = 0; while i < len(p) { println("[{}] {}", i + 1, p[i]); i = i + 1; }