summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKristofer Hallin <kristofer@sunet.se>2021-11-10 10:14:09 +0100
committerKristofer Hallin <kristofer@sunet.se>2021-11-10 10:14:09 +0100
commitb80133312330f8f060a78debc635587b88f2367c (patch)
tree7cbdb73a0155a741bcf9086b7df1bf3d84702095 /tools
parentc8bf559249e210ecd925d6dbc672e1a6d469b81f (diff)
parent8c7e1c2e0c6faa608bf93867d9b409b4fd8b4f71 (diff)
Merge branch 'main' of git.sunet.se:soc_collector
Diffstat (limited to 'tools')
-rw-r--r--tools/feeder.py43
1 files changed, 19 insertions, 24 deletions
diff --git a/tools/feeder.py b/tools/feeder.py
index 224ec1b..cf52c36 100644
--- a/tools/feeder.py
+++ b/tools/feeder.py
@@ -8,24 +8,6 @@ import json
import threading
import time
-data = {
- "ip": "",
- "port": 0,
- "whois_description": "",
- "asn": "",
- "asn_country_code": "",
- "ptr": "",
- "abuse_mail": "",
- "domain": "",
- "timestamp_in_utc": "",
- "producer_unique_keys": {
- "subject_cn": "unknown",
- "subject_o": "unknown",
- "full_name": "",
- "end_of_general_support": False,
- }
-}
-
def random_string(iters=1):
full_string = ''
@@ -143,16 +125,29 @@ def generate_blobs(nr_blobs=1):
'port': random_port(),
'whois_description': random_string(2),
'asn': random_asn(),
+ 'asn_country_code': random_country(),
'ptr': random_string(2),
'abuse_mail': random_email(),
'domain': "sunet.se",
'timestamp_in_utc': get_timestamp(),
- 'producer_unique_keys': {
- 'subject_cn': 'unknown',
- 'subject_o': 'unknown',
- 'full_name': random_string(3),
- 'end_of_general_support': False,
- }
+ 'user_presentation': {
+ 'description': 'A presentation of the observation as a whole (optional)',
+ 'data': {
+ random_string(): {
+ 'display_name': random_string(),
+ 'data': random_string(),
+ 'description': random_string(),
+ },
+ random_string(): {
+ 'display_name': random_string(),
+ 'data': random_string(),
+ },
+ random_string(): {
+ 'display_name': random_string(),
+ 'data': random_string(),
+ },
+ }
+ },
})
return blobs