diff --git a/ipmibase.py b/ipmibase.py index e724c293..ef5035e1 100644 --- a/ipmibase.py +++ b/ipmibase.py @@ -466,7 +466,7 @@ class IPMISession: if not (data[5]&0b01000000): #This would be the line that might trip up some crappy, insecure BMC implementation return encrypted=0 - if data[6]&0b10000000: + if data[5]&0b10000000: encrypted=1 authcode=rawdata[-12:] expectedauthcode=HMAC.new(self.k1,rawdata[4:-12],SHA).digest()[:12] @@ -476,8 +476,23 @@ class IPMISession: if sid != self.localsid: #session id mismatch, drop it return remseqnumber=unpack(">2 == self.expectednetfn and payload[5] == self.expectedcmd): return -1 #this payload is not a match for our outstanding ipmi packet