Permalink
Browse files
updated chans on dionaea module, timeout on broker banner
- Loading branch information...
Showing
with
11 additions
and
7 deletions.
-
+6
−2
cli/feed.py
-
+5
−5
dionaea/hpfeeds.py
|
@@ -59,9 +59,13 @@ def main(opts, action, pubdata=None): |
|
|
log('could not connect to broker.')
|
|
|
return 1
|
|
|
|
|
|
- s.settimeout(None)
|
|
|
unpacker = FeedUnpack()
|
|
|
- d = s.recv(1024)
|
|
|
+ try: d = s.recv(1024)
|
|
|
+ except socket.timeout:
|
|
|
+ log('timeout on banner?')
|
|
|
+ return 1
|
|
|
+
|
|
|
+ s.settimeout(None)
|
|
|
|
|
|
published = False
|
|
|
|
|
|
|
@@ -59,18 +59,18 @@ def DEBUGPERF(msg): |
|
|
OP_SUBSCRIBE: 5+256*2,
|
|
|
}
|
|
|
|
|
|
-CAPTURECHAN = 'mwcapture'
|
|
|
-DCECHAN = 'dcerpcrequests'
|
|
|
-SCPROFCHAN = 'shellcodeprofiles'
|
|
|
-UNIQUECHAN = 'mwbinary-sensorunique'
|
|
|
+CAPTURECHAN = 'dionaea.capture'
|
|
|
+DCECHAN = 'dionaea.dcerpcrequests'
|
|
|
+SCPROFCHAN = 'dionaea.shellcodeprofiles'
|
|
|
+UNIQUECHAN = 'mwbinary.dionaea.sensorunique'
|
|
|
|
|
|
class BadClient(Exception):
|
|
|
pass
|
|
|
|
|
|
# packs a string with 1 byte length field
|
|
|
def strpack8(x):
|
|
|
if isinstance(x, str): x = x.encode('latin1')
|
|
|
- return struct.pack('!B', len(x)) + x
|
|
|
+ return struct.pack('!B', len(x)%0xff) + x
|
|
|
|
|
|
# unpacks a string with 1 byte length field
|
|
|
def strunpack8(x):
|
|
|
0 comments on commit
53e5cfd