cyd01 / KiTTY

:computer: KiTTY, a free telnet/ssh client for Windows
https://www.9bis.com/kitty
Other
1.57k stars 135 forks source link

Whether to consider add RuTTY 0.15 to send and receive WM_COPYDATA messages. #428

Open dZ8Lx9OwX opened 1 year ago

dZ8Lx9OwX commented 1 year ago

Hi all.

Kitty now uses the RuTTY version 0.14.08 script support function. The most recent RuTTY is RuTTY 0.15.71. RuTTY 0.15 has the capability to send and receive WM_COPYDATA messages. Can use any script language that can send and receive windows messages.

Does consider adding this function to extend its support for scripts?

cyd01 commented 1 year ago

Can you sent the diff from RuTTY 0.14.08 and RUTTY 0.15.71.
I'll try to see if it is possible to make it.
... RuTTY is based on PuTTY .063, a very very old PuTTY version, so I'm not really sure it will be possible.

cyd01 commented 1 year ago

Hi
I had a quick look at the "new" RuTTY code at sourceforge. And it seems it is not so difficult.
I've made a beta version based on RuTTY 0.15. Can you test it. If it is ok I'll release a new KiTTY version asap.

dZ8Lx9OwX commented 1 year ago

Hi Sorry for not providing more information in time. As you can see,I also saw RUTTY updates in sourceforge. I only found this update and noticed that the RuTTY patch used by KiTTY is a previous version. So I are looking forward to KiTTY's support to extend script functions. At present, what I have done is to simply experiment with the test cases in RuTTY, and I haven't used them too much. Because of my network, I can't download to the beta version, so I can't provide tests. I'm looking forward to its release. It's easier for me to download it from github. Thank you very much for your reply and handling. I also hope that others can pay attention to this issue and provide testing help. Expect better KiTTY!

dZ8Lx9OwX commented 1 year ago

Hi

I found a kitty-beta.exe program in the latest kitty 0.76.0.12 download. I don't know if it is the same as that on 9is.com, but I tried my best to test it. The RuttyAHK demo instance included in RuTTY is used. First, I confirmed that the RuttyAHK demo can run correctly and be available. Then I replaced the RuTTY program with the KiTTY program to rename it. I think this method is feasible because the goals and methods achieved by KiTTY and RuTTY are consistent in the end, but I'm not sure whether they are really correct and reliable. Kitty-beta an error is reported directly during startup, and the work is stopped unexpectedly. Prompt to close the program, nothing else. Surprisingly, kitty.exe, kitty_nocompress.exe, and kitty_portable.exe programs can be started normally in RuttyAHK, but only the feedback of bouncer.exe can be obtained through the dialog window. Could not communicate with script generated Rutty_AHK_Demo dialog box communication. Not sure, The Rutty_AHK_Demo cannot be used for KiTTY because of its special type. These are the tests I have done, and I am not sure whether it is a correct approach. I hope I can give you the help you want.

dZ8Lx9OwX commented 1 year ago

hi

I saw the update of 0.76.0.13, and I tried to test the newly added script function. I used Rutty_AHK_Demo to test the new version. But I modified Rutty_AHK_Demo to connect to my virtual machine instead of bouncer.exe. Their connection works normally, but there are some uncertainties when sending data.

Output the login account password and other commands in Rutty_AHK_Demo at one time, and then send them. It works normally and receives feedback information.However, continue to input in the input window and click Send. The KiTTY does not respond.

If first enter the password in the Rutty_AHK_Demo input box, then click Send. it is normal and the response is received. Subsequent password input is also normal. after logging in, entering other commands is the same as above, and there is no response.

It seems that after logging in, all Rutty_AHK_Demo sends cannot be responded. if you enter a command in the KiTTY session, Rutty_AHK_Demo will get the response information from the server and display it.

I don't know how different it is to input directly from the keyboard and from Rutty_AHK_Demo to KiTTY. It seems that the input from Rutty_AHK_Demo after login is unacceptable for KiTTY. I don't understand the reason. The work of Rutty_AHK_Demo and bouncer.exe is normal. I'm not sure if it's my fault.

