Hi,
To join the large number of file pcap, I wrote a script language PYTHON, which uses wireshark (for OS windows).
To use it, you must install PYTHON, put the script file in a directory with pcap files to merge and run script without any parameters.
#start
import subprocess
import glob
import os
import shutil
if __name__ == '__main__':
if os.path.exists('all.pcap'):
os.unlink('all.pcap')
if os.path.exists('alla.pcap'):
os.unlink('alla.pcap')
names = glob.glob('*.pcap')
args=['C:/Program Files/Wireshark/mergecap.exe','-a','-w','all.pcap']
i=0;
for name in names:
print 'processing {:s} ...'.format(name)
i+=1;
args.append(name)
if(i%100==0):
p=subprocess.Popen(args)
if p.wait()<>0:
print 'Error on i={:d}'.format(i)
break;
args=['C:/Program Files/Wireshark/mergecap.exe','-a','-w','all.pcap','alla.pcap']
shutil.move('all.pcap', 'alla.pcap')
if len(args)>5:
p=subprocess.Popen(args)
if p.wait()<>0:
print 'Error on the last section'
print 'Done. {:d} files processed!'.format(i)
if os.path.exists('alla.pcap'):
if os.path.exists('all.pcap'):
os.unlink('alla.pcap')
else:
shutil.move('alla.pcap','all.pcap')
#end
Yuriy.
From: Senthil Kumar S [mailto:senthilkumar.s <at> sasken.com]
Sent: Thursday, August 18, 2011 2:18 PM
To: tcpreplay-users <at> lists.sourceforge.net
Subject: [Tcpreplay-users] PCAPs can be concatenated ?
Hi All,
I am a new user for this TCPREPLAY utility. I have one doubt,
Is it possible to concatenate two pcap files into one pcap file.
(eg: 1.pcap, 2.pcap ===> combined 3.pcap)
By the way I am using tcpreplay-3.4.4
Thanks in advance
Senthil.
SASKEN BUSINESS DISCLAIMER: This message may contain confidential, proprietary or legally privileged information. In case you are not the original intended Recipient of the message, you must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message and you are requested to delete it and inform the sender. Any views expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by Sasken Communication Technologies Limited ("Sasken") unless sent with that express intent and with due authority of Sasken. Sasken has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email.
Read Disclaimer at http://www.sasken.com/extras/mail_disclaimer.html