title: Wordlist Generator in Bash
body: <p>I am trying to create a wordlist consisting of the same password followed by a 4-digit numeric pin. The pin goes through every possible combination of 10,000 variations. The desired output should be like this:</p>
  
  <pre><code> UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ 1111
   UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ 1112
   UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ 1113
  </code></pre>
  
  <p>and so on.</p>
  
  <p>I created a shell script that almost get this, but awk doesn't seem to like having a variable passed through it, and seems to just print out every combination when called. This is the shell script:</p>
  
  <pre><code>#!/bin/bash
  # Creates 10,000 lines of the bandit24pass and every possible combination
  # Of 4 digits pin
  
  USER="UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ"
  
  PASS=$( echo {1,2,3,4,5,6,7,8,9}{1,2,3,4,5,6,7,8,9}{1,2,3,4,5,6,7,8,9}{1,2,3,4,5,6,7,8,9} | awk '{print $I}' )
  
  for I in {1..10000};
  do
          echo "$USER $PASS"
  done
  </code></pre>
  
  <p>I though <code>$I</code> would translate to <code>$1</code> for the first run of the loop, and increment upwards through each iteration. Any help would be greatly appreciated.</p>