In addition, I noticed that choose to stop sending recorded scripts. If choose to send scripts again, it seems that you need to send scripts from scratch. It seems that the script cannot be paused. Continue to send the script from the previously stopped location. It seems that what has been executed before does not need to be re sent.

The above are my tests and findings, which I hope will be useful to you.

dZ8Lx9OwX commented 1 year ago

hi

Just now I found something unexpected, which may help solve the problem. I just changed the status of the session window. It is possible to send messages from Rutty_AHK_Demo to the server through KiTTY, and get feedback normally.

I try to change the state of the current session window, for example, it is always visible. Then it can be sent normally from Rutty_AHK_Demo. But strangely, only possible to change the state for the first time.For example, enabling is always visible and sending is successful; The cancellation again is always visible, and the transmission is successful again.If you no change the window state, sending KiTTY is unresponsive. Even if the protection window is canceled or enabled, Rutty_AHK_Demo sending is normal??? But only when the status transmission changes. I don't know what happened.

After the window status is changed for the first time, the message sent does not include a carriage return and can be sent all the time. Once a carriage return appears, it is no longer allowed to send.

After changing the status, use vi as the command sent by the first Rutty_AHK_Demo to open the editor, and then Rutty_AHK_Demo sends pure digital information, which is not displayed in vi, but Rutty_AHK_Demo outputs relevant information. After Rutty_AHK_Demo sends letters, the digital information can be sent normally. The message with carriage return sent under vi is normal.

For the first change, the input information is valid. Even in the protected mode, Rutty_AHK_Demo can continue to send information to the vi editor, but window operation is not available.

It occurs many times in the test with vi, and the input vi does not display content updates, but the Rutty_AHK_Demo output window displays information. It seems that vi or the whole session window is suspended??

After startup and normal login, enter long characters such as "aaaaaaaaaaaaaaaa" in the session interface, and then change the size of the session window. In Rutty_AHK_Demo, information can be output?? If you change the window size many times, can many times receive information. In fact, there is no new input.

It seems that the information sent by Rutty_AHK_Demo will always be available as ordinary text editing content, But it can not always be used as an ordinary command??

I don't know what the specific reasons are, but I'm sure that the new script functions are available now, although they are not perfect. looking forward to the complete update.

I hope the above information can help.

dZ8Lx9OwX commented 1 year ago

Hi

I also compared the functions of the scripts related to RuTTY and KiTTY .

When using Rutty_AHK_demo and bouncer.exe to test RuTTY and KiTTY at the same time, the two performances are the same. Because bouncer.exe only does simple echo, it seems nothing unusual.But when connecting to a real server, it seems very different.

The Rutty_AHK_demo can be modified simply by removing bouncer.exe related functions, and then specifying the rutty to connect to a real server. At least I modified it this way. I don't know whether it is completely correct, but it can work.

RuTTY does not have the function settings that are always visible or protected, so I cannot use the modified Rutty_AHK_demo normally. The Rutty_AHK_demo can only receive the display.I can't find any more instructions for RuTTY to use the new script function.

All the tests of KiTTY and the modified Rutty_AHK_demo are as mentioned above. KiTTY can be fully used to connect to the real server using Rutty_AHK_demo, just like the connection with bouncer.exe. At least I don't know what the problem is. I don't rule out the possibility of problems in script modification.

Supplement: When linking only, the change of the maximum and minimum window will not result in the change of Rutty_AHK_demo output information. You need to manually drag to change the window size.the window state is not changed circularly. As long as it is minimized and then restored, the window title (ONTOP) mark changes, Rutty_AHK_demo can also be normally output to KiTTY and sent to the server.

Rutty AHK Demo and KiTTY's AHK mode exchange information,used to test the implementation of KiTTY related script functions. Personally, I think this method is feasible, but I did encounter some unexpected problems.

Look forward to more and better testing to help KiTTY test its functions. Make KiTTY more sexy.