Hack Forums
Is it possible to combine words in a wordlist to make new words ? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449)
+---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4)
+---- Thread: Is it possible to combine words in a wordlist to make new words ? (/showthread.php?tid=6211195)



Is it possible to combine words in a wordlist to make new words ? - universecloud - Jun 28, 2022

just like the title says, in kali linux (an application basically), not merging two wordlists(which is what im getting in a search), combining the words in the same wordlist to make a new wordlist.


RE: Is it possible to combine words in a wordlist to make new words ? - switchwagaga - Jun 30, 2022

On kali use "Cupp" wordlist generator.


RE: Is it possible to combine words in a wordlist to make new words ? - Athr - Jun 30, 2022

Wrote a basic program for this task.
There will be better and faster ways to accomplish this.

merged_wordlist.txt
Code
word1
word2
word3

combine_words.py
Code
from itertools import permutations

# i have not tested this with bigger lists
# can be RAM intensive
with open('merged_wordlist.txt', 'r') as f:
    words = f.read().split('\n')

with open('combined_wordlist.txt', 'w+') as f:
    # assume you want to combine two words
    for w1, w2 in permutations(words, 2):
        if w1 and w2:
            f.write(w1 + w2 + '\n')

Output:
combined_wordlist.py
Code
word1word2
word1word3
word2word1
word2word3
word3word1
word3word2



RE: Is it possible to combine words in a wordlist to make new words ? - MntlPrblm - Jun 30, 2022

Another thing you could try other than whats listed above is using .rule files to modify the wordlist as its being used