-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shell command adaptor ss implementation started
- Loading branch information
Showing
5 changed files
with
111 additions
and
3 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
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,3 @@ | ||
{ | ||
"file_type": "shell-ss" | ||
} |
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,19 @@ | ||
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process | ||
udp UNCONN 0 0 127.0.0.53%lo:53 0.0.0.0:* | ||
udp UNCONN 0 0 65.21.253.97%eth0:68 0.0.0.0:* | ||
udp UNCONN 0 0 0.0.0.0:123 0.0.0.0:* | ||
udp UNCONN 0 0 127.0.0.1:323 0.0.0.0:* | ||
udp UNCONN 0 0 *:1194 *:* | ||
udp UNCONN 0 0 [::1]:323 [::]:* | ||
tcp LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* | ||
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* | ||
tcp LISTEN 0 511 0.0.0.0:41337 0.0.0.0:* | ||
tcp LISTEN 0 511 0.0.0.0:443 0.0.0.0:* | ||
tcp LISTEN 0 128 169.254.255.255:51337 0.0.0.0:* | ||
tcp LISTEN 0 4096 127.0.0.1:27017 0.0.0.0:* | ||
tcp LISTEN 0 511 0.0.0.0:80 0.0.0.0:* | ||
tcp ESTAB 0 0 169.254.255.255:51337 169.254.10.1:39236 | ||
tcp ESTAB 0 0 169.254.255.255:51337 169.254.10.2:56164 | ||
tcp SYN-RECV 0 0 65.21.253.97:80 104.223.42.139:10446 | ||
tcp ESTAB 0 192 65.21.253.97:22 81.175.152.166:49224 | ||
tcp LISTEN 0 128 [::]:22 [::]:* |
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,21 @@ | ||
"""Test shell command output parsing""" | ||
|
||
import pathlib | ||
|
||
from tcsfw.batch_import import BatchImporter | ||
from tcsfw.components import OperatingSystem | ||
from tcsfw.property import PropertyKey | ||
from tcsfw.verdict import Verdict | ||
from tests.test_model import Setup | ||
|
||
|
||
class Setup_1(Setup): | ||
"""Setup for tests here""" | ||
def __init__(self): | ||
super().__init__() | ||
self.device1 = self.system.device().hw("1:0:0:0:0:1") | ||
|
||
|
||
def test_shell_ss_pass(): | ||
su = Setup_1() | ||
BatchImporter(su.get_inspector()).import_batch(pathlib.Path("tests/samples/shell-ss")) |