1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- from enum import Enum
- class Parameter(Enum):
- """
- Defines the shortname for attack parameters. The shortname may be used for attack parameter specification
- when calling ID2T via the command line.
- """
-
- IP_SOURCE = 'ip.src'
- IP_DESTINATION = 'ip.dst'
- IP_DNS = 'ip.dns'
-
- MAC_SOURCE = 'mac.src'
- MAC_DESTINATION = 'mac.dst'
-
- PORT_OPEN = 'port.open'
- PORT_DESTINATION = 'port.dst'
- PORT_SOURCE = 'port.src'
-
- PACKETS_LIMIT = 'packets.limit'
- NUMBER_ATTACKERS = 'attackers.count'
- ATTACK_DURATION = 'attack.duration'
- VICTIM_BUFFER = 'victim.buffer'
- TARGET_URI = 'target.uri'
- NUMBER_INITIATOR_BOTS = 'bots.count'
-
- TARGET_HOST = 'target.host'
-
- PACKETS_PER_SECOND = 'packets.per-second'
- INJECT_AT_TIMESTAMP = 'inject.at-timestamp'
-
- INJECT_AFTER_PACKET = 'inject.after-pkt'
-
- PORT_DEST_SHUFFLE = 'port.dst.shuffle'
- PORT_DEST_ORDER_DESC = 'port.dst.order-desc'
- IP_SOURCE_RANDOMIZE = 'ip.src.shuffle'
- PORT_SOURCE_RANDOMIZE = 'port.src.shuffle'
- NAT_PRESENT = 'nat.present'
- TTL_FROM_CAIDA = 'ttl.from.caida'
-
- FILE_CSV = 'file.csv'
- FILE_XML = 'file.xml'
-
- COMM_TYPE = "comm.type"
-
- IP_REUSE_TOTAL = 'ip.reuse.total'
- IP_REUSE_LOCAL = 'ip.reuse.local'
- IP_REUSE_EXTERNAL = 'ip.reuse.external'
-
- PACKET_PADDING = 'packet.padding'
- class ParameterTypes(Enum):
- """
- Defines types for parameters. These types may be used in the specification of allowed parameters within the
- individual attack classes. The type is used to verify the validity of the given value.
- """
- TYPE_IP_ADDRESS = 0
- TYPE_MAC_ADDRESS = 1
- TYPE_PORT = 2
- TYPE_INTEGER_POSITIVE = 3
- TYPE_TIMESTAMP = 4
- TYPE_BOOLEAN = 5
- TYPE_FLOAT = 6
- TYPE_PACKET_POSITION = 7
- TYPE_DOMAIN = 8
- TYPE_FILEPATH = 9
- TYPE_COMM_TYPE = 10
- TYPE_PERCENTAGE = 11
- TYPE_PADDING = 12
|