Skip to content

Commit fb14294

Browse files
committed
feat(contracts): add file output type
Declare the shared "file" contract output type so injectors can emit file findings (e.g. NetExec spider_plus) and the platform can deserialize them. Part of the attack-path file finding work (OpenAEV #6647).
1 parent ab7e19f commit fb14294

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

pyoaev/contracts/contract_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class ContractOutputType(str, Enum):
5050
Credentials: str = "credentials"
5151
Username: str = "username"
5252
Share: str = "share"
53+
File: str = "file"
5354
AdminUsername: str = "admin_username"
5455
Group: str = "group"
5556
Computer: str = "computer"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import unittest
2+
3+
from pyoaev.contracts.contract_config import ContractOutputType
4+
5+
6+
class ContractOutputTypeTest(unittest.TestCase):
7+
def test_file_wire_label(self):
8+
# The wire label is a public contract shared with the platform enum and every
9+
# injector that declares a `file` output; it must stay exactly "file".
10+
self.assertEqual(ContractOutputType.File.value, "file")
11+
self.assertEqual(ContractOutputType.File, "file")
12+
13+
14+
if __name__ == "__main__":
15+
unittest.main()

0 commit comments

Comments
 (0)