<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cppcap - exit after X files? in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161885#M28748</link>
    <description>&lt;P&gt;I see what you mean, Im not getting desires result either, definitely NOT rotating. I put -W 10 as you mentioned, but only got 3&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;[Expert@GATEWAY:0]# cppcap -I eth0 -o filename.pcap -w 1K -W 10 -DNT -f "host 172.16.10.178" -b10&lt;BR /&gt;1 packets captured (78 B)&lt;/P&gt;
&lt;P&gt;[Expert@GATEWAY:0]# ls -lf&lt;BR /&gt;.toprc tcpdumpradius.out .clish_history tcpdumpradius1.out&lt;BR /&gt;filename.pcap_1 fwmonitor.out .ssh .&lt;BR /&gt;.lvm_history .bash_history last_dump.log filename.pcap_2&lt;BR /&gt;filename.pcap .bash_logout .. .cpsizeme.log&lt;BR /&gt;.mgmt_cli .lesshst .bash_profile .bashrc&lt;BR /&gt;[Expert@GATEWAY:0]# ls -lh&lt;BR /&gt;total 28K&lt;BR /&gt;-rw-rw---- 1 admin root 118 Nov 11 15:11 filename.pcap&lt;BR /&gt;-rw-rw---- 1 admin root 1.1K Nov 11 15:09 filename.pcap_1&lt;BR /&gt;-rw-rw---- 1 admin root 1.1K Nov 11 15:10 filename.pcap_2&lt;BR /&gt;-rw-rw---- 1 admin root 1.3K Feb 9 2022 fwmonitor.out&lt;BR /&gt;-rw-r--r-- 1 admin root 1.9K Oct 24 11:12 last_dump.log&lt;BR /&gt;-rw-rw---- 1 admin root 1 Feb 9 2022 tcpdumpradius.out&lt;BR /&gt;-rw-rw---- 1 admin root 1 Feb 9 2022 tcpdumpradius1.out&lt;BR /&gt;[Expert@GATEWAY:0]#&lt;/P&gt;</description>
    <pubDate>Fri, 11 Nov 2022 20:14:26 GMT</pubDate>
    <dc:creator>the_rock</dc:creator>
    <dc:date>2022-11-11T20:14:26Z</dc:date>
    <item>
      <title>Cppcap - exit after X files?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161855#M28733</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;While troubleshooting an issue for a customer I had to collect a bunch of traffic and I tried to use cppcap but have a few questions that I just want check if anyone else has seen and solved somehow.&lt;/P&gt;&lt;P&gt;The issue I was troubleshooting required me to collect traffic over a long period. While setting up the capture I was looking for a way to automatically exit after having saved X amount of data. As far as I could see, the only option was&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" cellspacing="4" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;-b &amp;lt;NUM&amp;gt;&lt;/TD&gt;&lt;TD&gt;capture NUM bytes before stopping&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;but to the best of my understanding this is a counter of collected data on the wire, not amount of data saved to a file...&lt;/P&gt;&lt;P&gt;Has anyone found a way of collecting (for example) 10 files, each 1GB large and then exit?&lt;/P&gt;&lt;TABLE border="1" cellspacing="4" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;-w &amp;lt;FMT&amp;gt;&lt;/TD&gt;&lt;TD&gt;file size limit with rotation followed by 'K'ilo,'M'ega or 'G'iga. Default is bytes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;-W &amp;lt;NUM&amp;gt;&lt;/TD&gt;&lt;TD&gt;use up to NUM files with rotation (use with '-w')&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;-w and -W will limit size and number of files but it will rotate forever and not exit after reaching the value of -W.&lt;/P&gt;&lt;P&gt;Also, if using -I to capture on multiple interfaces, is there afterwards any reference to the interface on which the packet was captured?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reference:&lt;/P&gt;&lt;P&gt;&lt;A title="cppcap - A Check Point Traffic Capture Tool" href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk141412" target="_blank" rel="noopener"&gt;https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk141412&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 11:54:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161855#M28733</guid>
      <dc:creator>Mikael</dc:creator>
      <dc:date>2022-11-11T11:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cppcap - exit after X files?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161881#M28745</link>
      <description>&lt;P&gt;Can you please provide exact syntax you did? I would like to test it in the lab and see what I get.&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 17:40:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161881#M28745</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2022-11-11T17:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cppcap - exit after X files?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161883#M28746</link>
      <description>&lt;P&gt;It would have been something like:&lt;/P&gt;&lt;P&gt;cppcap -I &amp;lt;external nic&amp;gt; -o filename.pcap -w 1G -W 10 -DNT -f "host X.X.X.X"&lt;/P&gt;&lt;P&gt;I also tried to add the -b but as I wrote that seems to be the data on the wire, not written to files...&lt;/P&gt;&lt;P&gt;[Expert@gbgfw1:0]# cppcap -I eth4 -o filename.pcap -w 1K -W 10 -DNT -f "host 192.168.1.5" -b10000&lt;BR /&gt;67 packets captured (9.848 KB)&lt;/P&gt;&lt;P&gt;[Expert@gbgfw1:0]#[Expert@gbgfw1:0]# ls -ltr&lt;BR /&gt;&lt;BR /&gt;-rw-rw---- 1 admin root 1105 Nov 11 20:19 filename.pcap&lt;BR /&gt;-rw-rw---- 1 admin root 1135 Nov 11 20:19 filename.pcap_1&lt;BR /&gt;-rw-rw---- 1 admin root 1062 Nov 11 20:19 filename.pcap_2&lt;BR /&gt;-rw-rw---- 1 admin root 1065 Nov 11 20:20 filename.pcap_3&lt;BR /&gt;-rw-rw---- 1 admin root 1054 Nov 11 20:20 filename.pcap_4&lt;BR /&gt;-rw-rw---- 1 admin root 1147 Nov 11 20:20 filename.pcap_5&lt;BR /&gt;-rw-rw---- 1 admin root 562 Nov 11 20:20 filename.pcap_6&lt;BR /&gt;[Expert@gbgfw1:0]#&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 19:23:35 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161883#M28746</guid>
      <dc:creator>Mikael</dc:creator>
      <dc:date>2022-11-11T19:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Cppcap - exit after X files?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161885#M28748</link>
      <description>&lt;P&gt;I see what you mean, Im not getting desires result either, definitely NOT rotating. I put -W 10 as you mentioned, but only got 3&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;[Expert@GATEWAY:0]# cppcap -I eth0 -o filename.pcap -w 1K -W 10 -DNT -f "host 172.16.10.178" -b10&lt;BR /&gt;1 packets captured (78 B)&lt;/P&gt;
