| version 1.25, 2002/06/25 16:55:56 |
version 1.26, 2002/06/25 17:08:19 |
|
|
| # Cookies format: |
# Cookies format: |
| # ^Set-Cookie: SITY=32E0DDB9AF9293E774AA1C0B5BCC0992;path=/$ |
# ^Set-Cookie: SITY=32E0DDB9AF9293E774AA1C0B5BCC0992;path=/$ |
| echo 'Logging in...'; |
echo 'Logging in...'; |
| COOKIE=`GET -e -H "Cookie: SITY=SITY" \ |
COOKIE=`GET -P -e -H "Cookie: SITY=SITY" \ |
| $WWW/u_registrate2.login2?NAME="$NAME"\&PASSWD="$PASS"\&ASERVICE=0\&CMD=%21u_sms.home\&SERVICE=0 \ |
$WWW/u_registrate2.login2?NAME="$NAME"\&PASSWD="$PASS"\&ASERVICE=0\&CMD=%21u_sms.home\&SERVICE=0 \ |
| | awk 'BEGIN { FS="[=;]" } /^Set-Cookie:/ { print $2; }'`; |
| awk 'BEGIN { FS="[=;]" } /^Set-Cookie:/ { print $2; }'`; |
| # | grep '^Set-Cookie' | sed 's/^Set-Cookie: SITY=\([0-9A-F]*\).*/\1/'`; |
# | grep '^Set-Cookie' | sed 's/^Set-Cookie: SITY=\([0-9A-F]*\).*/\1/'`; |
| Line 142 COOKIE=`GET -e -H "Cookie: SITY=SITY" \ |
|
| Line 142 COOKIE=`GET -e -H "Cookie: SITY=SITY" \ |
|
| |
|
| # Checking number of free SMSs {{{ |
# Checking number of free SMSs {{{ |
| echo -n 'Checking number of free SMSs... '; |
echo -n 'Checking number of free SMSs... '; |
| #GET -H "Cookie: SITY=$COOKIE" \ |
#GET -P -H "Cookie: SITY=$COOKIE" \ |
| # $WWW/u_profil.show_stat > $TMP_FILE; |
# $WWW/u_profil.show_stat > $TMP_FILE; |
| #smss_sent=`grep '^<TD>[0-9]\+</TD>$' $TMP_FILE \ |
#smss_sent=`grep '^<TD>[0-9]\+</TD>$' $TMP_FILE \ |
| # | head -n 1 | sed 's/<TD>\([0-9]\+\).*/\1/'`; |
# | head -n 1 | sed 's/<TD>\([0-9]\+\).*/\1/'`; |
| smss_sent=`GET -H "Cookie: SITY=$COOKIE" \ |
smss_sent=`GET -P -H "Cookie: SITY=$COOKIE" \ |
| $WWW/u_profil.show_stat \ |
$WWW/u_profil.show_stat \ |
| | awk '/^<TD>[0-9]+<\/TD>$/ { gsub(/[><]/, " "); print $2; exit; } '`; |
| awk '/^<TD>[0-9]+<\/TD>$/ { gsub(/[><]/, " "); print $2; exit; } '`; |
| |
|
| Line 155 echo "100-$smss_sent" | bc; |
|
| Line 155 echo "100-$smss_sent" | bc; |
|
| |
|
| # Retrieving submit forms... {{{ |
# Retrieving submit forms... {{{ |
| echo 'Retrieving submit forms...'; |
echo 'Retrieving submit forms...'; |
| GET -H "Cookie: SITY=$COOKIE" \ |
GET -P -H "Cookie: SITY=$COOKIE" \ |
| $WWW/\!u_sms.home >$TMP_FILE; |
$WWW/\!u_sms.home >$TMP_FILE; |
| |
|
| #we now extract textarea name, which will be used later |
#we now extract textarea name, which will be used later |
|
|
| |
|
| # Submitting SMS... {{{ |
# Submitting SMS... {{{ |
| echo 'Submitting SMS...'; |
echo 'Submitting SMS...'; |
| smss_left=`GET -H "Cookie: SITY=$COOKIE" \ |
smss_left=`GET -P -H "Cookie: SITY=$COOKIE" \ |
| $WWW/\!u_sms.send_sms?MSG_TEXT="$text"\&SMSMsgLen=480\&SMScount=\&"$textareaname"="$number"\&BT.x=0\&BT.y=0\&DETAIL="$detailvalue" \ |
$WWW/\!u_sms.send_sms?MSG_TEXT="$text"\&SMSMsgLen=480\&SMScount=\&"$textareaname"="$number"\&BT.x=0\&BT.y=0\&DETAIL="$detailvalue" \ |
| | grep "Tento mesiac" \ |
| grep "Tento mesiac" \ |
| | sed 's/.*va \([0-9]*\) spr.*/\1/'` ; |
| sed 's/.*va \([0-9]*\) spr.*/\1/'` ; |