old_contents: #!/usr/bin/python
  
  ## Binary Analysis Tool
  ## Copyright 2012 Armijn Hemel for Tjaldur Software Governance Solutions
  ## Licensed under Apache 2.0, see LICENSE file for details
  
  '''
  Helper script to verify the LIST files generated by generatelist.py. This is useful to see if any typos were made.
  '''
  
  import sys, os, os.path
  from optparse import OptionParser
  
  def main(argv):
  	parser = OptionParser()
  	parser.add_option("-f", "--filedir", action="store", dest="filedir", help="path to directory containing files to unpack", metavar="DIR")
  	(options, args) = parser.parse_args()
  
  	try:
  		filelist = open(options.filedir + "/LIST").readlines()
  	except:
  		parser.error("'LIST' not found in file dir")
  
  	prev_split = None
  	for unpackfile in filelist:
  		## simple format check
  		try:
  			unpacks = unpackfile.strip().split()
  			if len(unpacks) != 4:
  				print >>sys.stderr, "FORMAT ERROR", unpackfile.strip()
  				sys.stderr.flush()
  				continue
  		except Exception, e:
  			# oops, something went wrong
  			print >>sys.stderr, e
  		if prev_split == None:
  			prev_split = unpacks
  			continue
  		## see if we have the same package with different case
  		if unpacks[0] != prev_split[0] and unpacks[0].lower() == prev_split[0].lower():
  			print >>sys.stderr, "CASE ERROR", unpackfile.strip()
  			sys.stderr.flush()
  		prev_split = unpacks
  
  if __name__ == "__main__":
  	main(sys.argv)
  
new_contents: #!/usr/bin/python
  
  ## Binary Analysis Tool
  ## Copyright 2012 Armijn Hemel for Tjaldur Software Governance Solutions
  ## Licensed under Apache 2.0, see LICENSE file for details
  
  '''
  Helper script to verify the LIST files generated by generatelist.py. This is useful to see if any typos were made.
  '''
  
  import sys, os, os.path
  from optparse import OptionParser
  
  def main(argv):
  	parser = OptionParser()
  	parser.add_option("-l", "--list", action="store", dest="listfile", help="path to LIST", metavar="DIR")
  	(options, args) = parser.parse_args()
  
  	try:
  		filelist = open(options.listfile).readlines()
  	except:
  		parser.error("'LIST' not found")
  
  	prev_split = None
  	for unpackfile in filelist:
  		## simple format check
  		try:
  			unpacks = unpackfile.strip().split()
  			if len(unpacks) != 4:
  				print >>sys.stderr, "FORMAT ERROR", unpackfile.strip()
  				sys.stderr.flush()
  				continue
  		except Exception, e:
  			# oops, something went wrong
  			print >>sys.stderr, e
  		if prev_split == None:
  			prev_split = unpacks
  			continue
  		## see if we have the same package with different case
  		if unpacks[0] != prev_split[0] and unpacks[0].lower() == prev_split[0].lower():
  			print >>sys.stderr, "CASE ERROR", unpackfile.strip()
  			sys.stderr.flush()
  		prev_split = unpacks
  
  if __name__ == "__main__":
  	main(sys.argv)
  
subject: change parameters for verifylist