#NEWLINE# def FindLiteral( self , pattern , data ) : #NEWLINE# #INDENT# 'Search the data for a hit.' #NEWLINE# utils . XorByteArray ( pattern , self . xor_in_key ) #NEWLINE# offset = 0 #NEWLINE# while 1 : #NEWLINE# #INDENT# offset = data . find ( pattern , offset ) #NEWLINE# if ( offset < 0 ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# ( yield ( offset , ( offset + len ( pattern ) ) ) ) #NEWLINE# offset += 1 #NEWLINE# #UNINDENT# utils . XorByteArray ( pattern , self . xor_in_key )