If you have a locked device it is rather simple to write an unlock script. You don't need all the flash functions and XML memory mapping because you don't need to use the flash (-F) or GDB (-G) module. Just write your script and us the "main" script function as your entry.
./EBlink -I stlink -S myUnlock
./EBlink -I stlink -S myUnlock