Esempio n. 1
0
def main ():
	'''Usage: ./makelist.py <your file name without the dot>.'''
	xt = []
	if len(sys.argv) > 1:
		for str in sys.argv[1:]:
			xt = ip.sanitize(str)		
			#xt = xt + " " + str;
		print xt

	else:
		print main.__doc__
Esempio n. 2
0
def main ():
	'''Usage: ./makelist.py <your file name without the dot>.'''
	xt = []
	count = 0
	result = []
	inStr = ""
	if len(sys.argv) > 1:
		lookinto = sys.argv[1]
		if sys.argv[2] != "-full":
			for asd in sys.argv[2:]:
				inStr = inStr+asd+" "
			xt = ip.sanitize(inStr)		
			print xt
			try:
				f = open ("original.txt", "w");
				sii = ""
				for si in xt:
					sii = sii + si + " "
				f.write(sii);
				f.close();
			except:
				print "Error: can't open file. please check the\
				 location of input file input_lm.txt in current folder"	
			for str in xt:
				#xt = ip.sanitize(str)		
				#xt = xt + " " + str;
				arb = k.interface(str)
			if arb == -1 and len(xt) > count:
				print "checking", xt[count-1]
				count = count + 1
			else:
				result = k.getList()
				

		else:
			k.interface(sys.argv[3], 0)
			result = k.getList()
#			print k.getList().__doc__		
	else:
		print main.__doc__

	res=[]
	for i in result:
		res.extend(i.split('_'))
	res = set (res)
	res = list(res)
	print res			
#	print result
#	print lookinto
	fs.getmatch(res,lookinto );