Dan and I have checked out how to use SendSMS (as of version 3.9) with
an http-proxy that requires user authentication.  As it turned out,
this is already supported by the used Perl-packages that do the
networking.

To use it, you have to include your username and password in the proxy
definition, e.g. by adding a line like the following to your
~/.sendsmsrc

http_proxy  http://username:[EMAIL PROTECTED]:1234/

(http_proxy can be shortened to proxy.) If your password is 'simple'
that's all; you're ready to send SMs.  Otherwise read on...

It is not unlikely that your password contains characters which are
special for URLs and/or Perl, so these have to be escaped/encoded
properly.  I'll show how to find out the encoded version of your
password using Perl or Tcl.  I'll use bash-syntax in the following.
First assign the password:

  PW='a@:$%#"&<Z';

With ' in your password you'll have to quote with " and possibly use
some backslashes \:

  PW="a'=:\$&>}Z";

Now the follow Perl command works for some words...

  perl -e "use URI::Escape; print uri_escape('$PW'),\"\\n\";"

with the first example it returns

a%40%3A%24%25%23%22%26%3CZ

but is doesn't encode ! and has problems with ' (probably from the
shell parsing).  If Tcl and the ngci library are installed you can use
instead

  echo 'package require ncgi;set pw [read -nonewline stdin];puts $pw;puts 
[ncgi::encode $pw]'>encodepw
  tclsh encodepw

which I found working for everything I tried including embedded
spaces.  Enter your password followed by the return-key and CTRL-d.
Examples:

a@:$%#"&<Z
a%40%3A%24%25%23%22%26%3CZ

a'=:$&>}Z
a%27%3D%3A%24%26%3E%7DZ

For "!" and " " there's a little disagreement

! ?                results in
%21+%3F            from Tcl's ncgi, but in
!%20%3F            from Perl's URI.

I didn't check what is actually correct. - Daniel

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to