Unfortunately, due to the nature of the MD5 one-way hash, a type 5 password to reveal the original password. The security of type 5 passwords relies on this one-way hashing, making it computationally infeasible to retrieve the original password from the hash.
You can also generate a Type 5 hash offline using OpenSSL or Python: cisco secret 5 password decrypt
He isolated the hash string: $1$XYZ$AhJyC9dKvBmXqL4tZ.w.U/. Unfortunately, due to the nature of the MD5
Changing the (usually to 0x2142 ) to ignore the startup configuration. cisco secret 5 password decrypt