[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Sending commands to a server with MacPerl



At 14.06 97/6/10, bufbill@cloud9.net wrote:
>OK, I found out that the EIMS password server is on port 106, and the
>commands that I have to send to it are
>
>USER username
>PASS password
>NEWPASS newpassword
>QUIT
>
>I am trying to use POP3.pm from the libnet bundle, but it is either
>erroring out, or not changin the password.
>
>Please help me out, and tell me what I have to do in order to
>
>Connect to a server on port 106
>and send the four commands mentioned above.

I'm guessing here:

Do a read on the connection, right after opening it, and print out
what you have, in hex.  If you get something like:
    FF FD 00

or other FF followed by stuff, then the connection is doing
TELNET option negotiation. You can decode this by
looking in /usr/include/arpa/telnet.h on your SunOS box.
When you connect to services that use TELNET option negotiation
for their control protocol you'll receive this.  What it boils
down to is a set of negotiations:
    FF - Interpret next char as command
    FD - You do this next char as option
    xx - option

    FF - Interpret next char as command
    FB - I want to do this next char as option
    xx - option

When you get the FFFDxx send back FFFCxx (I won't do this option).
If they send FFFBxx send FFFExx (You don't do this option).

If you want to respond to certain options you'll need to read the
pertinent RFCs (don't know off-hand what they are, see
http://www.internic.net/ds/dspg1intdoc.html).  I think simply
sending a newline for every negotiation request will also work,
as a negation, though I'm not sure.


Tom.

Tom Kimpton
--
Mrs. Bun: Have you got anything without spam?
Waitress: Well, there's spam egg sausage and spam, that's not got
much spam in it.
Mrs. Bun: I don't want any spam!



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch