Exemplo n.º 1
0
def genName(sessionkey):
	output = ""

	# random.shuffle(A)
	# random.shuffle(B)
	# random.shuffle(C)
	# random.shuffle(D)
	
	# if (random.randint(0,1) == 1):
	# 	awesomename = A[0] + B[0]
	# else:
	# 	awesomename = C[0] + D[0]
	
	while(1):
		anagramlist = memcache.get(str(sessionkey))
		anagramchklist = memcache.get(str(sessionkey)+"_chk")
		numlen = len(anagramlist)
		rndnum = random.randrange(0, numlen)
		awesomename = anagramlist[rndnum]
		
		awesomename = awesomename.replace(" ", "")
		
		random.shuffle(DH.tlds)
		tld = DH.tlds[0]
		
		if ( DH.domainSearch(awesomename + tld) ):
			output = awesomename + tld
			output = output.lower()
		if output not in anagramchklist:
			anagramchklist.append(output)
			memcache.set(str(sessionkey)+"_chk", anagramchklist, 18000)
			break
			
	return output
Exemplo n.º 2
0
def genName():
	output = ""

	random.shuffle(A)
	random.shuffle(B)
	random.shuffle(C)
	random.shuffle(D)
	
	if (random.randint(0,1) == 1):
		awesomename = A[0] + B[0]
	else:
		awesomename = C[0] + D[0]
	
	random.shuffle(DH.tlds)
	tld = DH.tlds[0]

	if ( DH.domainSearch(awesomename + tld) ):
		output = awesomename + tld
			
	return output