Skip to content

Commit 64098ec

Browse files
committed
Fixed bug in 'writer' decoder that caused it to raise an exception when passed additional keyword arguments.
1 parent 9cc908b commit 64098ec

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

decoders/misc/writer.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,18 @@ def __init__(self, **kwargs):
2323
'''
2424
self.file = None
2525
dshell.Decoder.__init__(self,
26-
name='writer',
27-
description='pcap/session writer',
28-
author='twp',
29-
raw=True,
30-
optiondict=dict(filename=dict(default='%(clientip)s:%(clientport)s-%(serverip)s:%(serverport)s-%(direction)s.txt'),
31-
)
32-
)
33-
34-
def rawHandler(self, pktlen, pkt, ts):
26+
name='writer',
27+
description='pcap/session writer',
28+
author='twp',
29+
raw=True,
30+
optiondict=dict(
31+
filename=dict(
32+
default='%(clientip)s:%(clientport)s-%(serverip)s:%(serverport)s-%(direction)s.txt'
33+
),
34+
)
35+
)
36+
37+
def rawHandler(self, pktlen, pkt, ts, **kwargs):
3538
self.decodedbytes += pktlen
3639
self.count += 1
3740
self.dump(pktlen, pkt, ts) # pktlen may be wrong if we stripped vlan

0 commit comments

Comments
 (0)