mirror of https://github.com/MISP/PyMISP
chg: [test] set a default distribution for massive event creation
parent
2f84b7ecdb
commit
10ccd637d9
|
@ -65,10 +65,11 @@ def create_dummy_event(misp):
|
|||
def create_massive_dummy_events(misp, nbattribute):
|
||||
event = misp.new_event(0, 4, 0, 'massive dummy event')
|
||||
eventid = event['Event']['id']
|
||||
distribution = '0'
|
||||
functions = [floodtxt, floodip, flooddomain, flooddomainip, floodemail, floodattachment]
|
||||
for i in range(nbattribute):
|
||||
choice = randint(0, 5)
|
||||
if choice == 5:
|
||||
floodattachment(misp, eventid, event['Event']['distribution'], False, 'Payload delivery', '', event['Event']['info'], event['Event']['analysis'], event['Event']['threat_level_id'])
|
||||
floodattachment(misp, eventid, distribution, False, 'Payload delivery', '', event['Event']['info'], event['Event']['analysis'], event['Event']['threat_level_id'])
|
||||
else:
|
||||
functions[choice](misp, event)
|
||||
|
|
Loading…
Reference in New Issue