'Search the data for a hit.'

def FindLiteral(self, pattern, data):

    utils.XorByteArray(pattern, self.xor_in_key)
    offset = 0
    while 1:
        offset = data.find(pattern, offset)
        if (offset < 0):
            break
        (yield (offset, (offset + len(pattern))))
        offset += 1
    utils.XorByteArray(pattern, self.xor_in_key)
