Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

O2 free SMS via linux

  • 12-02-2004 2:48pm
    #1
    Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭


    A friend of mine is in DCU and she is able to use her free o2 sms from the redbrick server. Do redbrick have a deal with o2 to be able to do this or did they write a few clever scripts to do the logging in and verifying then send messages ?

    I would like to setup something like this to use my free sms, bypassing the website would be cool.

    All she has to do is type "SMS 08XXXXXXXX <message>" and it will use o2 to send the message. SMS is an alias to an o2 script and I assume they have something setup to do all this.

    So she just sets up an alias for my phone number and can send me a message very quickly !!! "ro hello" and a message is on my phone, very cool I think.

    Anyone any ideas how this was done ?

    Slaanesh.


Comments

  • Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭Slaanesh


    very prompt reply, that's great stuff thanks ! :)

    Slaan.


  • Registered Users, Registered Users 2 Posts: 21,107 ✭✭✭✭Stark


    That doesn't work for me. Gives me [ login failed; server returned error 500 (Internal Server Error) ]

    That's when I'm using proxy form [url]http://[/url]<proxyhost>:<proxyport&gt;

    When I use form <proxyhost>:<proxyport>

    It gives:

    [ login successful ]
    [ message sending failed; unknown response from server ]
    Retry ? y/n [n]:


  • Technology & Internet Moderators Posts: 28,832 Mod ✭✭✭✭oscarBravo


    Same here: unknown response.


  • Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭Slaanesh


    I have to wait till I'm in work tomorrow to see if I can get it working. The lads in DCU have it successfully running. Don't have a clue how to set scripts up or anything so it should be an experience.

    Slaan.


  • Technology & Internet Moderators Posts: 28,832 Mod ✭✭✭✭oscarBravo


    Originally posted by oscarBravo
    Same here: unknown response.
    Bah - stupid me: hadn't installed Crpyt:SSLeay. Working perfectly now.

    I notice Voodoofone won't allow me to send SMS abroad - will O2?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 413 ✭✭padraigmyers


    O2 do allow international texts.


  • Technology & Internet Moderators Posts: 28,832 Mod ✭✭✭✭oscarBravo


    Right, that's it - I'm switching at the weekend.


  • Registered Users, Registered Users 2 Posts: 21,107 ✭✭✭✭Stark


    Still not working after trying those pieces of advice.

    Can anyone give me the correct format for the proxy string so I can eliminate one variable?


  • Registered Users, Registered Users 2 Posts: 413 ✭✭padraigmyers


    Originally posted by oscarBravo
    Right, that's it - I'm switching at the weekend.

    Plus getting free 250 texts a month to any network is a hell of a lot better than 30.
    I think for prepaid mobiles o2 are much cheaper than vodafone.


  • Registered Users, Registered Users 2 Posts: 413 ✭✭padraigmyers


    Originally posted by k.oriordan
    That doesn't work for me. Gives me [ login failed; server returned error 500 (Internal Server Error) ]

    That's when I'm using proxy form [url]http://[/url]<proxyhost>:<proxyport&gt;

    When I use form <proxyhost>:<proxyport>

    It gives:

    [ login successful ]
    [ message sending failed; unknown response from server ]
    Retry ? y/n [n]:

    If you got Login Successful for the 2nd form (<proxyhost>:<proxyport>), then that is the correct form.
    Are you still getting the [ message sending failed; unknown response from server ] message.
    Are your perl libraries OK?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 347 ✭✭Static


    I remember redbrick folk not being able to use that o2sms script (which is fantastic) because of the DCU proxy.


  • Registered Users, Registered Users 2 Posts: 21,107 ✭✭✭✭Stark


    perl libraries okay. Have choice of 2 proxies in work.

    Website documentation says to use [url]http://host:port/[/url]

    Have 2 proxies in work.

    When using [url]http://proxya:port/[/url] get:
    [logging in to k.oriordan@o2.ie]
    [login successful]
    (hangs)

    When using proxya:port get:
    [ logging in to k.oriordan@o2.ie ... ]
    [ login successful ]
    [ message sending failed; unknown response from server ]

    When using [url]http://proxyb:port/[/url] get:
    [ logging in to k.oriordan@o2.ie ... ]
    [ login failed; server returned error 500 (Internal Server Error) ]

    When using proxyb:port get:
    [ logging in to k.oriordan@o2.ie ... ]
    [ login successful ]
    [ message sending failed; unknown response from server ]


    Grrrrr, poxies. Work of the devil if you ask me.


  • Registered Users, Registered Users 2 Posts: 413 ✭✭padraigmyers


    Run it with the debug switch (-d) and post the results here.


  • Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭Slaanesh


    ok lads, I don't have a clue what I'm doing. I copied and pasted the script from the website into a file called o2sms.pl.

    Bare with me, I really don't have a clue what I'm at.

    I try to run it and I get

    ./o2sms.pl: line 1: d:: command not found
    ./o2sms.pl: line 16: use: command not found
    ./o2sms.pl: line 17: use: command not found
    ./o2sms.pl: line 18: use: command not found
    ./o2sms.pl: line 19: use: command not found
    ./o2sms.pl: line 20: use: command not found
    ./o2sms.pl: line 21: syntax error near unexpected token `('
    ./o2sms.pl: line 21: `use POSIX qw(strftime);'

    I'm obviously doing something hideously wrong !

    Thanks,

    Slaan.


  • Registered Users, Registered Users 2 Posts: 347 ✭✭Static


    I think you're missing the

    #!/usr/local/bin/perl

    line at the start.


  • Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭Slaanesh


    ok thanks for that, have it running but now how do I use it :)

    Thanks,

    Slaan.


  • Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭Slaanesh


    got it !

    Thanks for the help lads.

    Slaan


  • Registered Users, Registered Users 2 Posts: 21,107 ✭✭✭✭Stark


    For proxy A:

    HTTP/1.1 500 (Internal Server Error) Server Error
    Connection: close
    Date: Fri, 13 Feb 2004 10:18:30 GMT
    Server: NetCache appliance (NetApp/5.3.1R3)
    Content-Length: 280
    Content-Type: text/html
    Client-Date: Fri, 13 Feb 2004 10:40:22 GMT
    Client-Response-Num: 1
    Title: 500 Server Error

    <HTML>
    <HEAD><TITLE>500 Server Error</TITLE></HEAD>
    <BODY>
    <H1>Server Error</H1>
    <H4>
    The following error occurred:<P>
    Unable to service this URL without parent cache. Contact your system administrator. (PARENT_NEEDED)
    </H4>
    <HR>
    Please contact the administrator.
    </BODY>
    </HTML>

    [ login failed; server returned error 500 (Internal Server Error) ]

    For Proxy B:

    test
    sms: using user agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
    sms: using proxy: http://143.47.96.1:80
    [ logging in to k.oriordan@o2.ie ... ]
    Logging in...
    HTTP/1.1 400 (Bad Request) URL format not supported
    Connection: close
    Date: Fri, 13 Feb 2004 10:20:36 GMT
    Server: Simple, Secure Web Server 1.1
    Content-Type: text/html
    Client-Date: Fri, 13 Feb 2004 10:41:29 GMT
    Client-Response-Num: 1
    MIME-Version: 1.0
    Title: Firewall Error: URL form not supported

    <HTML>
    <HEAD><TITLE>Firewall Error: URL form not supported</TITLE></HEAD>
    <BODY>
    <H1>URL form not supported</H1>
    The URL that you tried to use is not supported by the proxy.
    This may be due to an unsupported scheme, or possibly that
    the URL was malformed. The URL that was seen by the firewall
    was:
    <PRE>
    https://apps.o2.ie/NASApp/Portal/Login
    </PRE>
    <BR>
    Optional diagnostic information:
    <PRE>
    The specified scheme is unknown and cannot be used through this proxy.
    </PRE>
    <BR>
    Please check the format of the URL and try again. If the error was in a link
    and you did not make a typographical mistake, please contact the webmaster of
    the server where you found this URL.
    </body></HTML>

    [ login successful ]
    sms: picking up cookies from https://apps.o2.ie/NASApp/redirects/grouptext/webtext.jsp
    GET https://apps.o2.ie/NASApp/redirects/grouptext/webtext.jsp HTTP/1.0


    HTTP/1.1 400 (Bad Request) URL format not supported
    Connection: close
    Date: Fri, 13 Feb 2004 10:20:36 GMT
    Server: Simple, Secure Web Server 1.1
    Content-Type: text/html
    Client-Date: Fri, 13 Feb 2004 10:41:30 GMT
    Client-Response-Num: 1
    MIME-Version: 1.0
    Title: Firewall Error: URL form not supported

    <HTML>
    <HEAD><TITLE>Firewall Error: URL form not supported</TITLE></HEAD>
    <BODY>
    <H1>URL form not supported</H1>
    The URL that you tried to use is not supported by the proxy.
    This may be due to an unsupported scheme, or possibly that
    the URL was malformed. The URL that was seen by the firewall
    was:
    <PRE>
    https://apps.o2.ie/NASApp/redirects/grouptext/webtext.jsp
    </PRE>
    <BR>
    Optional diagnostic information:
    <PRE>
    The specified scheme is unknown and cannot be used through this proxy.
    </PRE>
    <BR>
    Please check the format of the URL and try again. If the error was in a link
    and you did not make a typographical mistake, please contact the webmaster of
    the server where you found this URL.
    </body></HTML>

    GET https://apps.o2.ie/NASApp/redirects/grouptext/webtext.jsp HTTP/1.0


    HTTP/1.1 400 (Bad Request) URL format not supported
    Connection: close
    Date: Fri, 13 Feb 2004 10:20:36 GMT
    Server: Simple, Secure Web Server 1.1
    Content-Type: text/html
    Client-Date: Fri, 13 Feb 2004 10:41:30 GMT
    Client-Response-Num: 1
    MIME-Version: 1.0
    Title: Firewall Error: URL form not supported

    <HTML>
    <HEAD><TITLE>Firewall Error: URL form not supported</TITLE></HEAD>
    <BODY>
    <H1>URL form not supported</H1>
    The URL that you tried to use is not supported by the proxy.
    This may be due to an unsupported scheme, or possibly that
    the URL was malformed. The URL that was seen by the firewall
    was:
    <PRE>
    https://apps.o2.ie/NASApp/redirects/grouptext/webtext.jsp
    </PRE>
    <BR>
    Optional diagnostic information:
    <PRE>
    The specified scheme is unknown and cannot be used through this proxy.
    </PRE>
    <BR>
    Please check the format of the URL and try again. If the error was in a link
    and you did not make a typographical mistake, please contact the webmaster of
    the server where you found this URL.
    </body></HTML>

    POST http://webtext.o2.ie/NASApp/TM/O2/proc/sendMessage.jsp HTTP/1.0
    Host: webtext.o2.ie
    Referer: http://webtext.o2.ie/NASApp/TM/O2/proc/sendMessage.jsp
    Content-Length: 86
    Content-Type: application/x-www-form-urlencoded
    Cookie2: $Version="1"
    Referrer: http://webtext.o2.ie/NASApp/TM/O2/proc/sendMessage.jsp

    msisdn=00353879712194&Msg=Test&recipients=1&grpSTR=&ConSTR=&command=send&NumMessages=1
    HTTP/1.1 302 (Found) 302 Moved Temporarily
    Connection: close
    Date: Fri, 13 Feb 2004 10:37:45 GMT
    Location: http://www.dol.ie/NASApp/o2/jsp/grouptext/error.jsp?
    Server: Netscape-Enterprise/6.0
    Content-Type: text/html;charset=8859_1
    Client-Date: Fri, 13 Feb 2004 10:41:31 GMT
    Client-Response-Num: 1
    Set-Cookie: GX_jst=6e4750b7662d6165;Path=/NASApp/TM; path=/NASApp/System
    Set-Cookie: GX_jst=6e4750b7662d6165;Path=/NASApp/TM
    Set-Cookie: JSESSIONID=56b3dd66208bb002;Path=/NASApp/TM


    [ message sending failed; unknown response from server ]


  • Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭Slaanesh


    Did you install all the packages he specifies in the sciript ?

    I think that may be the problem.

    Slaan.


  • Registered Users, Registered Users 2 Posts: 21,107 ✭✭✭✭Stark


    yeah I installed them all.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 413 ✭✭padraigmyers


    Are you able to log in on the website using both of these proxys. It looks like the second proxy is disallowing the requests trough the firewall.
    The second one looks a bit more hopeful.
    What version of linux are you using?


  • Registered Users, Registered Users 2 Posts: 21,107 ✭✭✭✭Stark


    Using Fedora Core 1. Have no bother accessing the site using a web browser, and both those proxies support HTTPS.

    The first one blocks all but ports 80 and 443, the second one is more open. Does the script use any non-standard ports?


  • Registered Users, Registered Users 2 Posts: 413 ✭✭padraigmyers


    The script just uses port 80, and does exactly what your browser does. Thats all the script does, it emulates you going on to the website and sending the message online. If it works on your browser its had to see why it doesnt work from the script.


  • Registered Users, Registered Users 2 Posts: 9 mackers


    What proxies are you using? The script don't work with squid, as well as some others.

    This is a problem with LWP::UserAgent's handling of HTTPS urls via a proxy GET and not a proxy CONNECT command, which squid (correctly) spews over.


Advertisement