&lt;P&gt;[Expert@GATEWAY:0]# ls -lf&lt;BR /&gt;.toprc tcpdumpradius.out .clish_history tcpdumpradius1.out&lt;BR /&gt;filename.pcap_1 fwmonitor.out .ssh .&lt;BR /&gt;.lvm_history .bash_history last_dump.log filename.pcap_2&lt;BR /&gt;filename.pcap .bash_logout .. .cpsizeme.log&lt;BR /&gt;.mgmt_cli .lesshst .bash_profile .bashrc&lt;BR /&gt;[Expert@GATEWAY:0]# ls -lh&lt;BR /&gt;total 28K&lt;BR /&gt;-rw-rw---- 1 admin root 118 Nov 11 15:11 filename.pcap&lt;BR /&gt;-rw-rw---- 1 admin root 1.1K Nov 11 15:09 filename.pcap_1&lt;BR /&gt;-rw-rw---- 1 admin root 1.1K Nov 11 15:10 filename.pcap_2&lt;BR /&gt;-rw-rw---- 1 admin root 1.3K Feb 9 2022 fwmonitor.out&lt;BR /&gt;-rw-r--r-- 1 admin root 1.9K Oct 24 11:12 last_dump.log&lt;BR /&gt;-rw-rw---- 1 admin root 1 Feb 9 2022 tcpdumpradius.out&lt;BR /&gt;-rw-rw---- 1 admin root 1 Feb 9 2022 tcpdumpradius1.out&lt;BR /&gt;[Expert@GATEWAY:0]#&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 20:14:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161885#M28748</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2022-11-11T20:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Cppcap - exit after X files?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161886#M28749</link>
      <description>&lt;P&gt;Well, if you remove the -b it will rotate, but that's not what I wanted&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want 10 files, 1GB large and then exit..&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 20:15:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161886#M28749</guid>
      <dc:creator>Mikael</dc:creator>
      <dc:date>2022-11-11T20:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cppcap - exit after X files?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161888#M28750</link>
      <description>&lt;P&gt;Ah, I see, ok :). Well, that SORT of works, BUT...does not exit on its own, I had to stop it myself. Let me play around with it, very interesting to see if we can figure it out.&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;[Expert@GATEWAY:0]# ls -lh&lt;BR /&gt;total 68K&lt;BR /&gt;-rw-rw---- 1 admin root 118 Nov 11 15:11 filename.pcap&lt;BR /&gt;-rw-rw---- 1 admin root 1.1K Nov 11 15:09 filename.pcap_1&lt;BR /&gt;-rw-rw---- 1 admin root 1.1K Nov 11 15:10 filename.pcap_2&lt;BR /&gt;-rw-rw---- 1 admin root 1.3K Feb 9 2022 fwmonitor.out&lt;BR /&gt;-rw-r--r-- 1 admin root 1.9K Oct 24 11:12 last_dump.log&lt;BR /&gt;-rw-rw---- 1 admin root 1 Feb 9 2022 tcpdumpradius.out&lt;BR /&gt;-rw-rw---- 1 admin root 1 Feb 9 2022 tcpdumpradius1.out&lt;BR /&gt;-rw-rw---- 1 admin root 1.1K Nov 11 15:25 test.pcap&lt;BR /&gt;-rw-rw---- 1 admin root 1.2K Nov 11 15:25 test.pcap_1&lt;BR /&gt;-rw-rw---- 1 admin root 1.1K Nov 11 15:25 test.pcap_2&lt;BR /&gt;-rw-rw---- 1 admin root 1.1K Nov 11 15:25 test.pcap_3&lt;BR /&gt;-rw-rw---- 1 admin root 1016 Nov 11 15:25 test.pcap_4&lt;BR /&gt;-rw-rw---- 1 admin root 1.1K Nov 11 15:25 test.pcap_5&lt;BR /&gt;-rw-rw---- 1 admin root 1.1K Nov 11 15:25 test.pcap_6&lt;BR /&gt;-rw-rw---- 1 admin root 1.1K Nov 11 15:25 test.pcap_7&lt;BR /&gt;-rw-rw---- 1 admin root 1.1K Nov 11 15:25 test.pcap_8&lt;BR /&gt;-rw-rw---- 1 admin root 1.1K Nov 11 15:25 test.pcap_9&lt;BR /&gt;[Expert@GATEWAY:0]#&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 20:27:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161888#M28750</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2022-11-11T20:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Cppcap - exit after X files?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161889#M28751</link>
      <description>&lt;P&gt;Yes exactly, which is probably fine in some scenarios.&lt;/P&gt;&lt;P&gt;In my scenario though I wanted traffic from a certain timestamp and I had 20GB disk free to save it on so I wanted it to exit once 20GB was collected...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 20:29:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161889#M28751</guid>
      <dc:creator>Mikael</dc:creator>
      <dc:date>2022-11-11T20:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Cppcap - exit after X files?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161916#M28757</link>
      <description>&lt;P&gt;I suspect the precise functionality you're looking for is an RFE.&lt;BR /&gt;Having said that, you could probably do a combination of cppcap and a script that monitors for the creation of capture files.&lt;BR /&gt;Once you've captured X files, kill cppcap.&lt;BR /&gt;To facilitate this: use -W 11 (one more capture file than you want)&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 13:54:25 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161916#M28757</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2022-11-12T13:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cppcap - exit after X files?</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161923#M28762</link>
      <description>&lt;P&gt;If it is possible the author of the cppcap tool will know.&amp;nbsp;&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/71330"&gt;@aviadhah&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 19:00:09 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Cppcap-exit-after-X-files/m-p/161923#M28762</guid>
      <dc:creator>Timothy_Hall</dc:creator>
      <dc:date>2022-11-12T19:00:09Z</dc:date>
    </item>
  </channel>
</rss>

