Created
January 7, 2013 22:15
-
-
Save pcon/4479036 to your computer and use it in GitHub Desktop.
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 characters
#!/bin/bash | |
nick="NICKGOESHERE" | |
participant_password="PASSWORD" | |
leader_password="PASSWORD" | |
sid="SID" | |
output="/tmp/meeting.jnlp" | |
launch_on_download="true" | |
############################################################################# | |
#### DO NOT EDIT PAST THIS POINT #### | |
############################################################################# | |
usage() { | |
echo "usage: $0 [-n nick] [-p password] [-s sid] [-f file] [-l] [-j]" | |
echo -e "\t-n The username" | |
echo -e "\t-p The elluminate 'password'" | |
echo -e "\t-s The elluminate 'sid'" | |
echo -e "\t-l Use the leader password or the provided password is the leader password" | |
echo -e "\t-f The output file [default ./meeting.jnlp]" | |
echo -e "\t-j Launch the meeting file" | |
} | |
password="" | |
leader="false" | |
while getopts "hn:p:s:f:l" opt | |
do | |
case $opt in | |
n) | |
echo "setting nick $OPTARG" | |
nick=$OPTARG | |
;; | |
p) | |
echo "setting password $OPTARG" | |
password=$OPTARG | |
;; | |
l) | |
echo "using leader password" | |
leader="true" | |
;; | |
s) | |
echo "setting sid $OPTARG" | |
sid=$OPTARG | |
;; | |
f) | |
echo "setting output $OPTARG" | |
output=$OPTARG | |
;; | |
j) | |
launch_on_download="true" | |
;; | |
h) | |
usage | |
exit | |
;; | |
?) | |
usage | |
exit | |
;; | |
esac | |
done | |
if [ ".$password" == "." ] | |
then | |
if [ ".$leader" == ".true" ] | |
then | |
password=$leader_password | |
else | |
password=$participant_password | |
fi | |
fi | |
if [ ".$output" == "." ] | |
then | |
output_file="meeting.jnlp" | |
else | |
output_file=$output | |
fi | |
post_data="" | |
url="" | |
curl_type="" | |
referer="" | |
if [ ".$leader" == ".true" ] | |
then | |
#Leader needs to be a GET not a POST. Plus some different headers | |
url="https://sas.elluminate.com/site/external/launch/meeting.jnlp?sid=$sid&miuid=$password" | |
curl_type="GET" | |
referer="https://sas.elluminate.com/site/external/jwsdetect/meeting.jnlp?sid=$sid&miuid=$password" | |
curl -s --insecure \ | |
-H 'Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \ | |
-H 'Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3' \ | |
-H 'Accept-Encoding:gzip,deflate,sdch' \ | |
-H 'Accept-Language:en-US,en;q=0.8' \ | |
-H 'Connection:keep-alive' \ | |
-H 'DNT:1' \ | |
-H 'Host:sas.elluminate.com' \ | |
-H "Referer:$referer" \ | |
-H 'User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4' \ | |
-X $curl_type \ | |
$url > $output_file | |
else | |
post_data="username=$nick&sid=$sid&password=$password&submit.x=0&submit.y=0" | |
url="https://sas.elluminate.com/site/external/launch/meeting.jnlp" | |
curl_type="POST" | |
referer="https://sas.elluminate.com/site/external/launch/meeting.jnlp?sid=$sid&password=$password" | |
curl -s --insecure \ | |
-H 'Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \ | |
-H 'Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3' \ | |
-H 'Accept-Encoding:gzip,deflate,sdch' \ | |
-H 'Accept-Language:en-US,en;q=0.8' \ | |
-H 'Cache-Control:max-age=0' \ | |
-H 'Connection:keep-alive' \ | |
-H 'Content-Type:application/x-www-form-urlencoded' \ | |
-H 'DNT:1' \ | |
-H 'Host:sas.elluminate.com' \ | |
-H 'Origin:https://sas.elluminate.com' \ | |
-H "Referer:$referer" \ | |
-H 'User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4' \ | |
-d "$post_data" \ | |
-X $curl_type \ | |
$url > $output_file | |
fi | |
if [ ".$launch_on_download" == ".true" ] | |
then | |
javaws $output_file | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment