OpenRCE/sulley — pull request #44 by 7histle (2013-01-02 16:40:42+00:00)
Title: fix:  	Prevent use self.recv for self.proto = "udp". 

Prevent use self.recv for self.proto = "udp".

Descr
~~~~~~
--- cut ---
if self.proto == socket.SOCK_STREAM or socket.SOCK_DGRAM:
try:
self.last_recv = sock.recv(10000)
except Exception, e:
self.last_recv = ""
else:
self.last_recv = ""
--- cut --

socket.SOCK_DGRAM -> 2
socket.SOCK_STREAM -> 1

>> proto = socket.SOCK_DGRAM
>> proto == socket.SOCK_STREAM or socket.SOCK_DGRAM
2
>> proto == (socket.SOCK_STREAM or socket.SOCK_DGRAM)
False

2 - True