Sophie

Sophie

distrib > Mandriva > 9.1 > i586 > by-pkgid > c3e727ecf974716bf6c2dd48b582cdd2 > files > 9

linuxsms-0.60-1mdk.noarch.rpm

# ...a cool console perl script for send short
# messages to gsm phones (aka sms 8-))... 
# URL: http://linuxsms.sourceforge.net
# email: thesumidero@yahoo.com

use Lang:Poor_English;


### MAIN ###

My 2nd cool script in perl (1st was bfl), written in a few hours of some
boring afternoons. I don't found in linux a good program for send sms to
gsm phones so I decide to make my own script in Perl (the best choice)
8-). Sure that the script contain a lot bug/errors/bad_programming, but
hey, I'm not a perl hacker/guru ;)


### USING ###

=> Classic commandline long options (SET CMDLINE=0 in CONFIG)

Example using the addressbook (name alex):
./linuxsms -name:alex -server:navegalia -sms:"this is the msg"

Example using a number (649111222):
./linuxsms -number:649111222 -server:navegalia -sms:"this is the msg"

Example using a number && country prefix (34 649111222):
./linuxsms -prefix:34 -number:649111222 -server:icicampus -sms:"this is the msg"

=> Modern commandline short options (SET CMDLINE=1 in CONFIG)

Example using the addressbook (name alex):
./linuxsms alex navegalia "this is the msg"

Example using a number (649111222):
./linuxsms 649111222 navegalia "this is the msg"

Example using a number && country prefix (34 649111222):
./linuxsms 34 649111222 icicampus "this is the msg"

Example using the SDTIN
/usr/games/fortune | ./linuxsms 34 649111222 icicampus

=> Get confused / Need more help / where is the manpage 8-) ?
./linuxsms -h


### Configuration files ###

In all files, the lines that begin with '#' are comments, and will be ignored
when you exec the script.
__WARNING__ : ALL FILES MUST HAVE A BLANK LINE AT END

===========> Addressbook ($HOME/.linuxsms/addressbook) <==============

You can add new names write lines with the next struct:

name:prefix:number:default_server

Case is sensitive, prefix is the country prefix:

myname:34:641234567

You can omit this item, ex:

myname::641234567 

(this will asume the default prefix from main config)

Default server, if exists, use this server to send the sms. This option
only will be overwritted when the script will found a server on 
commandline options.

=========> Logins / Passwords ($HOME/.linuxsms/password) <============

You can add new accounts write lines with the next struct:

server_name:login:password

Case is sensitive, server name must exist in script, login && password
are the same that you registered in the main server page.

========> Main configuration ($HOME/.linuxsms/linuxsmsrc) <===========

In this file, the syntax it's VAR=VALUE, those are the vars and a few
info about them:

LANG: this can be ES or EN, for now it's only a method for compress
the sms with a dictionaries.

MYNUMBER: our phone number, some servers have the option to send
the 'from' number (don't include the international prefix here).

SERVER: default server for send the sms if we don't set any in the
commandline options. This server must exist in script. This option will
be overwritted with commandline options and with addressbook default
server entry.

PREFIX: default prefix for international support, ex: if you send a
sms to spain, you must set this variable to 34

CMDLINE: takes the values 0 or 1, if you can set to 1, you could use
the new commandline options (more shorter), else (0) you could use the
classic long commandline.

ANSI: this is the color support 8-), if you set to YES, the script will
be colored with ANSI codes (your terminal must support it), else (NO) the
texts will be printed with bored_plain_monocrome fonts ;-)

SIGNATURE: this works with the commandline option -sig, if we set a value
here, ex: 'SIGNATURE= - my signature', and when we exec the script we
add the -sig commandline option, we are appending in the sms text the
string ' - my signature'.

ALWAYS_SIGNATURE: if we set this option to YES, the SIGNATURE will be
included always in the SMS.

SECURITY: default is YES, if set to NO, you can run script as root, but
warning, I must advice you that maybe this means a big security hole.

SERVER_LIST: default is NORMAL, if set to FULL, the server list will
report more details.

PROXY: you can set here the hostname and port of your proxy, ex:
    PROXY=myproxy.com:8080
NOTE!!!: proxy support is unstable and experimental, no advanced 
options (auth && others...) are present for now.

LOG: default is NO, if set to YES writes a log of the sms sent.

=========> Dictionary ($HOME/.linuxsms/dict) <============

You can add new words write lines with the next struct:

word_to_search:word_for_replace

one:1
you:u
forever:4ever

Case is not sensitive.


### FASQ: (Frecuently Asked Stupid Questions) ###
...mostly, in the case that you don't read the fucking help (-h)

+ How do I list addressbook ? 
- ./linuxsms -addressbook

+ What servers are supported ?
- ./linuxsms -server

+ Why the script wont run as root ?
- Because root privileges are not required for run the script ;)
  ...and hey! can you think in the posibility that I include in the
  script a secret obscure megamalefic option that makes a 'rm -rf /'
  ... sure that a lot people don't read source...

+ Script don't send sms with spaces! 
  (ex: -sms:this is sms || this is sms)
- Can you omit the quotes ?, OF COURSE, because if you read help
  you will know that you must write as: -sms:"this is sms" or
  "this is sms"

+ Any function to check/update for new versions of script ?
- Please, ReadTheFuckingManual ;-) the magic-option is '-update'

+ How do I create an account in the servers that need register ?
- In the homepage of server that you like register, there is all
  information and help, so please read it. If you can't found it, go
  one more time and re-read it, I (the autor) write scripts and can't 
  teach "how you must use Internet".

+ What's new on xxx version of script (list of changes/new features) ?
- Read the magic-file 'CHANGES'.


