Skip to content

Instantly share code, notes, and snippets.

View hirman74's full-sized avatar

hirman hirman74

  • Singapore
  • 16:39 (UTC +08:00)
View GitHub Profile
@hirman74
hirman74 / ping.py
Last active May 7, 2023 08:03 — forked from Symeon-Carle/ping.py
async ping for python 3 on Windows
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
@hirman74
hirman74 / CiscoKeyGen.py
Last active September 29, 2023 10:52 — forked from paalfe/CiscoKeyGen.py
This is a fork of Cisco IOU License Generator to run on Mac OSX. 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() # for linux
hostid=str(os.popen('hostid')).split()[-1][2:-1] # for Mac OSX 10.9.3 Python 2.7.5