title: Brute forcing crypt() if salt and password hash are known?
body: <p>Playing through some wargames and was curious if this was possible (they probably want you to solve it in a different way, but still). </p>
  
  <p>There's a <code>.c</code> file with a function that has code that looks something like this:</p>
  
  <pre><code>char buffer[20];
  scanf("%s", buffer);
  char* hash = crypt(buffer, "$6$")
  char* password = "$6$123456abcdef" #long string 
  if (strcmp(password, hash) == 0) supersecretfunction();
  </code></pre>
  
  <p>Is there a way to brute force this considering the salt and hashed password are known already?</p>