- def InjectPacket (self, sOpcode, sData, blnToServer, blnEncrypted):
- sLen = self.LongToHex(len(sData) / 2)
- if sOpcode == '':
- raise RuntimeError, 'no opcode supplied'
- sOpcode = sOpcode[len(sOpcode)-2:] + sOpcode[:2]
- if blnEncrypted == True:
- if blnToServer == True:
- sPacket = self.HexToString(sLen + sOpcode + "0300" + sData)
- else :
- sPacket = self.HexToString(sLen + sOpcode + "0400" + sData)
- else :
- if blnToServer == True:
- sPacket = self.HexToString(sLen + sOpcode + "0100" + sData)
- else :
- sPacket = self.HexToString(sLen + sOpcode + "0200" + sData)
- self.Send(sPacket)
- def InjectNotice(self, sMessage):
- sData = struct.pack('<b h', 7, len(sMessage))
- sText = ''
- for letter in sMessage:
- sText += letter.encode('hex-codec') + "00"
- sPacket = sData.encode('hex-codec') + sText
- self.InjectPacket('3667', sPacket.upper(), False, True)
whoops
By: Guest | Date: Jan 14 2008 19:30 | Format: None | Expires: never | Size: 1.05 KB | Hits: 1164
Latest pastes
51 minutes ago
10 hours ago
1 days ago
2 days ago
2 days ago