search through stdin to detect file/sect headers