-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow step to test if plugins are loaded
- Loading branch information
Showing
5 changed files
with
77 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
import subprocess | ||
|
||
if os.name == 'nt': | ||
tshark = r'build\run\RelWithDebInfo\tshark.exe' | ||
else: | ||
tshark = "wireshark/build/run/tshark" | ||
|
||
proc = subprocess.Popen([tshark, "-G", "plugins"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) | ||
out, err = proc.communicate() | ||
if proc.returncode != 0: | ||
print(f'tshark exited with return code {proc.returncode}, stderr:') | ||
print(err.decode()) | ||
exit(1) | ||
|
||
out = out.decode() | ||
if 'tracee-event' in out and 'tracee-network-capture' in out and 'tracee-json' in out: | ||
print('Plugins loaded successfully') | ||
exit(0) | ||
else: | ||
print("Plugins not loaded. tshark output:") | ||
print(out) | ||
print("Tshark errors:") | ||
print(err.decode()) | ||
exit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters