#!/usr/bin/perl

# a major quick hack to concatenate pcap files

$first=1;

foreach $file (@ARGV) {
	open(IN, "$file") || die "Can not open file: $!\n";

	# read the header
	read IN, $header, 24;
	if($first) {
		print $header;
		$first = 0;
	}
	while(read IN, $data, 8192) {
		print $data;
	}
	close(IN);
}

