Jump to content

Problem with socket connect to AIX


Recommended Posts

I'm having an issue when trying to connect via port 23 (Telnet) to an AIX system. When connecting to a linux server or a Cisco router, it seems to work fine sending back a login prompt, but when connecting to an AIX server, I get only the following back "ÿþ%ÿý" and nothing else. Sending extra data does nothing, and I've tried issuing both a carriage return and line feed. If I simply drop to a command prompt in XP and type telnet 192.168.0.5, it also works fine returning the AIX server identification, asking for login, etc. Here is the basic code (generic) that I'm using to test.

TCPStartup()

$socket = TCPConnect("192.168.0.5",23)

If $socket = -1 Then

msgbox(16,"Error","Could not connect to Telnet Server")

Exit

Endif

While 1

$recv = TCPRecv($socket,2048)

TCPSend($socket,@LF)

TCPSend($socket,@CR)

ConsoleWrite("Received: " & $recv & @LF)

sleep(1000)

Wend

Again, this is just test code to see what I might possibly send to the AIX server to get it to send the proper login prompt string back. When run and allowed to loop several times I get:

Received:

Received: ÿþ%ÿý

Received:

Received:

Received:

Received:

But from the XP command prompt I get:

telnet (xxx_Corp)

telnetd: failed to write to /var/adm/wtmp: A file or directory in the path name

does not exist.

AIX Version 5

© Copyrights by IBM and by others 1982, 2005.

login:

As a side note, I'm able to get PHP's fsock commands working with the AIX server just fine, but I need this connection to be made from AutoIT in this case. I will need to actually login to the server, issue command, etc. I think I can handle all of this if I could get past this one issue.

Could this be a terminal type problem? I don't see any other options for connecting to the socket or send data to the socket. Is there any way I can get this working?

Thanks,

Max

Link to comment
Share on other sites

Anybody have any info on this? After doing some more experimenting, it almost seems like the TCP socket support in AutoIT is not really robust.

What I'm basically needing to do is telnet to aix to issue commands based on commands received. As I described below, I can't even get to the command prompt with AIX.

Max

I'm having an issue when trying to connect via port 23 (Telnet) to an AIX system. When connecting to a linux server or a Cisco router, it seems to work fine sending back a login prompt, but when connecting to an AIX server, I get only the following back "ÿþ%ÿý" and nothing else. Sending extra data does nothing, and I've tried issuing both a carriage return and line feed. If I simply drop to a command prompt in XP and type telnet 192.168.0.5, it also works fine returning the AIX server identification, asking for login, etc. Here is the basic code (generic) that I'm using to test.

TCPStartup()

$socket = TCPConnect("192.168.0.5",23)

If $socket = -1 Then

msgbox(16,"Error","Could not connect to Telnet Server")

Exit

Endif

While 1

$recv = TCPRecv($socket,2048)

TCPSend($socket,@LF)

TCPSend($socket,@CR)

ConsoleWrite("Received: " & $recv & @LF)

sleep(1000)

Wend

Again, this is just test code to see what I might possibly send to the AIX server to get it to send the proper login prompt string back. When run and allowed to loop several times I get:

Received:

Received: ÿþ%ÿý

Received:

Received:

Received:

Received:

But from the XP command prompt I get:

telnet (xxx_Corp)

telnetd: failed to write to /var/adm/wtmp: A file or directory in the path name

does not exist.

AIX Version 5

© Copyrights by IBM and by others 1982, 2005.

login:

As a side note, I'm able to get PHP's fsock commands working with the AIX server just fine, but I need this connection to be made from AutoIT in this case. I will need to actually login to the server, issue command, etc. I think I can handle all of this if I could get past this one issue.

Could this be a terminal type problem? I don't see any other options for connecting to the socket or send data to the socket. Is there any way I can get this working?

Thanks,

Max

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...