This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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() # for linux | |
hostid=str(os.popen('hostid')).split()[-1][2:-1] # for Mac OSX 10.9.3 Python 2.7.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
WaitTimeOut = 600 # -w milliseconds | |
PingProbe = 10 # -n | |
PingSize = 65500 # -l | |
## for Mac 'macosx' | |
## PingSize = 8184 # -s plus 8 bytes of ICMP header | |
ParallelPing = 100 # Concurrent ping stream |