You must be a MyPeek member to download our extensibility solutions. Click here to learn more about the benefits of membership and find out how to sign up for free.
You must have a valid maintenance contract to download this file.
If you are not a Savvius Maintenance Customer but would like to purchase a Maintenance contract for your Savvius product please click here for sales information.
Category : Scripts
Submitted By : Savvius
Downloaded : 384 Times
Rating : 5 of 5
OmniPeek Command Line Interface
I have created a command line interface to capture and save packets using the OmniPeek Console. With this command line you can list the adapters available for capture and select an adapter to capture on. You can also specify a packet file to capture to and the amount of time to capture.
In this article I will show you how to use this command line interface tool. The program run by the user is actually just a DOS batch file that takes some parameters. The DOS batch file in turn calls into a perl script. The perl script is the guts and has all the logic to start and stop the capture. Because the script is written in perl you are free to add any features you like. Also bevause it is written in perl, you need perl. The perl script also uses the Win32::OLE package, so you will need it as well. Most perl hacks already have both of these.
Everything you need is contained in three files in the zip download; a batch file, a perl script and a capture template file. The batch file is called capture.bat. This is the command you actually run. In turn, the batch file calls the perl script which uses the Peek COM API and the capture template to interact with the OmniPeek Console. To get more information about the command go to the extracted files directory and run capture /?.
Here are some examples of the syntax of the capture command.
Example 1: capture /? Output: Capture specifications for OmniPeek Syntax: capture [ (packet name) (capture duration) /? | /a | /l (packet name) (capture duration) | /w (packet name) (capture duration) | /n (network connection number) (packet name) (capture duration) ] /? shows command information /l selects any local area adapter /w selects any wireless adapter /n selection of adpater to capture with /a list the availble enabled adapters Example 2: capture packets.pkt 5This will capture packets for 5 seconds and save it into a file called packets.pkt using any adapter that has been enabled.
Example 3: capture /w packets.pkt 5This will capture packets for 5 seconds and save it into a file called packets.pkt using any wireless adapter that has been enabled.
Example 4: capture /l packets.pkt 5This will capture packets for 5 seconds and save it into a file called packets.pkt using any local adapter that has been enabled.
Example 5: This example will show you have select a specific adapter to capture with. capture /a Output: 1 Local Area Connection 2 Local Area Connection 2 3 Wireless Network Connection 4 Wireless Network Connection 2 capture /n 3 packets.pkt 10This will capture packets for 10 seconds and save it into a file called packets.pkt using the Wireless Network Connection adapter that has been enabled.
Where does the logs gets saved..?in the above example "packets.pkt"
Posted by: Raghunandan N on Tuesday, June 18th, 2013 at 12:32 AM