# Start capturing wireshark packets manually



## saket107 (Apr 19, 2009)

HI,

I am working on an assignment wherein I need to write TCL scripts to capture wireshark packets running on Windows XP.
To start the wireshark capture, one needs to open wireshark.exe and then go to capture->Interface->start.

Before writing script, I tried running manually. Below are the steps, I followed -

1) Open command prompt from start->Run and type cmd.
2) Go to path where executable of wireshark is stored( example - c:\program files\wireshark).
3) run *wireshark.exe -i 192.168.1.2*

Wireshark application is opened. But it does not start capturing the packets. 

I think one needs to do something from the wireshark application and not from the MS-DOS. Can anyone tell me how to start wireshark capture from MS-DOS?

Can anyone also suggest me some other way to start capturing wireshark packets without manually doing it.

Thanks,
saket


----------



## lorjack (Nov 15, 2007)

Can't help with homework


----------



## Cellus (Aug 31, 2006)

While we typically do not assist with homework, showing how to use the command line to run Wireshark is okay in this case. As for interpreting the captured traffic, that's another story.

Add the *-k* option to start the capture.

eg: _wireshark.exe -i 192.168.1.2 -k_

I suggest you take a look at the Wireshark documentation for details on running Wireshark from the command line for more information:

http://www.wireshark.org/docs/wsug_html/#ChCustCommandLine


----------



## saket107 (Apr 19, 2009)

Thanks for your help. This works!!!

I am working on a project where I was stuck while running wireshark. Its definitely not a home work.


----------

