Skip to content

Instantly share code, notes, and snippets.

# Function to calculate the WPS checksum of a 7 digit number
def wps_checksum(pin):
accum = 0
while pin>0:
accum += 3 * (pin % 10);
pin /= 10;
accum += pin % 10;
pin /= 10;
return (10 - accum % 10) % 10
# Get the actual url from http://www.oracle.com/technetwork/java/index.html
# And replace the download.oracle.com portion from the below string.
# http://stackoverflow.com/questions/10268583
# sudo wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz
#JDK8u5:
sudo wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-apidocs.zip"
sudo wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-windows-x64.exe"
sudo wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-windows-i586.exe"
#!/usr/bin/expect -f
#
# VIPAccess.exp
#
# Command-line emulation of Symantec's VIP Access software token.
# Usage:
# ./VIPAccess.exp [v]
# If the "v" argument (or any argument) is specified, verbose output
# will be produced on stderr. The OTP value will be output on stdout.
#