Skip to content

Instantly share code, notes, and snippets.

View FredyRosero's full-sized avatar
💭
I may be slow to respond.

Fredy Rosero FredyRosero

💭
I may be slow to respond.
View GitHub Profile
[
{
"name": "Yellow",
"munsell_hue": "Y",
"hex": "#FFFF00",
"children": [
{
"name": "Cadmium Yellow Light",
"company": "Liquitex",
@FredyRosero
FredyRosero / CiscoKeyGen.py
Created October 7, 2022 18:18 — forked from congto/CiscoKeyGen.py
Cisco IOU License Generator. Originally found at http://www.routingloops.co.uk/cisco/gns3-v1-1-install-on-ubuntu-14-04-lts/, I have done a few changes to it. Make the file executable with " chmod +x CiscoKeyGen.py " and execute it " ./CiscoKeyGen.py ".
#! /usr/bin/python
print "\n*********************************************************************"
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()