- 积分
- 725
- 鸿鹄币
- 个
- 好评度
- 点
- 精华
- 注册时间
- 2013-3-25
- 最后登录
- 1970-1-1
- 阅读权限
- 40
- 听众
- 收听
中级工程师
|
楼主 |
发表于 2014-6-6 10:23:21
|
显示全部楼层
解决了。
方法是重新产生一个license
由于网上都没有找到有 iou-web的crack.py ,我这里帖一个源码出来吧,- #/usr/bin/python #这句是要注释掉的
- print "*********************************************************************"
- print "Cisco IOU License Generator - Kal 2011, python port of 2006 C version"
- import os
- import socket
- import hashlib
- import struct
- # get the host id and host name to calculate the hostkey
- hostid=os.popen("hostid").read().strip()
- #hostname = "iou"
- hostname = socket.gethostname()
- ioukey=int(hostid,16)
- for x in hostname:
- ioukey = ioukey + ord(x)
- print "hostid=" + hostid +", hostname="+ hostname + ", ioukey=" + hex(ioukey)[2:]
- # create the license using md5sum
- iouPad1='\x4B\x58\x21\x81\x56\x7B\x0D\xF3\x21\x43\x9B\x7E\xAC\x1D\xE6\x8A'
- iouPad2='\x80' + 39*'\0'
- #md5input=iouPad1 + iouPad2 + struct.pack('!i', ioukey) + iouPad1
- md5input=iouPad1 + iouPad2 + struct.pack('!L', ioukey) + iouPad1
- iouLicense=hashlib.md5(md5input).hexdigest()[:16]
- print "\nAdd the following text to ~/.iourc:"
- print "[license]\n" + hostname + " = " + iouLicense + ";\n"
- print "You can disable the phone home feature with something like:"
- print " echo '127.0.0.127 xml.cisco.com' >> /etc/hosts\n"
复制代码 把上面的代码保存在crack.py
然后命令 python crack.py
就会跟据你的hostid hostname和ioukey的值重新算出license
另外,由于我之前直接用虚拟机的iou,然后填的license是
[license] 
iou.example.com = 145ef75ad4ea0ebd;
这个,但是依旧是不行的,所以我新建了一个
/etc/hostid文件
内容随意
这里用命令 hostid查看到的hotid值不一样了,然后就可以生成一个新的license了
希望以上方法可以帮助到更多的网友。 |
板凳
2014-6-6 10:23:21
回复(0)
收起回复
|