■ ■ ■ ■ ■ ■
plugin_server/py/tsunami_plugin.py
| skipped 18 lines |
19 | 19 | | from tsunami.proto import plugin_representation_pb2 |
20 | 20 | | from tsunami.proto import reconnaissance_pb2 |
21 | 21 | | |
22 | | - | _TargetInfo = reconnaissance_pb2.TargetInfo |
23 | | - | _NetworkService = network_service_pb2.NetworkService |
24 | | - | _DetectionReportList = detection_pb2.DetectionReportList |
| 22 | + | TargetInfo = reconnaissance_pb2.TargetInfo |
| 23 | + | NetworkService = network_service_pb2.NetworkService |
| 24 | + | DetectionReportList = detection_pb2.DetectionReportList |
25 | 25 | | PluginDefinition = plugin_representation_pb2.PluginDefinition |
26 | 26 | | |
27 | 27 | | |
| skipped 18 lines |
46 | 46 | | """ |
47 | 47 | | |
48 | 48 | | @abc.abstractmethod |
49 | | - | def Detect(self, target: _TargetInfo, |
50 | | - | matched_services: list[_NetworkService]) -> _DetectionReportList: |
| 49 | + | def Detect(self, target: TargetInfo, |
| 50 | + | matched_services: list[NetworkService]) -> DetectionReportList: |
51 | 51 | | """Run detection logic for the target. |
52 | 52 | | |
53 | 53 | | Args: |
54 | | - | target: Information abouut the scanning target itself. |
| 54 | + | target: Information about the scanning target itself. |
55 | 55 | | matched_services: A list of network services whose vulnerabilities could |
56 | 56 | | be detected by this plugin. |
57 | 57 | | |
| skipped 4 lines |