Since algorithm is well known, run algorithm backwards on section to recover key:
a="204D4F08180416130A0D052B2A2529323423120617020057585952550F021917585956525354550A5A07065956051207055A0A070E"
ciscopwkey=""
for i in range(0,len(a),2):
ciscopwkey+=(chr(int(a[i] + a[i+1],16) ^ ord("a")))
print ciscopwkey
Which Syntax?:
cisco IOS password 7 decode
Expected behavior and actual behavior:
password decode algorithm is incomplete
Steps to reproduce the problem:
try to decode a longer password with a high salt, or make it > ~20 char
Fix:
Run the following command on a switch:
(80 "a") Look at result in config:
This password has a salt of 8 and starts repeating at the 106(53) char (broke up hash for clarity):
Since algorithm is well known, run algorithm backwards on section to recover key:
result:
since salt was 8, the last 8 char get moved to the front:
use this in the decode algorithm:
results(these were entered on a switch):
returns:
returns:
Code is all yours, don't even need attribution