Generating Cisco Iou License Key

Page 1 of 1
[ 4 posts ]

Iougen is a python module/cli script that can be ran to generate IOU license keys. IOU stands for IOS on Unix and is a full IOS environment that can run as a Unix process. IOU requires a valid key to operate and that is where this module comes in. The code used for generating the. Today we will discuss and run the cisco IOU license using the GNS3 earlier version of Gns3 1.5.2 any how Gns3 is the very advanced tool for network testers. As per my experience i am very struggled to run the IOU for the first time. Firstly i run only IOS in Gns3 at local computer, but switching purpose i am very confused to run switches in. Nov 24, 2016 World's Most Famous Hacker Kevin Mitnick & KnowBe4's Stu Sjouwerman Opening Keynote - Duration: 36:30. Cyber Investing Summit Recommended for you.

Print viewPrevious topic Next topic

Cisco Iou License Generator

Generating cisco iou license key free
AuthorMessage
Post subject: GNS3 License File - how to handle the python script? -PLEASE

Joined: Fri Apr 04, 2014 5:42 pm
Posts: 11
Hello,
because GNS3 company dont help with anything, I hope that the nice community here help me before I go nuts :-)
I have this python script:
#! /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 = 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='x4Bx58x21x81x56x7Bx0DxF3x21x43x9Bx7ExACx1DxE6x8A'
iouPad2='x80' + 39*'0'
md5input=iouPad1 + iouPad2 + struct.pack('!i', 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/hostsn'
Because in IOU VM there the python dont work I loaded it into Python for Windows V 2.7.7 into IDLE (GUI).
When I start this scriptthen with RUN I get the following error:
Python 2.7.7 (default, Jun 1 2014, 14:17:13) [MSC v.1500 32 bit (Intel)] on win32
Type 'copyright', 'credits' or 'license()' for more information.
>>> RESTART
>>>
*********************************************************************
Cisco IOU License Generator - Kal 2011, python port of 2006 C version
Traceback (most recent call last):
File 'C:Phyton-TestCiscoIOUKeygen.py', line 11, in <module>
ioukey=int(hostid,16)
ValueError: invalid literal for int() with base 16: '
>>>
Do I have to fill in the hostname or host-id in that script?
How can I make this work?
I am not a Unix-Crack (sorry for being alive :-).
So if you have any idea that would be great.
Its a shame Cisco makes it more and more difficult to do good training. Companies like for example F5 made a VLAB for you and want you to use it.
Even as a Cisco Partner you can only use this predefined not changable labs.
thanx a lot,
cheers,

Last edited by aprisma on Wed Jun 04, 2014 7:59 pm, edited 1 time in total.

Top
Post subject: Re: GNS3 License File - how to handle the python script? -PL

Joined: Sun Sep 16, 2012 9:55 pm
Posts: 541
Location: England
The script needs to be run on linux... on the (virtual) machine where IOU will run.
If you use the script from this post: post28850.html#p28850
It will work in the gns3-iouvm, by running
python3 CiscoIOUKeygen.py

_________________
Daniel
Forum Moderator & Debian Package Maintainer for GNS3, Dynamips & VPCS.
Standalone DEB Packages are available from http://gns3.serverb.co.uk - To be updated!


Top
Post subject: Re: GNS3 License File - how to handle the python script? -PL

Joined: Fri Apr 04, 2014 5:42 pm
Posts: 11
Thanx a lot and thanx a lot to the guy who converted it for python3
You prevent me from going suicide!!!!!


Top
Post subject: Re: GNS3 License File - how to handle the python script? -PL

Joined: Sun Sep 16, 2012 9:55 pm
Posts: 541
Location: England
Thanx a lot

Not a problem...
and thanx a lot to the guy who converted it for python3

That would be me as well.... ;)
You prevent me from going suicide!!!!!

I'm glad about that... suicide over GNS3 really isn't something we want!


_________________
Daniel
Forum Moderator & Debian Package Maintainer for GNS3, Dynamips & VPCS.
Standalone DEB Packages are available from http://gns3.serverb.co.uk - To be updated!


Top

Cisco Iou Download

Page 1 of 1
[ 4 posts ]

Generating Cisco Iou License Key West

  1. print '*********************************************************************'
  2. print 'Cisco IOU License Generator - Kal 2011, python port of 2006 C version'
  3. import os
  4. import hashlib
  5. # get the host id and host name to calculate the hostkey
  6. hostname = socket.gethostname()
  7. for x in hostname:
  8. print 'hostid=' + hostid +', hostname='+ hostname + ', ioukey=' + hex(ioukey)[2:]
  9. iouPad1='x4Bx58x21x81x56x7Bx0DxF3x21x43x9Bx7ExACx1DxE6x8A'
  10. md5input=iouPad1 + iouPad2 + struct.pack('!I', ioukey) + iouPad1
  11. print 'nAdd the following text to ~/.iourc:'
  12. print '[license]n' + hostname + ' = ' + iouLicense + ';n'
  13. print 'You can disable the phone home feature with something like:'
  14. print ' echo '127.0.0.127 xml.cisco.com' >> /etc/hostsn'