### FAQ: (Frecuently Asked Questions) ###

+ Script doesn't run, only response:
 "Perl v5.0.0 required--this is only vx.x.x, stopped at ..."
- You need Perl version >= 5.0.0

+ Where's the config file ?
- in $HOME/.linuxsms/ you will found the magic-file 'linuxsmsrc' 8-)
  ... in versions < v0.32 this file was called '.linuxsmsrc'

+ Where's the addressbook file ?
- in $HOME/.linuxsms/ you will found the magic-file 'addressbook' 8-)
  ... in versions < v0.32 this file was called '.addressbook'

+ Where's the password file ?
- in $HOME/.linuxsms/ you will found the magic-file 'password' 8-)
  ... in versions < v0.32 this file was called '.password'

+ Do you plain write a GUI ?
- Igor Castang write a few time ago a GUI in Perl TK that works for the
  versions < 0.3x. Kali fix it and now works with the last versions.
  You can download it from linuxsms.sourceforge.net. I (z0mbie) do not 
  code/support/help this GUI, so PLEASE don't ask me for updates or any
  question related with this because will go redirected to /dev/null ;)

+ My terminal doesn't support ANSI || your colors sucked me
- In the main config file, change the value of the line: 
  ANSI=YES for another value != "YES" (ex: ANSI=NEVER) 8-)
  By default and compatibility with old terminals, the color support
  with ANSI codes is disabled.

+ I found a cool web-gateway to send sms that doesn't found in this
  script, can you add it ?
- Mail me with the url of the server and I try to make your dreams true
  }:)

+ Can you tell me the secret/method for add servers ?
- There's no secret, I usually load a packet sniffer for trace all
  packets, next get my browser and go to any web page that offers sms 
  services, send a sms test and close connection. Later I examine the
  capture file of the sniffer for analize data (forms, headers...),
  finally I try to reproduce in a routine the same method. If you are
  interesting, take a look in source code to the servers section. I
  check too the server list of 'winsms' for find new interesting and
  fast servers.

+ Can you add the option 'xxxx' to the script ?
- Maybe yes, maybe not, email me with your suggestions...

+ How does DEBUG work ?
- Activate with '-debug' and dump STDERR to file, ex:
  linuxsms.pl -name:myname -server:server -sms:"test" -debug 2> debug.txt
  linuxsms.pl myname server "test" -debug 2> debug.txt
  DEBUG info will be written to debug.txt

+ How can I append a '!' or '&' char in the sms, the shell says:
  bash: !": event not found
- Use single quotes for the sms, ex:
  ./linuxsms alex 'black & white!'

+ Can I pipe the output of a cmd to linuxsms ?
- Yes, linuxsms can read sms from STDIN, just do this:
   /usr/games/fortune | linuxsms number server
   linuxsms number server
   (write the sms and type Crtl+D when you finish)
  
+ More information, any site where I can ask my questions ? etc...
- If documentation doesn't help you, you can email the autor 
  (thesumidero@yahoo.com). There is also a maillist/forum, read it online 
  from web (http://groups.yahoo.com/group/linuxsms) or subscribe and receive
  via email (send email to: linuxsms-subscribe@yahoogroups.com).
  

### EXIT CODES ###

If you are thinking in call this script inside another script and need an
exit (error?) code after execution, here are the magic numbers:

    0 - sms sent ok
    1 - sms not sent ok
    2 - sms not sent ok (webmasters fuck support)


### SERVERS ###

Account required (the best alternative): 

everyday   - 145 chars && 03 SMS / day - International 
             no flash support 
	     register account at http://www.everyday.com
	     you can only send sms if have enougth points

firstwap   - 160 chars && 25 SMS / moth - International
             flash support
	     register account at http://www.1rstwap.com
	     support for spain GSM is unstable

amena1     - 130 chars && 20 sms / day - Only Spain
             no flash support
	     register account calling amena service
	     can hidde number (-anonymous)

amena2     - 500 chars && 20 sms / day - Only Spain
             no flash support
	     register account calling amena service
	     can hidde number (-anonymous)

orangedk     - 120 chars && no limit - Only Denmark
	     no flash support
	     register account at http://myorange.dk

gomobile1    - 144 chars && no limit - Switzerland
	     no flash support
	     register account at http://www.gomobile.ch

gomobile2    - 500 chars && no limit - Switzerland
	     no flash support
	     register account at http://www.gomobile.ch

uboot        - 300 chars && 50 sms / week - International
	     no flash support
	     register account at http://www.uboot.com
	     WARNING: this is a *PAY SERVICE*

lycos        - 89 chars && 1 sms / day - International
	     no flash support
	     register account at http://www.lycos.es

tiscali      - 130 chars && 10 sms / day - International
             no flash support
	     register account at http://www.tiscali.co.uk

No account required (don't have limit but sometimes the servers
are too busy and don't send the sms).

bluewin   - 130 chars - no flash support - only send to Switzerland


### TROUBLESHOOTING ###

+ If script says: "sms NOT sent ok!" in most cases, you must wait a few 
  minutes because the server is busy and don't accept your petition.

+ If script says: "you waste the limit of sms/day (x) in this server"
  you must wait 24 hours for send another (x) sms in this server ;).

+ If script says: "webmasters of server change method" the support for
  this server was fucked, please email me for try to fix it.

+ If you have some of this 3 problems, of course you can try send the
  sms with another server.


### GREETS ###

+ Azrael: author of 'winsms', the big brother of 'linuxsms' 8-). I wrote
  this script because I like his program but I don't have windows X-).

+ Manty: for tedious betatesting && allmost bug reports && sugestions

+ Igor Castang && Kali for Perl Tk GUI's