title: How to generate string for bruteforce attack using batchfile
body: <p>I have some code which can crack numeric rar file passwords. The code just increments the value of a variable (starting from 0) and I use that to check against the password to unrar using unrar command.
  But I want to generate strings for brute force attacks.</p>
  
  <pre><code>SET PASSWORD=0
  
  :START
  SET /A PASSWORD=%PASSWORD%+1  
  UNRAR E -INUL -P%PASSWORD% "%PATH%\%NAME%" "%DESTINATION%"
  IF /I %ERRORLEVEL% EQU 0 GOTO CLOSE
  GOTO START
  
  :CLOSE
  echo Password Cracked...
  echo Password is %PASSWORD%
  </code></pre>
  
  <p>Here </p>
  
  <ul>
  <li><blockquote>
    <p>%PATH% is path  where rar file is located</p>
  </blockquote></li>
  <li><blockquote>
    <p>%NAME% is name of rar file</p>
  </blockquote></li>
  <li><blockquote>
    <p>%DESTINATION% is place where file is stored after UNRAR,
    In my code DESTINATION is "%TEMP%\%RANDOM%"</p>
  </blockquote></li>
  </ul>
  
  <p>By applying this I am able to get the password, but it is not useful for strings which contain alpha characters.</p>
  
  <p>How do I generate strings starting from "a", so I am able to crack alphabetic passwords too?</p>