最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Script for send texthttp file to Indy server - Stack Overflow

programmeradmin4浏览0评论

I have SW with Indy v.8 HTTP server, which listen on IP and PORT number. I am able to connect to this server by Telnet and send simply text eg. one word to this server. But problem is that I am not able to send more rows of text (with line separators) eg:

Hello
How are yo
Buy

Could you advise me please solution for script or any solution which connect to Indy HTTP server and sent sequence of text and disconnect? I need it for tests. Thank you for your help.


UPDATE

This very old version of Indy server is embeded in unmaintaned larger SW bought 3 years ago. But this SW is exelent and still almost fully functional. Due to some functionality stopped working, I am trying to resolve this lost functionality where it needs send HTTP/text string to IP and port of Indy V.8 server. I suppose that the string could look like this (IP adreses are not real ones):

POST /request=11139, hostIP=37.188.184.127 HTTP/1.1
Post: 213.220.250.193

I would like to find the simply way if it is syntax correct and how to test it by the most easiest way. I do not know how to activate ECHO in Telnet, because when I connect to Indy server, there is only blinked cursor in left upper corner and typed characters are invisible.

This planned test is first step, second is to make vulnerability treatment for this old Indy server by external HW component.

I was not fully sucessful to find documentation for Indy server, which is fully clear for me. Thank you for your understanding and thank you for any help and ideas how to do it easy.

I have SW with Indy v.8 HTTP server, which listen on IP and PORT number. I am able to connect to this server by Telnet and send simply text eg. one word to this server. But problem is that I am not able to send more rows of text (with line separators) eg:

Hello
How are yo
Buy

Could you advise me please solution for script or any solution which connect to Indy HTTP server and sent sequence of text and disconnect? I need it for tests. Thank you for your help.


UPDATE

This very old version of Indy server is embeded in unmaintaned larger SW bought 3 years ago. But this SW is exelent and still almost fully functional. Due to some functionality stopped working, I am trying to resolve this lost functionality where it needs send HTTP/text string to IP and port of Indy V.8 server. I suppose that the string could look like this (IP adreses are not real ones):

POST /request=11139, hostIP=37.188.184.127 HTTP/1.1
Post: 213.220.250.193

I would like to find the simply way if it is syntax correct and how to test it by the most easiest way. I do not know how to activate ECHO in Telnet, because when I connect to Indy server, there is only blinked cursor in left upper corner and typed characters are invisible.

This planned test is first step, second is to make vulnerability treatment for this old Indy server by external HW component.

I was not fully sucessful to find documentation for Indy server, which is fully clear for me. Thank you for your understanding and thank you for any help and ideas how to do it easy.

Share Improve this question edited Mar 24 at 14:56 Remy Lebeau 601k36 gold badges507 silver badges851 bronze badges asked Mar 20 at 7:35 Tomas RaTomas Ra 11 bronze badge 0
Add a comment  | 

1 Answer 1

Reset to default 0

You are sending non-HTTP text to an HTTP server. Obviously, that will make the server not process your text correctly, which would easily explain your problem. Neither of the examples you provided are valid HTTP requests.

Try something more like this instead:

POST /?request=11139 HTTP/1.1
Host: 213.220.250.193
Content-Length: 24

Hello
How are yo
Buy

Assuming:

  • 213.220.250.193 is the IP you are connecting to

  • you are using CRLF (\r\n) line breaks in the text body:

    Hello (5) + CRLF (2) + How are yo (10) + CRLF (2) + Buy (3) + CRLF (2) = 24.

Also, you did not indicate which port exactly the HTTP server is actually listening on. Is it 80, 443, or something else? If it is not a standard HTTP port, then you need to include the actual port number in the Host request header.

Also, does the HTTP server use SSL/TLS encryption for HTTPS? If so, you will not be able to use the TELNET app to communicate with the server, since you can't manually type out the required SSL/TLS commands by hand.

That being said, you really should consider using an existing tool like curl or postman to send valid HTTP/S requests to a server. Both can be scripted for automated testing.

Or, you can write your own client app using Indy's TIdHTTP component.

发布评论

评论列表(0)

  1. 暂无评论