Cisco IOS Verify File

Cisco IOS Verify File

Hi,

with NCM i was able to upload Cisco IOS Images to Switches and Routers. I am now looking for a solution on how to verfiy the uploaded file against a MD5 hash.

I have tried to accomplish this via the "advanced script" configlet, but i am failing on the first line already. Does someone has a hint for me on how to write a configlet? Is it even possible, because of all the "dynamic" dots?

The variables should contain the file name and the MD5 hash. Script is successful when the computed hash is the same, otherwise fail.

Sample output of one of my switches:

Switch#verify /md5 flash:c2960x-universalk9-mz.152-7.E3.bin
..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................Done!
verify /md5 (flash:c2960x-universalk9-mz.152-7.E3.bin) = f148fc860a1d4d08532bc616724e632d


Switch#