diff --git a/README.md b/README.md index 1d2eec1..b0a8b09 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ If you install from source (git clone https://github.com/wireshark/wireshark; cd ## Features - Open 'pcap'/'pcapng' network capture files. Use command "Open pcap file..." or with vscode >=1.46 directly open cap/pcap/pcapng files. +- Compressed pcap/pcapng files are supported as well with extensions cap|pcap|pcapng.gz|zstlz4 - Display filter with known syntax from wireshark - **Time sync** feature. - Calculates time for each frame based on timestamp and broadcasts the time to the other **Time sync** extensions so that they reveal the fitting time ranges. diff --git a/package.json b/package.json index d20df02..1fc209e 100644 --- a/package.json +++ b/package.json @@ -53,13 +53,13 @@ "displayName": "pcap/pcapng/cap", "selector": [ { - "filenamePattern": "*.pcap" + "filenamePattern": "{*.pcap,*.pcap.gz,*.pcap.zst,*.pcap.lz4}" }, { - "filenamePattern": "*.pcapng" + "filenamePattern": "{*.pcapng,*.pcapng.gz,*.pcapng.zst,*.pcapng.lz4}" }, { - "filenamePattern": "*.cap" + "filenamePattern": "{*.cap,*.cap.gz,*.cap.zst,*.cap.lz4}" } ] } diff --git a/src/extension.ts b/src/extension.ts index 771c487..6f5a5c0 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -102,7 +102,9 @@ export function activate(context: vscode.ExtensionContext) { canSelectFiles: true, canSelectFolders: false, canSelectMany: false, - filters: { 'pcap files': ['pcap', 'cap', 'pcapng'] }, + filters: { + 'pcap files': ['pcap', 'cap', 'pcapng'].flatMap((ext) => [ext, ext + '.gz', ext + '.zst', ext + '.lz4']), + }, openLabel: 'Select pcap file to open...', }) .then(async (uris: vscode.Uri[] | undefined) => { @@ -145,7 +147,7 @@ export function activate(context: vscode.ExtensionContext) { canSelectFiles: true, canSelectFolders: false, canSelectMany: true, - filters: { 'pcap files': ['pcap', 'cap', 'pcapng'] }, + filters: { 'pcap files': ['pcap', 'cap', 'pcapng'].flatMap((ext) => [ext, ext + '.gz', ext + '.zst', ext + '.lz4']) }, openLabel: 'Select pcap file to filter...', }) .then(async (uris: vscode.Uri[] | undefined) => { @@ -167,7 +169,7 @@ export function activate(context: vscode.ExtensionContext) { canSelectFiles: true, canSelectFolders: false, canSelectMany: true, - filters: { 'pcap files': ['pcap', 'cap', 'pcapng'] }, + filters: { 'pcap files': ['pcap', 'cap', 'pcapng'].flatMap((ext) => [ext, ext + '.gz', ext + '.zst', ext + '.lz4']) }, openLabel: 'Select pcap file to extract DLT from...', }) .then(async (uris: vscode.Uri[] | undefined) => { @@ -189,7 +191,7 @@ export function activate(context: vscode.ExtensionContext) { canSelectFiles: true, canSelectFolders: false, canSelectMany: true, - filters: { 'pcap files': ['pcap', 'cap', 'pcapng'] }, + filters: { 'pcap files': ['pcap', 'cap', 'pcapng'].flatMap((ext) => [ext, ext + '.gz', ext + '.zst', ext + '.lz4']) }, openLabel: 'Select pcap file to remove TECMP headers from...', }) .then(async (uris: vscode.Uri[] | undefined) => {