-
-
Save joaormatos/2b53242ca285a85112c6cfea7dbc52fc to your computer and use it in GitHub Desktop.
Revisions
-
ashevchuk revised this gist
Feb 11, 2020 . 1 changed file with 11 additions and 11 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 @@ -18,8 +18,8 @@ TOKEN=$(curl "http://${IP}/rpc/getsessiontoken.asp" -H "Cookie: SessionCookie=${ cat <<EOF <?xml version="1.0" encoding="UTF-8"?> <jnlp spec="1.0+" codebase="https://${IP}/Java"> <information> <title>JViewer</title> <vendor>American Megatrends, Inc.</vendor> <description kind="one-line">JViewer Console Redirection Application</description> @@ -29,9 +29,9 @@ cat <<EOF It also enables the user to redirect his local keyboard, mouse for managing the server remotely. </description> </information> <security> <all-permissions/> </security> <resources> <j2se version="1.5+"/> <jar href="release/JViewer.jar"/> @@ -52,14 +52,14 @@ cat <<EOF <j2se version="1.5+"/> <nativelib href="release/Linux_x86_32.jar"/> </resources> <resources os="Linux" arch="x86_64"> <j2se version="1.5+"/> <nativelib href="release/Linux_x86_64.jar"/> </resources> <resources os="Linux" arch="amd64"> <j2se version="1.5+"/> <nativelib href="release/Linux_x86_64.jar"/> </resources> <application-desc> <argument>${IP}</argument> <argument>7578</argument> -
ashevchuk revised this gist
Feb 11, 2020 . 1 changed file with 53 additions and 48 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 @@ -1,4 +1,9 @@ #!/bin/sh if [ "$#" -ne 3 ]; then echo "Usage: $0 [ip address] [user name] [password]" exit 1 fi IP=$1 IPMI_USER=$2 @@ -14,53 +19,53 @@ cat <<EOF <?xml version="1.0" encoding="UTF-8"?> <jnlp spec="1.0+" codebase="https://${IP}/Java" > <information> <title>JViewer</title> <vendor>American Megatrends, Inc.</vendor> <description kind="one-line">JViewer Console Redirection Application</description> <description kind="tooltip">JViewer Console Redirection Application</description> <description kind="short"> JViewer enables a user to view the video display of managed server via KVM. It also enables the user to redirect his local keyboard, mouse for managing the server remotely. </description> </information> <security> <all-permissions/> </security> <resources> <j2se version="1.5+"/> <jar href="release/JViewer.jar"/> </resources> <resources os="Windows" arch="amd64"> <j2se version="1.5+"/> <nativelib href="release/Win64.jar"/> </resources> <resources os="Windows" arch="x86"> <j2se version="1.5+"/> <nativelib href="release/Win32.jar"/> </resources> <resources os="Linux" arch="x86"> <j2se version="1.5+"/> <nativelib href="release/Linux_x86_32.jar"/> </resources> <resources os="Linux" arch="i386"> <j2se version="1.5+"/> <nativelib href="release/Linux_x86_32.jar"/> </resources> <resources os="Linux" arch="x86_64"> <j2se version="1.5+"/> <nativelib href="release/Linux_x86_64.jar"/> </resources> <resources os="Linux" arch="amd64"> <j2se version="1.5+"/> <nativelib href="release/Linux_x86_64.jar"/> </resources> <application-desc> <argument>${IP}</argument> <argument>7578</argument> <argument>${TOKEN}</argument> <argument>${COOKIE}</argument> </application-desc> </jnlp> EOF ) > $OUTFILE -
ashevchuk revised this gist
Jan 28, 2019 . No changes.There are no files selected for viewing
-
ashevchuk created this gist
Jan 28, 2019 .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,68 @@ #!/bin/bash IP=$1 IPMI_USER=$2 IPMI_PASS=$3 OUTFILE=/tmp/${IP}_jviewer.jnlp COOKIE=$(curl "http://${IP}/rpc/WEBSES/create.asp" --silent --raw --data "WEBVAR_USERNAME=${IPMI_USER}&WEBVAR_PASSWORD=${IPMI_PASS}" -o - | perl -ne "m/\'SESSION\_COOKIE\'\s\:\s\'(.*?)\'/sg ? print \$1 : ();") TOKEN=$(curl "http://${IP}/rpc/getsessiontoken.asp" -H "Cookie: SessionCookie=${COOKIE}" --silent --raw -o - | perl -ne "m/\'STOKEN\'\s\:\s\'(.*?)\'/sg ? print \$1 : ();") ( cat <<EOF <?xml version="1.0" encoding="UTF-8"?> <jnlp spec="1.0+" codebase="https://${IP}/Java" > <information> <title>JViewer</title> <vendor>American Megatrends, Inc.</vendor> <description kind="one-line">JViewer Console Redirection Application</description> <description kind="tooltip">JViewer Console Redirection Application</description> <description kind="short"> JViewer enables a user to view the video display of managed server via KVM. It also enables the user to redirect his local keyboard, mouse for managing the server remotely. </description> </information> <security> <all-permissions/> </security> <resources> <j2se version="1.5+"/> <jar href="release/JViewer.jar"/> </resources> <resources os="Windows" arch="amd64"> <j2se version="1.5+"/> <nativelib href="release/Win64.jar"/> </resources> <resources os="Windows" arch="x86"> <j2se version="1.5+"/> <nativelib href="release/Win32.jar"/> </resources> <resources os="Linux" arch="x86"> <j2se version="1.5+"/> <nativelib href="release/Linux_x86_32.jar"/> </resources> <resources os="Linux" arch="i386"> <j2se version="1.5+"/> <nativelib href="release/Linux_x86_32.jar"/> </resources> <resources os="Linux" arch="x86_64"> <j2se version="1.5+"/> <nativelib href="release/Linux_x86_64.jar"/> </resources> <resources os="Linux" arch="amd64"> <j2se version="1.5+"/> <nativelib href="release/Linux_x86_64.jar"/> </resources> <application-desc> <argument>${IP}</argument> <argument>7578</argument> <argument>${TOKEN}</argument> <argument>${COOKIE}</argument> </application-desc> </jnlp> EOF ) > $OUTFILE javaws -nosecurity -jnlp $OUTFILE >/dev/null & disown && sleep 1 && rm -f $OUTFILE