Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TIP] Spedire sms da linea di comando
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page Previous  1, 2, 3  
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
federico
Advocate
Advocate


Joined: 18 Feb 2003
Posts: 3272
Location: Italy, Milano

PostPosted: Wed Dec 08, 2004 2:10 am    Post subject: Reply with quote

Ma no che non paga, koma ne avevamo parlato in canale anche :)
Ora piu' che altro non so se funziona ancora questo sistema perche' chiaramente c'era qualcuno (ehM.. bhe per prova) che in questo modo mandava migliaia di sms a raffica verso qualche numero antipatico :)
_________________
Sideralis www.sideralis.org
Pic http://blackman.amicofigo.com/gallery
Arduino http://www.arduino.cc
Chi aveva potuto aveva spaccato
2000 pezzi buttati là
Molti saluti,qualche domanda
Semplice come musica punk
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Wed Dec 08, 2004 4:18 pm    Post subject: Reply with quote

Aggiunto ai post utilissimi sezione tips
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
rota
l33t
l33t


Joined: 13 Aug 2003
Posts: 960

PostPosted: Wed Dec 08, 2004 10:16 pm    Post subject: Reply with quote

altavista ti permette di inviare sms ..anche libero....
Back to top
View user's profile Send private message
rota
l33t
l33t


Joined: 13 Aug 2003
Posts: 960

PostPosted: Wed Dec 08, 2004 10:18 pm    Post subject: Reply with quote

pero visto che ne sitamo parlando ... io vorrei solo cosi tanto per parlarne ... vorrei sapere come si monta un server che manda sms ...non so se e chiaro quello che sto chiedendo....

lo sto chiedendo cosi tanto per imparare qualcosa di nuovo e se l'ideea mi piace forse la propongo all capo ..... :roll: :roll: :roll: :roll:
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Wed Dec 08, 2004 10:22 pm    Post subject: Reply with quote

Dovresti avere un modulo che permetta di spedire e inviare sms dove ci metti la tua carta e poi una volta fatto questo puoi farlo. La scuola per un progetto ce ne ha dato uno
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
rota
l33t
l33t


Joined: 13 Aug 2003
Posts: 960

PostPosted: Wed Dec 08, 2004 10:27 pm    Post subject: Reply with quote

a e quanto mi viene a cosare una cosa dell genere ?????


pero non sono stato chiaro io voglio fare una cosa dell genere che fanno su altavista lbeto ecc

sicuro che basta fare come dici tu ????? non mi e chiaro quello che ai detto ..

piu informazzioni mi farebbero comodo ...che modulo devvo usare ???? :roll: :roll:
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Wed Dec 08, 2004 10:43 pm    Post subject: Reply with quote

Tipo questo http://www.lextronic.fr/fela/descrip.htm poi ti manca ancora la parte per farlo comunicare via seriale con il pc
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
rota
l33t
l33t


Joined: 13 Aug 2003
Posts: 960

PostPosted: Wed Dec 08, 2004 11:16 pm    Post subject: Reply with quote

e scometto che tu sai come fare ???/ 8) 8) 8) me lo dici ... :roll: :roll: :roll: :lol:
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Wed Dec 08, 2004 11:22 pm    Post subject: Reply with quote

rota wrote:
e scometto che tu sai come fare ???/ 8) 8) 8) me lo dici ... :roll: :roll: :roll: :lol:

No per intanto sono riuscito a ricever un sms con quel aggeggio
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
rota
l33t
l33t


Joined: 13 Aug 2003
Posts: 960

PostPosted: Wed Dec 08, 2004 11:27 pm    Post subject: Reply with quote

ok poi domani faccio una capatina su gogle ...
pero dimmi una cosa ....

se io volessi mettere nell mio sito la possibilita di inviare sms ecc...mi basta quello che mi ai detto tu :?: :?: oppue no :?: :?:
e poi devvo pagare qualcosa per un servizzio di questa portaa ????
no perche io una volta sapevo che per mettere una cosa del genere su un sito ti chieddevano un sacco di soldi ecc... :cry: :cry:
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Wed Dec 08, 2004 11:29 pm    Post subject: Reply with quote

rota wrote:
se io volessi mettere nell mio sito la possibilita di inviare sms ecc...mi basta quello che mi ai detto tu :?: :?: oppue no :?: :?:

Si in quel modulo ci devi mettere la tu sim quindi pagheresti tu come un contratto normale
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
rota
l33t
l33t


Joined: 13 Aug 2003
Posts: 960

PostPosted: Wed Dec 08, 2004 11:45 pm    Post subject: Reply with quote

ok quello lo avevvo capito....percio sto tipo di servizzio ... potrei usarlo per mandare sms ai miei clienti ecc....be pero a me che me torna.....

