Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, October 15, 2026

Diff for scripts/shell/sms/sity.sk/sms.sh between version 1.4 and 1.5

version 1.4, 2002/06/13 09:21:10 version 1.5, 2002/06/17 11:08:01
Line 17  if [ $# -lt 1 ]; then
Line 17  if [ $# -lt 1 ]; then
         exit 1;          exit 1;
 fi  fi
   
 NAME='Platon'  NAME=`grep '^login=' ~/.sms.sh.conf | sed 's/^login=\(.*\)$/\1/'`
 PASS='45F4BBE1'  PASS=`grep '^password=' ~/.sms.sh.conf | sed 's/^password=\(.*\)$/\1/'`
   
 echo ' Enter your message (only one line, max 420 chars):'  if [ -z $NAME ]; then
           echo 'Enter username:'
           IF= read NAME
   fi
   
   if [ -z $PASS ]; then
           echo 'Enter password:'
           IF= read PASS
   fi
   
   echo ' Enter your message (only one line, max 420 chars, it is binary safe):'
 IF= read text  IF= read text
   
 # download the file via special wget which stores session cookie to a file  # download the file via special wget which stores session cookie to a file
Line 45  detailvalue=`grep 'DETAIL' tmp.html | se
Line 55  detailvalue=`grep 'DETAIL' tmp.html | se
 echo 'Hold still, we need to wait 4 seconds.'  echo 'Hold still, we need to wait 4 seconds.'
 sleep 4  sleep 4
   
 # everything is OK, just we should POST and not GET (now it returns error page)  
 wget-special --output-document=tmp2.html \  wget-special --output-document=tmp2.html \
         -q \          -q \
         --load-cookies cookies.tmp.txt \          --load-cookies cookies.tmp.txt \
Line 58  wget-special --output-document=tmp2.html
Line 67  wget-special --output-document=tmp2.html
   
 smss_left=`grep "Tento mesiac" tmp2.html | sed 's/.*va \([0-9]*\) spr.*/\1/'`  smss_left=`grep "Tento mesiac" tmp2.html | sed 's/.*va \([0-9]*\) spr.*/\1/'`
   
 echo "Message sent. $smss_left SMSs left for this month."  if [ $smss_left ]; then
           echo "Message sent. $smss_left SMSs left for this month."
           # delete unnecessary files, now leaving for debug..
           rm tmp.html
           rm tmp2.html
           rm cookies.tmp.txt
   else
           echo 'Something went wrong, see debug files (tmp.html, tmp2.html, cookies.tmp.txt)'
   fi
   
 # delete unnecessary files, now leaving for debug..  
 rm tmp.html  
 rm tmp2.html  
 rm cookies.tmp.txt  

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top