bandit24 brute forcing program I was doing the bandit wargame from overthewire.org and because I am a script kiddie, I googled the answer for level 24.
password=&quot;UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ&quot;
for i in {0000..9999} 
//looping to try any possible pin code
do
echo $password' '$i &gt;&gt; wordlist.txt 
//save password and possible pin code into wordlist 
done

I saw the bash script, and thought, &quot;Well I couldn't have done that because I'm not good at bash.&quot; but then I realized that this problem could be done in other languages.
The challenge is simple.

Pipe the password in from stdin.
Append a space in-between the password and the pin or output it separately
Output all PIN combinations. Make sure that there are 4 digits outputted.
BONUS flush the output after each line. This is done automatically with std::endl.

I went ahead and did it in C++
#include &lt;iostream&gt;
#include &lt;iomanip&gt;
using namespace std;
int main()
{
        string key; //1
        getline(cin, key); //I heard that std::getline is
        //only standard for linux, so for practical
        //purposes use cin.getline(char*,size)
        for(int i = 0; i &lt; 10000; i++){   //3
                cout &lt;&lt; key &lt;&lt; setfill('0') &lt;&lt; ' ' //2
                &lt;&lt; setw(4) &lt;&lt; i &lt;&lt; endl;  //4
        }
        return 0;
}

Obviously it can do better than 301 bytes, but you get the gist.
Also any language is acceptable as long as it can produce the same formatted strings separated by new lines or line breaks.
05AB1E, 9 7 bytes
žh4ã€‚»

Try it online.
Explanation:

žh       # Push builtin string &quot;0123456789&quot;
  4ã     # Get the cartesian product of 4: [&quot;0000&quot;,&quot;0001&quot;,...,&quot;9998&quot;,&quot;9999&quot;]
    €    # Map each string to:
     ‚   #  Pair it with the (implicit) input-string
      »  # Join each inner list by spaces, and then all strings by newlines
         # (after which the result is output implicitly)