indy

How can I wait for a string from a server with IdTCPClient?

梦想的初衷 提交于 2019-12-01 00:55:34
I have a problem with IdTelnet (indy 10.1). I can't read the data from a server in Unicode mode. and now I want to write the telnet terminal with IdTCPClient. The server sometimes send one line and sometimes more and more lines. But there is not a fixed time between sending. Now my problem is that when I must read data from InBuffer. Or when I must use the ReadLn function to read the data from the server, how many times must I run the ReadLn? TIdTelnet is a multithreaded component. It has an internal thread that continuously reads from the socket, firing the TIdTelnet.OnDataAvailable event

Using INDY SMTPServer

老子叫甜甜 提交于 2019-12-01 00:05:37
following code is what i modified(to work with 10.5.8) form the sample in order to send email independently using the smtp client described in Indy Mail server following is from INDY smtpserver sample procedure TForm1.btnServerOnClick(Sender: TObject); begin IdSMTPServer1.active := true; end; procedure TForm1.btnServerOffClick(Sender: TObject); begin IdSMTPServer1.active := false; end; procedure TForm1.IdSMTPServer1MailFrom(ASender: TIdSMTPServerContext; const AAddress: string; AParams: TStrings; var VAction: TIdMailFromReply); begin // Here we are testing the MAIL FROM line sent to the server

Delphi w Indy 10: Unable to connect via TLS 1.2 w SSL “Best Practices” in place on web server

僤鯓⒐⒋嵵緔 提交于 2019-11-30 23:48:31
The question: How do we get Indy 10 to work with a web server that enforces the latest TLS 1.2 SSL Best Practices? The Best Practices are documented by Microsoft: https://technet.microsoft.com/library/security/ms12-006 Essentially, a chunk of ciphers, used across multiple TLS versions, are considered insecure. Note, this kb is from mid 2013, well before poodle. As a best practice, there are articles from the Delphi community related to the BEAST attack, that also propose disabling CBC based ciphers ( http://www.atozedsoftware.com/Intraweb/Blog/20120905.EN.aspx ) Summary of Best Practices: The

TCPserver without OnExecute event

跟風遠走 提交于 2019-11-30 22:29:14
I want to make a TCPserver and send/receive message to clients as needed , not OnExecute event of the TCPserver. Send/receive message is not a problem; I do like that: procedure TFormMain.SendMessage(IP, Msg: string); var I: Integer; begin with TCPServer.Contexts.LockList do try for I := 0 to Count-1 do if TIdContext(Items[I]).Connection.Socket.Binding.PeerIP = IP then begin TIdContext(Items[I]).Connection.IOHandler.WriteBuffer(Msg[1], Length(Msg)); // and/or Read Break; end; finally TCPServer.Contexts.UnlockList; end; end; Note 1: If I don't use OnExecute, the program raise an exception when

Delphi Indy - How to get SSL certificates for a SSL-TCP Client/Server link with Indy 10

送分小仙女□ 提交于 2019-11-30 20:53:11
问题 I'm completely new to SSL and these ciphering stuff but I need to make communicate client and server Delphi XE6 apps running on mobile devices. The TCP communication has to be safely ciphered. To start, I simply wrote the Delphi/Indy TIdTCPServer/TIdTCPClient based Win32 client and server exchanging strings. (Issued from the indy10clieservr demos found on SourceForge: svn://svn.code.sf.net/p/indy10clieservr/code/1_sample Simple String Exchange) I tried to modify them to cipher the

why does my D2009 exe produce emails with attachments named ATTnnnnn.DAT

拥有回忆 提交于 2019-11-30 20:16:07
Why does my D2009 exe produce emails with attachments named ATTnnnnn.DAT when the same source code compiled in D2007 produces emails with attachments correctly named with the original file name? I am using the respective Indy libraries that come with D2007 and D2009. Not having the original file name on the attachment prevents users from being able to double click the attachment to open it (typically attachments are Excel spreadsheets). Note: code is identical - just the compiler and Indy libraries vary. The attachment sent by the D2009 exe can be saved and renamed to say zzzz.xls and then

Is it possible to recompile the DataSnap packages in Delphi XE with a new/different version of Indy?

匆匆过客 提交于 2019-11-30 18:47:36
Okay -- we have an interesting problem. Some background: Our main application uses Indy 10. However, we take the Indy 10 source and fix bugs in it, recompile, and install our own set of Indy components. We are migrating to Delphi XE and want to start using DataSnap. DataSnap requires the "official, shipping" version of Indy which is incompatible with our customized version of Indy. Our DataSnap servers will be separate applications, but since we have our own Indy installed in the IDE, we can't "cross the streams". Okay, therefore, we are unable to use Delphi XE's DataSnap out of the box

Using INDY SMTPServer

只愿长相守 提交于 2019-11-30 18:32:01
问题 following code is what i modified(to work with 10.5.8) form the sample in order to send email independently using the smtp client described in Indy Mail server following is from INDY smtpserver sample procedure TForm1.btnServerOnClick(Sender: TObject); begin IdSMTPServer1.active := true; end; procedure TForm1.btnServerOffClick(Sender: TObject); begin IdSMTPServer1.active := false; end; procedure TForm1.IdSMTPServer1MailFrom(ASender: TIdSMTPServerContext; const AAddress: string; AParams:

Delphi w Indy 10: Unable to connect via TLS 1.2 w SSL “Best Practices” in place on web server

独自空忆成欢 提交于 2019-11-30 18:15:28
问题 The question: How do we get Indy 10 to work with a web server that enforces the latest TLS 1.2 SSL Best Practices? The Best Practices are documented by Microsoft: https://technet.microsoft.com/library/security/ms12-006 Essentially, a chunk of ciphers, used across multiple TLS versions, are considered insecure. Note, this kb is from mid 2013, well before poodle. As a best practice, there are articles from the Delphi community related to the BEAST attack, that also propose disabling CBC based

How do I use TIdTelnet to send commands?

元气小坏坏 提交于 2019-11-30 16:13:27
问题 I am trying to simulate the "new identity" button in Vidalia (the Tor GUI) from my program. I asked about that, based on Rob Kennedy's answer, I tried this in my application: IdTelnet1.Host:='127.0.0.1'; IdTelnet1.Port:=9051; IdTelnet1.Connect(-1); IdTelnet1.SendCmd('SIGNAL NEWNYM'); But it has not worked for me. Even after I send the command, I get the same proxy. I am using Indy 9. I don't know whether I don't know how to use TIdTelnet or don't know how to send that specific command. 回答1: