Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Tshark automation file conversion, Windows 10 Pro, Visual Studio 2017, SSIS, Attempting to automate Tshark file conversion from pcap to csv.

I am attempting to automate file conversion from .pcap to .csv using Visual Studio 2017, Integration Services (SSIS) and a C# script transformation (please see attached c# extract below).

RESULTS: The file conversion works perfectly when used manually i.e. interactively in the command line interface (in cmd window).

But inside SSIS: Attempt with C# Script: failed, CSV file created but is empty. Attempt with Execute Process: failed, CSV file created but is empty.

The target .csv file is produced successfully however, the target file is empty despite the source .pcap file being populated with packets.

DIAGNOSIS: Either my C# is not up to scratch or I am using an incorrect command syntax or there may be some Microsoft .dll issue which I am unaware of. Could you please advise, any assistance would be most appreciated. Thank you.

Process cmd = new Process();

cmd.StartInfo.FileName = "C:\Windows\System32\cmd.exe";

cmd.StartInfo.Arguments = @"/C C:\Program Files\Wireshark\tshark.exe -T fields -n -r C:\tmp\S023_TShark_1.pcap -e frame.time -e frame.number -e eth.src -e eth.dst -e ip.src -e ip.dst -e ip.proto -E -E separator=, -E quote=d -E occurrence=f > C:\tmp\S023_TShark_1.csv";

cmd.Start();

Dts.TaskResult = (int)ScriptResults.Success;

Tshark automation file conversion, Windows 10 Pro, Visual Studio 2017, SSIS, Attempting to automate Tshark file conversion from pcap to csv.

I am attempting to automate file conversion from .pcap to .csv using Visual Studio 2017, Integration Services (SSIS) and a C# script transformation (please see attached c# extract below).

RESULTS: The file conversion works perfectly when used manually i.e. interactively in the command line interface (in cmd window).

But inside SSIS: Attempt with C# Script: failed, CSV file created but is empty. Attempt with Execute Process: failed, CSV file created but is empty.

The target .csv file is produced successfully however, the target file is empty despite the source .pcap file being populated with packets.

DIAGNOSIS: Either my C# is not up to scratch or I am using an incorrect command syntax or there may be some Microsoft .dll issue which I am unaware of. Could you please advise, any assistance would be most appreciated. Thank you.

Process cmd = new Process();

cmd.StartInfo.FileName = "C:\Windows\System32\cmd.exe";

cmd.StartInfo.Arguments = @"/C C:\Program Files\Wireshark\tshark.exe -T fields -n -r C:\tmp\S023_TShark_1.pcap -e frame.time -e frame.number -e eth.src -e eth.dst -e ip.src -e ip.dst -e ip.proto -E -E separator=, -E quote=d -E occurrence=f > C:\tmp\S023_TShark_1.csv";

cmd.Start();

Dts.TaskResult = (int)ScriptResults.Success;

Tshark automation file conversion, file conversion using Windows 10 Pro, Visual Studio 2017, SSIS, Attempting to automate Tshark file integration services SSIS conversion from pcap to csv.csv. Empty file!

I am attempting to automate file conversion from .pcap to .csv using Visual Studio 2017, Integration Services (SSIS) and a C# script transformation (please see attached c# extract below).

RESULTS: The file conversion works perfectly when used manually i.e. interactively in the command line interface (in cmd window).

But inside SSIS: Attempt with C# Script: failed, CSV file created but is empty. Attempt with Execute Process: failed, CSV file created but is empty.

The target .csv file is produced successfully however, the target file is empty despite the source .pcap file being populated with packets.

DIAGNOSIS: Either my C# is not up to scratch or I am using an incorrect command syntax or there may be some Microsoft .dll issue which I am unaware of. Could you please advise, any assistance would be most appreciated. Thank you.

Process cmd = new Process();

cmd.StartInfo.FileName = "C:\Windows\System32\cmd.exe";

cmd.StartInfo.Arguments = @"/C C:\Program Files\Wireshark\tshark.exe -T fields -n -r C:\tmp\S023_TShark_1.pcap -e frame.time -e frame.number -e eth.src -e eth.dst -e ip.src -e ip.dst -e ip.proto -E -E separator=, -E quote=d -E occurrence=f > C:\tmp\S023_TShark_1.csv";

cmd.Start();

Dts.TaskResult = (int)ScriptResults.Success;

Tshark file conversion using Windows 10 Pro, Visual Studio 2017, integration services SSIS and C# conversion from pcap to csv. Empty file!

I am attempting to automate file conversion from .pcap to .csv using Visual Studio 2017, Integration Services (SSIS) and a C# script transformation (please see attached c# extract below).

RESULTS: The file conversion works perfectly when used manually i.e. interactively in the command line interface (in cmd window).

But inside SSIS: Attempt with C# Script: failed, CSV file created but is empty. Attempt with Execute Process: failed, CSV file created but is empty.

The target .csv file is produced successfully however, the target file is empty despite the source .pcap file being populated with packets.

DIAGNOSIS: Either my C# is not up to scratch or I am using an incorrect command syntax or there may be some Microsoft .dll issue which I am unaware of. Could you please advise, any assistance would be most appreciated. Thank you.

Process cmd = new Process();

cmd.StartInfo.FileName = "C:\Windows\System32\cmd.exe";

cmd.StartInfo.Arguments = @"/C C:\Program Files\Wireshark\tshark.exe -T fields -n -r C:\tmp\S023_TShark_1.pcap -e frame.time -e frame.number -e eth.src -e eth.dst -e ip.src -e ip.dst -e ip.proto -E -E separator=, -E quote=d -E occurrence=f > C:\tmp\S023_TShark_1.csv";

cmd.Start();

Dts.TaskResult = (int)ScriptResults.Success;

Tshark file conversion using Windows 10 Pro, Visual Studio 2017, integration services SSIS and C# conversion from pcap to csv. Empty file!

I am attempting wish to automate file conversion from .pcap to .csv using Visual Studio 2017, Integration Services (SSIS) and a C# script transformation (please see attached c# extract below).

RESULTS: The file conversion works perfectly when used manually i.e. interactively in the command line interface (in cmd window).

window). But inside SSIS: Attempt Attempted with C# Script: failed, CSV file created but is empty. Attempt Attempted with Execute Process: failed, CSV file created but is empty.

The target .csv file is produced successfully however, the target file is empty despite the source .pcap file being populated with pcap (not pcapng) packets.

DIAGNOSIS: Either my C# is not up to scratch or I am using an incorrect command syntax or there may be some Microsoft .dll issue which I am unaware of. Could you please advise, any assistance would be most appreciated. Thank you.

Process cmd = new Process();

cmd.StartInfo.FileName = "C:\Windows\System32\cmd.exe";

cmd.StartInfo.Arguments = @"/C C:\Program Files\Wireshark\tshark.exe -T fields -n -r C:\tmp\S023_TShark_1.pcap -e frame.time -e frame.number -e eth.src -e eth.dst -e ip.src -e ip.dst -e ip.proto -E -E separator=, -E quote=d -E occurrence=f > C:\tmp\S023_TShark_1.csv";

cmd.Start();

Dts.TaskResult = (int)ScriptResults.Success;