Rating:

1. Read the Python code.
2. See parts of key in variables key_part*.
3. Find the function check_key().
4. See that length of entered key should be the same to key_full_template_trial, which consists of variables key_part*.
5. Make a dummy key "VishwaCTF{m4k3_it_possibl3_xxxxxxxx}".
6. In check_key() function in "else" block see the verification of the entered key:
"if key[i] != hashlib.sha256(username_trial).hexdigest()[4]:"
7. Insert "print" in every "if" block to see what is expected:
print(f"invalid 4, {key[i]} {hashlib.sha256(username_trial).hexdigest()[4]}")
Here we will get the fourth "x" in our dummy key.
8. After each "if" change the appropriate "x" to the expected symbol.

Flag: VishwaCTF{m4k3_it_possibl3_b7cdc517}.