def detectFileType(inFile):
	#Check to see if file is of type gnmap
	firstLine = inFile.readline()
	secondLine = inFile.readline()
	thirdLine = inFile.readline()

	#Be polite and reset the file pointer
	inFile.seek(0)

	if (firstLine.find('nmap') != -1 and thirdLine.find('Host:') != -1):
		#Looks like a gnmap file - this wont be true for other nmap output types
		#Check to see if -sV flag was used, if not, warn
		if(firstLine.find('-sV') != -1 or firstLine.find('-A') != -1 or firstLine.find('-sSV') != -1):
			return 'gnmap'
		else:
			utility.Msg("Nmap version detection not used! Discovery module may miss some hosts!", LOG.INFO)
			return 'gnmap'
	else:
		return None
dataset/ETHPy150Open hatRiot/clusterd/src/module/discovery.py/detectFileType/original