|
@@ -68,6 +68,9 @@ class CLI(object):
|
|
parser.add_argument('-o', '--output', metavar="PCAP_FILE",
|
|
parser.add_argument('-o', '--output', metavar="PCAP_FILE",
|
|
help='path to the output pcap file')
|
|
help='path to the output pcap file')
|
|
|
|
|
|
|
|
+ parser.add_argument('-ie', '--inject_empty', action='store_true',
|
|
|
|
+ help='injects ATTACK into an EMPTY PCAP file, using the statistics of the input PCAP.')
|
|
|
|
+
|
|
# Attack arguments
|
|
# Attack arguments
|
|
parser.add_argument('-a', '--attack', metavar="ATTACK", action='append',
|
|
parser.add_argument('-a', '--attack', metavar="ATTACK", action='append',
|
|
help='injects ATTACK into a PCAP file.', nargs='+')
|
|
help='injects ATTACK into a PCAP file.', nargs='+')
|
|
@@ -162,7 +165,12 @@ class CLI(object):
|
|
# Process attack(s) with given attack params
|
|
# Process attack(s) with given attack params
|
|
if self.args.attack is not None:
|
|
if self.args.attack is not None:
|
|
# If attack is present, load attack with params
|
|
# If attack is present, load attack with params
|
|
- controller.process_attacks(self.args.attack)
|
|
|
|
|
|
+ if self.args.inject_empty:
|
|
|
|
+ # Attack PCAPs will not be merged with base PCAP
|
|
|
|
+ controller.process_attacks(self.args.attack, inject_empty=True)
|
|
|
|
+ else:
|
|
|
|
+ # Attack PCAP will be merged with base PCAP
|
|
|
|
+ controller.process_attacks(self.args.attack)
|
|
|
|
|
|
# Parameter -q without arguments was given -> go into query loop
|
|
# Parameter -q without arguments was given -> go into query loop
|
|
if self.args.query == [None]:
|
|
if self.args.query == [None]:
|