crunch wordlist generation with all combinations

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'm trying to generate a wordlist in order to use it to bruteforce my own Truecrypt container. I do know parts of the password, its built up using blocks of other known passwords to increase length, but I forgot in which order the blocks were used and if some blocks weren't used at all.



Example "blocks" separated with space: dog cat bird xyz cow1 lion8



What I would like to do is create a wordlist containing each possible combination of these blocks. E.g



dog
cat
dogcat
catdog
bird
dogbird
catbird
birdcat
birddog
dogcatbird
catdogbird
xyz
dogcatbirdxyz
cow1
xyzcow1dogcat
xyzcow1dogcatbird
catdogbirdxyzcow8
lion8
catdogbirdxyzcow1lion8
lion8catdogbirdxyzcow1
dogcatbirdxyzcow1lion8
cow1birddogcatxyzlion8
cow1lion8birddogcatxyz
...


So far I've tried to utilize a tool called crunch: http://www.irongeek.com/i.php?page=backtrack-r1-man-pages/crunch



But the challenge seems to be how one should generate combinations of shorter combinations, not including all known blocks, example: dogcat only includes 2 blocks.



Perhaps someone know crunch better than me, or if I should use another tool or combination of tools?







share|improve this question























    up vote
    0
    down vote

    favorite












    I'm trying to generate a wordlist in order to use it to bruteforce my own Truecrypt container. I do know parts of the password, its built up using blocks of other known passwords to increase length, but I forgot in which order the blocks were used and if some blocks weren't used at all.



    Example "blocks" separated with space: dog cat bird xyz cow1 lion8



    What I would like to do is create a wordlist containing each possible combination of these blocks. E.g



    dog
    cat
    dogcat
    catdog
    bird
    dogbird
    catbird
    birdcat
    birddog
    dogcatbird
    catdogbird
    xyz
    dogcatbirdxyz
    cow1
    xyzcow1dogcat
    xyzcow1dogcatbird
    catdogbirdxyzcow8
    lion8
    catdogbirdxyzcow1lion8
    lion8catdogbirdxyzcow1
    dogcatbirdxyzcow1lion8
    cow1birddogcatxyzlion8
    cow1lion8birddogcatxyz
    ...


    So far I've tried to utilize a tool called crunch: http://www.irongeek.com/i.php?page=backtrack-r1-man-pages/crunch



    But the challenge seems to be how one should generate combinations of shorter combinations, not including all known blocks, example: dogcat only includes 2 blocks.



    Perhaps someone know crunch better than me, or if I should use another tool or combination of tools?







    share|improve this question





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm trying to generate a wordlist in order to use it to bruteforce my own Truecrypt container. I do know parts of the password, its built up using blocks of other known passwords to increase length, but I forgot in which order the blocks were used and if some blocks weren't used at all.



      Example "blocks" separated with space: dog cat bird xyz cow1 lion8



      What I would like to do is create a wordlist containing each possible combination of these blocks. E.g



      dog
      cat
      dogcat
      catdog
      bird
      dogbird
      catbird
      birdcat
      birddog
      dogcatbird
      catdogbird
      xyz
      dogcatbirdxyz
      cow1
      xyzcow1dogcat
      xyzcow1dogcatbird
      catdogbirdxyzcow8
      lion8
      catdogbirdxyzcow1lion8
      lion8catdogbirdxyzcow1
      dogcatbirdxyzcow1lion8
      cow1birddogcatxyzlion8
      cow1lion8birddogcatxyz
      ...


      So far I've tried to utilize a tool called crunch: http://www.irongeek.com/i.php?page=backtrack-r1-man-pages/crunch



      But the challenge seems to be how one should generate combinations of shorter combinations, not including all known blocks, example: dogcat only includes 2 blocks.



      Perhaps someone know crunch better than me, or if I should use another tool or combination of tools?







      share|improve this question











      I'm trying to generate a wordlist in order to use it to bruteforce my own Truecrypt container. I do know parts of the password, its built up using blocks of other known passwords to increase length, but I forgot in which order the blocks were used and if some blocks weren't used at all.



      Example "blocks" separated with space: dog cat bird xyz cow1 lion8



      What I would like to do is create a wordlist containing each possible combination of these blocks. E.g



      dog
      cat
      dogcat
      catdog
      bird
      dogbird
      catbird
      birdcat
      birddog
      dogcatbird
      catdogbird
      xyz
      dogcatbirdxyz
      cow1
      xyzcow1dogcat
      xyzcow1dogcatbird
      catdogbirdxyzcow8
      lion8
      catdogbirdxyzcow1lion8
      lion8catdogbirdxyzcow1
      dogcatbirdxyzcow1lion8
      cow1birddogcatxyzlion8
      cow1lion8birddogcatxyz
      ...


      So far I've tried to utilize a tool called crunch: http://www.irongeek.com/i.php?page=backtrack-r1-man-pages/crunch



      But the challenge seems to be how one should generate combinations of shorter combinations, not including all known blocks, example: dogcat only includes 2 blocks.



      Perhaps someone know crunch better than me, or if I should use another tool or combination of tools?









      share|improve this question










      share|improve this question




      share|improve this question









      asked Apr 19 at 6:36









      NiklasJ

      12815




      12815




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          With Python,



          #! /usr/bin/env python3
          import sys
          from itertools import chain, permutations
          # from the docs https://docs.python.org/3/library/itertools.html#itertools-recipes
          # modified for permutations instead of combinations


          def powerset_perm(iterable):
          s = list(iterable)
          return chain.from_iterable(permutations(s, r) for r in range(1, len(s) + 1))


          for w in powerset_perm(sys.argv[1:]):
          print("".join(w))


          Example:



          ~ ./foo.py foo フー bar1™
          foo
          フー
          bar1™
          fooフー
          foobar1™
          フーfoo
          フーbar1™
          bar1™foo
          bar1™フー
          fooフーbar1™
          foobar1™フー
          フーfoobar1™
          フーbar1™foo
          bar1™fooフー
          bar1™フーfoo





          share|improve this answer























          • Awesome! This looks very promising. I will try this out when I get the chance, I'll follow up afterwards. Is there any limit on what characters that are supported? E.g special characters, numbers etc?
            – NiklasJ
            Apr 19 at 7:06










          • @NiklasJ It's Python 3, so it should handle all valid Unicode characters I think.
            – muru
            Apr 19 at 7:08










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f438655%2fcrunch-wordlist-generation-with-all-combinations%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          With Python,



          #! /usr/bin/env python3
          import sys
          from itertools import chain, permutations
          # from the docs https://docs.python.org/3/library/itertools.html#itertools-recipes
          # modified for permutations instead of combinations


          def powerset_perm(iterable):
          s = list(iterable)
          return chain.from_iterable(permutations(s, r) for r in range(1, len(s) + 1))


          for w in powerset_perm(sys.argv[1:]):
          print("".join(w))


          Example:



          ~ ./foo.py foo フー bar1™
          foo
          フー
          bar1™
          fooフー
          foobar1™
          フーfoo
          フーbar1™
          bar1™foo
          bar1™フー
          fooフーbar1™
          foobar1™フー
          フーfoobar1™
          フーbar1™foo
          bar1™fooフー
          bar1™フーfoo





          share|improve this answer























          • Awesome! This looks very promising. I will try this out when I get the chance, I'll follow up afterwards. Is there any limit on what characters that are supported? E.g special characters, numbers etc?
            – NiklasJ
            Apr 19 at 7:06










          • @NiklasJ It's Python 3, so it should handle all valid Unicode characters I think.
            – muru
            Apr 19 at 7:08














          up vote
          1
          down vote



          accepted










          With Python,



          #! /usr/bin/env python3
          import sys
          from itertools import chain, permutations
          # from the docs https://docs.python.org/3/library/itertools.html#itertools-recipes
          # modified for permutations instead of combinations


          def powerset_perm(iterable):
          s = list(iterable)
          return chain.from_iterable(permutations(s, r) for r in range(1, len(s) + 1))


          for w in powerset_perm(sys.argv[1:]):
          print("".join(w))


          Example:



          ~ ./foo.py foo フー bar1™
          foo
          フー
          bar1™
          fooフー
          foobar1™
          フーfoo
          フーbar1™
          bar1™foo
          bar1™フー
          fooフーbar1™
          foobar1™フー
          フーfoobar1™
          フーbar1™foo
          bar1™fooフー
          bar1™フーfoo





          share|improve this answer























          • Awesome! This looks very promising. I will try this out when I get the chance, I'll follow up afterwards. Is there any limit on what characters that are supported? E.g special characters, numbers etc?
            – NiklasJ
            Apr 19 at 7:06










          • @NiklasJ It's Python 3, so it should handle all valid Unicode characters I think.
            – muru
            Apr 19 at 7:08












          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          With Python,



          #! /usr/bin/env python3
          import sys
          from itertools import chain, permutations
          # from the docs https://docs.python.org/3/library/itertools.html#itertools-recipes
          # modified for permutations instead of combinations


          def powerset_perm(iterable):
          s = list(iterable)
          return chain.from_iterable(permutations(s, r) for r in range(1, len(s) + 1))


          for w in powerset_perm(sys.argv[1:]):
          print("".join(w))


          Example:



          ~ ./foo.py foo フー bar1™
          foo
          フー
          bar1™
          fooフー
          foobar1™
          フーfoo
          フーbar1™
          bar1™foo
          bar1™フー
          fooフーbar1™
          foobar1™フー
          フーfoobar1™
          フーbar1™foo
          bar1™fooフー
          bar1™フーfoo





          share|improve this answer















          With Python,



          #! /usr/bin/env python3
          import sys
          from itertools import chain, permutations
          # from the docs https://docs.python.org/3/library/itertools.html#itertools-recipes
          # modified for permutations instead of combinations


          def powerset_perm(iterable):
          s = list(iterable)
          return chain.from_iterable(permutations(s, r) for r in range(1, len(s) + 1))


          for w in powerset_perm(sys.argv[1:]):
          print("".join(w))


          Example:



          ~ ./foo.py foo フー bar1™
          foo
          フー
          bar1™
          fooフー
          foobar1™
          フーfoo
          フーbar1™
          bar1™foo
          bar1™フー
          fooフーbar1™
          foobar1™フー
          フーfoobar1™
          フーbar1™foo
          bar1™fooフー
          bar1™フーfoo






          share|improve this answer















          share|improve this answer



          share|improve this answer








          edited Apr 19 at 7:10


























          answered Apr 19 at 6:58









          muru

          33.3k576140




          33.3k576140











          • Awesome! This looks very promising. I will try this out when I get the chance, I'll follow up afterwards. Is there any limit on what characters that are supported? E.g special characters, numbers etc?
            – NiklasJ
            Apr 19 at 7:06










          • @NiklasJ It's Python 3, so it should handle all valid Unicode characters I think.
            – muru
            Apr 19 at 7:08
















          • Awesome! This looks very promising. I will try this out when I get the chance, I'll follow up afterwards. Is there any limit on what characters that are supported? E.g special characters, numbers etc?
            – NiklasJ
            Apr 19 at 7:06










          • @NiklasJ It's Python 3, so it should handle all valid Unicode characters I think.
            – muru
            Apr 19 at 7:08















          Awesome! This looks very promising. I will try this out when I get the chance, I'll follow up afterwards. Is there any limit on what characters that are supported? E.g special characters, numbers etc?
          – NiklasJ
          Apr 19 at 7:06




          Awesome! This looks very promising. I will try this out when I get the chance, I'll follow up afterwards. Is there any limit on what characters that are supported? E.g special characters, numbers etc?
          – NiklasJ
          Apr 19 at 7:06












          @NiklasJ It's Python 3, so it should handle all valid Unicode characters I think.
          – muru
          Apr 19 at 7:08




          @NiklasJ It's Python 3, so it should handle all valid Unicode characters I think.
          – muru
          Apr 19 at 7:08












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f438655%2fcrunch-wordlist-generation-with-all-combinations%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay