我正在Python中編寫腳本以生成強力詞表。我已經可以連接字符串只,但我不能在決賽中的每個單詞的串聯一些隨機數,因爲它說,我不能連接海峽和int對象...無法連接字符串與整數
代碼:
wList = []
words = raw_input("[+]Insert the words that you wish: ")
outputFile = raw_input("[+]Insert the path to save the file: ")
wordList = words.split(",")
for x in wordList:
for y in wordList:
wList.append(x + y)
wList.append(y + x)
wList.append(x + "-" + y)
wList.append(y + "-" + x)
wList.append(x + "_" + y)
wList.append(y + "_" + x)
wList.append(x + "@" + y)
wList.append(y + "@" + x)
for num in wordList:
for num2 in wordList:
for salt in range(1,10):
wList.append(num + num2 + int(salt))
wList.append(num2 + num + int(salt))
https://docs.python.org/3/library/functions.html#func-str – wwii