Unlocking bootloader online vs offline

To unlock OEM on FP4 you need to enter a verify code.

There are In-Browser generators for verify codes for FP3, see other thread.

However, these generators fail for FP4 with message " IMEI must be 15 characters and serial must be longer than 10 characters.". Indeed, the FP4 serial has only 8 characters.

Could anybody provide a verify code generator for FP4, based on the existing work for FP3?

Update: I adapted the input length check and removed the format check. As a result, the script works, but the generated verify code doesn’t work.