invece se lo metto sull sito sto servizzio posso far pagare un tott per ogni sms ...se puo fare ????

ma se metto la mia scheda come e possibile che io possa ofrire a tutti di spedire sms dall mio sito ??????
Back to top
View user's profile Send private message
Guglie
Apprentice
Apprentice


Joined: 01 Mar 2004
Posts: 240
Location: switzerland - zürich

PostPosted: Sun Oct 29, 2006 11:01 am    Post subject: Reply with quote

al politecnico di zurigo hanno reso obbligatorio l'uso di TLS nelle connessioni al mail server: posto le modifiche che ho dovuto fare al file ~/.msmtprc:
Code:
account default
host mail.ethz.ch
from $nome_utente@student.ethz.ch
auth on
tls on
tls_starttls
user $nome_utente
password $password_utente


inoltre ho modificato leggermente lo script di fedeliallalinea: ho migliorato un po' la rubrica e ho aggiunto la possibilità di mandare un messaggio anche a più persone, con sendsms -n "messaggio " persona_1,persona_2,...,pesona_n

Code:
#!/bin/bash
# file: sendsms.sh
# author: fedeliallalinea (forums.gentoo.org)
# date: october 2006

ADRESS_BOOK="/etc/sms_agenda"
SEVICE_SMS='sms.switch.ch'
SMS_LENGTH=160

function print_usage
{
   echo "Usage:"
   echo "   $(basename ${0}) <\"message\"> <telephone_number_1>,[telephone_number_2],..."
   echo "   $(basename ${0}) -n <\"message\"> <name_1>,[name_2],..."
   echo
   echo "Options:"
   echo "   -h | --help   print this help"
   echo "   -l | --list   print the adress book"
   echo
   echo "Note: use \n for new line"
   echo
   exit 1
}

function print_adress_list
{
   echo "Adress book:"
   cat ${ADRESS_BOOK} | sort | while read line; do
      name=$(echo $line | head -n 1 | awk '{print $1}')
      number=$(echo $line | awk '{print $2}')
      echo -e "  - $name\t$number"
   done

   exit 0
}

function get_number
{
   echo $(cat ${ADRESS_BOOK} | grep $1 | sort | head -n 1 | awk '{print $2}')
}

function parse_names
{
   # cerca per ogni nome il numero corrispondente nella rubrica
   names=$(echo "$1" | sed 's/,/\ /g')

   for i in $names; do
      if [ ! -z "$LIST_NUMBERS" ]; then
         LIST_NUMBERS=$LIST_NUMBERS,
      fi
      temp_num=$(get_number $i)
      if [ ! -z "$temp_num" ]; then
         LIST_NUMBERS=$LIST_NUMBERS$temp_num
      else
         echo "The contact \"$i\" is no available in the adress book"
         exit 1
      fi
   done
}

function sendsms
{
   message=$1
   numbers=$2

   # calcola la lunghezza del account mail
   FROM_LENG=`cat ~/.msmtprc | grep from | awk '{print $2}' | wc -c`
   # lunghezza del messaggio sms
   SMS_LENG=`echo -e $message | wc -c`
   let TOT_LENG=SMS_LENG+FROM_LENG
   SMS=`echo -e $message`

   # fintanto che il messaggio e' piu' lungo di 160
   # char fai il loop
   while [ $TOT_LENG -gt ${SMS_LENGTH} ]
   do
      # lunghezza massima del sms
      let LENG=${SMS_LENGTH}-FROM_LENG
      #echo "`echo -e ${SMS} | head -c ${LENG}`"
      # spedisci i primi LENG caratteri per sms
      echo "`echo -e ${SMS} | head -c ${LENG}`" |nail -s " " $numbers@${SEVICE_SMS}
      # setta la nuova lunghezza del sms e il nuovo contenuto
      let SMS_LENG=SMS_LENG-LENG
      SMS=`echo ${SMS} | tail -c ${SMS_LENG}`
      let TOT_LENG=SMS_LENG+FROM_LENG
   done

   #echo -e "SMS: ${SMS}"
   #echo ${numbers}@${SEVICE_SMS}
   echo -e "${SMS}" | nail -s " " $numbers@${SEVICE_SMS}
}

case $1 in
   -n|--name)
      [ -z "$3" ] && print_usage
      parse_names $3
      sendsms "$2" ${LIST_NUMBERS} ;;
   -l|--list)
      print_adress_list ;;
   -h|--help)
      print_usage ;;
   *)
      [ -z "$2" ] && print_usage
      sendsms "$1" $2 ;;
esac

exit 0

_________________
A! Elbereth Gilthoniel! silivren penna míriel o menel aglar elenath!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools) All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum