Last active
March 13, 2022 04:06
-
-
Save DavidWittman/10748460 to your computer and use it in GitHub Desktop.
Revisions
-
DavidWittman revised this gist
Sep 11, 2014 . 1 changed file with 6 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -16,10 +16,13 @@ is_mac() { [[ "$(uname)" == "Darwin" ]] } # Some versions of the SuperMicro webserver return a 500 w/o the referer set, # so we just use http://localhost here. if is_mac; then curl -s "${URL}" -H 'Referer: http://localhost' -H "Cookie: ${SESSION_ID}" else # The sed is to fix the "no iKVM64 in java.library.path bug on Linux # Source: http://blog.coffeebeans.at/?p=83 curl -s "${URL}" -H 'Referer: http://localhost' -H "Cookie: ${SESSION_ID}" | sed 's/Linux" arch="a.*/&\n <property name="jnlp.packEnabled" value="true"\/>\n <property name="jnlp.versionEnabled" value="true"\/>/' fi -
DavidWittman revised this gist
Sep 4, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ set -x HOST="$1" IPMI_USER=${IPMI_USER:-ADMIN} IPMI_PASS=${IPMI_PASS:-ADMIN} SESSION_ID=$(curl -s "http://${HOST}/cgi/login.cgi" --data "name=${IPMI_USER}&pwd=${IPMI_PASS}" -i | awk '/SID=[^;]/ { print $2 }') URL="http://${HOST}/cgi/url_redirect.cgi?url_name=ikvm&url_type=jwsk" -
DavidWittman created this gist
Apr 15, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ #!/usr/bin/env bash # Retrieves the plaintext JNLP from a SuperMicro IPMI webserver # Usage: supermicro-java-console.sh <hostname> # supermicro-java-console.sh 10.1.2.34 > login.jnlp set -x HOST="$1" IPMI_USER=${IPMI_USER:-ADMIN} IPMI_PASS=${IPMI_USER:-ADMIN} SESSION_ID=$(curl -s "http://${HOST}/cgi/login.cgi" --data "name=${IPMI_USER}&pwd=${IPMI_PASS}" -i | awk '/SID=[^;]/ { print $2 }') URL="http://${HOST}/cgi/url_redirect.cgi?url_name=ikvm&url_type=jwsk" is_mac() { [[ "$(uname)" == "Darwin" ]] } if is_mac; then curl -s "${URL}" -H "Cookie: ${SESSION_ID}" else # The sed is to fix the "no iKVM64 in java.library.path bug on Linux # Source: http://blog.coffeebeans.at/?p=83 curl -s "${URL}" -H "Cookie: ${SESSION_ID}" | sed 's/Linux" arch="a.*/&\n <property name="jnlp.packEnabled" value="true"\/>\n <property name="jnlp.versionEnabled" value="true"\/>/' fi