>>12326554Depends on entering 12345 submitting 1234, 2345 and 12345 all as attempts which would not be how they normally work.
What if you tried 1234 then wanted to try 5678? It thinks you've tried 1234567 (and 1234, 2345...) then started a new attempt with the 8?
But if it just listens to input and succeeds when the last n digits match the code you only have to do all the 7 digit combos which can be done in a bit less than 7x10^7 keypresses.