Quantcast
Channel: Chilkat Forum - latest questions
Viewing all 1061 articles
Browse latest View live

send email with base64 encoded attachment

$
0
0

Hi,

i have to send encrypted and signed edifact mails with an base64 encoded attachment. Encryption and signing is working fine.

Now someone wrote me, that the attachment is not base64 encoded.

I use the chilkat.dll with powershell and add 1 attachment to every mail with: "$contentType = $email.AddFileAttachment($pathname)"

Is there a way to add the attachment as an base64 part ?

Regards Frank


Installing SMTPQ

$
0
0

Hello,

I am trying to install the 64bit version of SMTPQ on a win2016 server. I have downloaded the exe files from github and on see the "stopped" message when I click "Install and Sart" or "Start Service"

alt text

When I try to start the service from Services, I get this error alt text

Encrypt file using a stream for vb.net

$
0
0

I am trying to encrypt a file using streaming and vb.net. All the examples I have found only show how to encrypt text in a stream. I have been able to figure out how to get that to work on a file.

Basically as soon as the encryption is started it says finished. It creates a file call source.dmp.encrypted and the size is 0 KB

I added some output for troubleshooting but that didn't help. I am using the newest chilkat dll ( .net 4.0 ).

What am I doing wrong?

Here is what I have so far:

    Try
        Dim crypt As Chilkat.Crypt2 = New Chilkat.Crypt2
        Dim success As Boolean = crypt.UnlockComponent("****************************")
        If Not success Then
            MessageBox.Show(crypt.LastErrorText)
            Return
        End If

        crypt.CryptAlgorithm = "aes"
        crypt.CipherMode = "cbc"
        crypt.KeyLength = 256
        crypt.SetEncodedIV("0000000000000000", "hex")
        crypt.SetEncodedKey("abcdefghijklmnop", "ascii")
        Dim fsIn As FileStream = File.OpenRead("source.dmp")
        Dim fsOut As FileStream = File.Create("source.dmp.encrypted")

        crypt.FirstChunk = True
        crypt.LastChunk = False

        Dim encryptedChunk() As Byte
        'chilkat example says aes has a block size of 16 bytes
        Dim b() As Byte = New Byte(1023 * 16) {}
        Dim n As Integer

        While ((n = fsIn.Read(b, 0, b.Length)) > 0)

            If (n < b.Length) Then
                ' Don't encrypt the full 1024 bytes, only the amount read...
                Dim tmp() As Byte = New Byte((n) - 1) {}
                Dim i As Integer
                i = 0
                Do While (i < n)
                    tmp(i) = b(i)
                    i = (i + 1)
                Loop

                encryptedChunk = crypt.EncryptBytes(tmp)
            Else
                encryptedChunk = crypt.EncryptBytes(b)
            End If
            Console.WriteLine("Chunk Length=" + encryptedChunk.Length.ToString)
            fsOut.Write(encryptedChunk, 0, encryptedChunk.Length)
            crypt.FirstChunk = False
            'Console.WriteLine("Writing Chunk")

        End While

        fsIn.Close()
        ' Flush any remaining encrypted data.
        crypt.LastChunk = True
        Dim empty() As Byte
        encryptedChunk = crypt.EncryptBytes(empty)
        If (encryptedChunk.Length > 0) Then
            fsOut.Write(encryptedChunk, 0, encryptedChunk.Length)

        End If

        fsOut.Close()

    Catch ex As Exception
        MsgBox(ex.Message)
    End Try

    MsgBox("Encryption finished")

http SynchronousRequest 9.5.0.39 vs 9.5.0.54

$
0
0

I have a problem when updating version of chilkat DLL (ActiveX).

I'm using Visual FoxPro 9 to create the .EXE and using the same one with both DLL's.

With version 9.5.0.39 all works fine an I have this LastErrorXml:

<ChilkatLog>
<SynchronousRequest>
    <DllDate>May  9 2014</DllDate>
    <ChilkatVersion>9.5.0.39</ChilkatVersion>
    <UnlockPrefix>ELABORHttp</UnlockPrefix>
    <Username>CTFSVR:Fernanda</Username>
    <Architecture>Little Endian; 32-bit</Architecture>
    <Language>ActiveX</Language>
    <VerboseLogging>1</VerboseLogging>
    <domain>servicos.portaldasfinancas.gov.pt</domain>
    <port>701</port>
    <ssl>1</ssl>
    <httpRequest>
        <httpVersion>1.1</httpVersion>
        <verb>POST</verb>
        <path>/sgdtws/documentosTransporte</path>
        <contentType />
        <charset>windows-1252</charset>
        <sendCharset>0</sendCharset>
        <mimeHeader>SOAPAction: envioDocumentoTransporte</mimeHeader>
    </httpRequest>
    <readTimeout>20</readTimeout>
    <connectTimeout>10</connectTimeout>
    <fullRequest>
        <httpRequest>
            <httpVersion>1.1</httpVersion>
            <verb>POST</verb>
            <path>/sgdtws/documentosTransporte</path>
            <contentType />
            <charset>windows-1252</charset>
            <sendCharset>0</sendCharset>
            <mimeHeader>SOAPAction: envioDocumentoTransporte</mimeHeader>
        </httpRequest>
        <HttpOptions>
            <AddHostHeader>1</AddHostHeader>
            <AllowCookieResponseCaching>0</AllowCookieResponseCaching>
            <AllowGzip>1</AllowGzip>
            <ConnectTimeoutMs>10000</ConnectTimeoutMs>
            <CookieDir />
            <FollowRedirects>1</FollowRedirects>
            <Login />
            <LoginDomain />
            <AuthMethod />
            <MaxResponseSize>0</MaxResponseSize>
            <MaxUrlLen>2000</MaxUrlLen>
            <PasswordLen>0</PasswordLen>
            <ProxyHostname />
            <ProxyLogin />
            <ProxyLogin />
            <ProxyAuthDomain />
            <ProxyPasswordLen>0</ProxyPasswordLen>
            <ProxyPort>80</ProxyPort>
            <ReadTimeoutMs>20000</ReadTimeoutMs>
            <RequiredContentType />
            <ResumePoint>0</ResumePoint>
            <SaveCookies>1</SaveCookies>
            <SendBufferSize>65535</SendBufferSize>
            <SendCookies>1</SendCookies>
            <SslProtocol>0</SslProtocol>
            <UnavailableRetryCount>0</UnavailableRetryCount>
            <UnavailableRetryWaitMs>2000</UnavailableRetryWaitMs>
        </HttpOptions>
        <a_synchronousRequest>
            <generateRequest>
                <httpRequestGenStartLine>
                    <authOnly>0</authOnly>
                    <hasMimeBody>1</hasMimeBody>
                    <genStartLine>
                        <startLine>POST /sgdtws/documentosTransporte HTTP/1.1</startLine>
                    </genStartLine>
                </httpRequestGenStartLine>
                <genHeaderSb>
                    <getMimeHeaderHttp>
                        <headerField>SOAPAction: envioDocumentoTransporte</headerField>
                    </getMimeHeaderHttp>
                </genHeaderSb>
                <addCookies>
                    <info>Not auto-adding cookies.</info>
                </addCookies>
                <addHostHeader>servicos.portaldasfinancas.gov.pt</addHostHeader>
            </generateRequest>
            <fullHttpRequest>
                <domain>servicos.portaldasfinancas.gov.pt</domain>
                <port>701</port>
                <ssl>1</ssl>
                <openHttpConnection>
                    <info>Opening connection directly to HTTP server.</info>
                    <httpHostname>servicos.portaldasfinancas.gov.pt</httpHostname>
                    <httpPort>701</httpPort>
                    <ssl>1</ssl>
                    <bUsingHttpProxy>0</bUsingHttpProxy>
                    <httpProxyAuthMethod />
                    <connect2>
                        <hostname>servicos.portaldasfinancas.gov.pt</hostname>
                        <port>701</port>
                        <ssl>1</ssl>
                        <connectImplicitSsl>
                            <connectSocket>
                                <domainOrIpAddress>servicos.portaldasfinancas.gov.pt</domainOrIpAddress>
                                <port>701</port>
                                <connectTimeoutMs>20000</connectTimeoutMs>
                                <connect_ipv6_or_ipv4>
                                    <info>Multi-threaded domain to IP address resolution</info>
                                    <AddrInfoList>
                                        <AddrInfo>
                                            <ai_flags>0</ai_flags>
                                            <ai_family>2</ai_family>
                                            <ai_socktype>0</ai_socktype>
                                            <ai_protocol>0</ai_protocol>
                                            <ai_addrlen>16</ai_addrlen>
                                            <ai_canonname>(NULL)</ai_canonname>
                                        </AddrInfo>
                                    </AddrInfoList>
                                    <info>connecting to IPV4 address...</info>
                                    <ipAddress>213.13.158.240</ipAddress>
                                    <connect>
                                        <info>Waiting for the connect to complete...</info>
                                        <myIP>192.168.1.94</myIP>
                                        <myPort>1634</myPort>
                                        <info>socket connect successful.</info>
                                    </connect>
                                </connect_ipv6_or_ipv4>
                            </connectSocket>
                            <cacheClientCerts>
                                <info>Found cert with private key.</info>
                            </cacheClientCerts>
                            <clientHandshake2>
                                <sendCertificateVerify>
                                    <info>Sending ClientCertVerify message...</info>
                                    <ModulusLen>257</ModulusLen>
                                    <DLen>256</DLen>
                                    <PLen>129</PLen>
                                    <QLen>129</QLen>
                                    <DPLen>129</DPLen>
                                    <DQLen>128</DQLen>
                                    <InvQLen>129</InvQLen>
                                    <signSslSig>
                                        <signatureSize>256</signatureSize>
                                    </signSslSig>
                                </sendCertificateVerify>
                                <checkServerCert>
                                    <info>Not verifying server certificate...</info>
                                    <info>Set the RequireSslCertVerify property to true to enable verification.</info>
                                </checkServerCert>
                                <info>Secure Channel Established.</info>
                            </clientHandshake2>
                        </connectImplicitSsl>
                        <connectElapsedMs>109</connectElapsedMs>
                        <info>HTTP connection succeeded.</info>
                    </connect2>
                    <connectTime>Elapsed time: 109 millisec</connectTime>
                    <startLine>POST /sgdtws/documentosTransporte HTTP/1.1</startLine>
                    <requestHeader>
                        <requestHeader><![CDATA[SOAPAction: envioDocumentoTransporte Host: servicos.portaldasfinancas.gov.pt:701 Content-Length: 3057]]></requestHeader>
                    </requestHeader>
                    <sendRequestHeader>
                        <sendHeaderElapsedMs>0</sendHeaderElapsedMs>
                    </sendRequestHeader>
                    <sendRequestBody>
                        <sendBodyElapsedMs>0</sendBodyElapsedMs>
                    </sendRequestBody>
                    <readResponseHeader>
                        <responseHeader><![CDATA[HTTP/1.1 200 OK X-Backside-Transport: OK OK Connection: Keep-Alive Transfer-Encoding: chunked Date: Tue, 22 Dec 2015 17:41:25 GMT Set-Cookie: gdtws_JSessionID=VTzpW5LFWGJWJT2yS4y8pTWq8LWfrBp8Z5JyMpLz2N8JmX8rPxmF!285905933; path=/; HttpOnly Content-Type: text/xml X-Client-IP: 10.186.1.65 Set-Cookie: SERVICOS-48386- G_SERVICOS_TCP701=HCIOLPAKLNAC; Expires=Tue, 22-Dec-2015 19:41:25 GMT; Path=/ ]]></responseHeader>
                    </readResponseHeader>
                    <statusCode>200</statusCode>
                    <statusText>OK</statusText>
                    <readResponseBody>
                        <info>Response has no Content-Length header.</info>
                    </readResponseBody>
                </openHttpConnection>
                <success>1</success>
            </fullHttpRequest>
        </a_synchronousRequest>
        <totalTime>Elapsed time: 281 millisec</totalTime>
        <info>Success.</info>
    </fullRequest>
</SynchronousRequest>
</chilkatlog>

With version 9.5.0.54 nothing works an I have this LastErrorXml:

<ChilkatLog>
<SynchronousRequest ms="140">
    <DllDate>Oct 29 2015</DllDate>
    <ChilkatVersion>9.5.0.54</ChilkatVersion>
    <UnlockPrefix>ELABORHttp</UnlockPrefix>
    <Username>WIN7-PC:win7</Username>
    <Architecture>Little Endian; 32-bit</Architecture>
    <Language>ActiveX</Language>
    <VerboseLogging>1</VerboseLogging>
    <domain>servicos.portaldasfinancas.gov.pt</domain>
    <port>701</port>
    <ssl>1</ssl>
    <httpRequest>
        <httpVersion>1.1</httpVersion>
        <verb>POST</verb>
        <path>/sgdtws/documentosTransporte</path>
        <contentType />
        <charset>windows-1252</charset>
        <sendCharset>0</sendCharset>
        <mimeHeader>SOAPAction: envioDocumentoTransporte</mimeHeader>
    </httpRequest>
    <readTimeout>20</readTimeout>
    <connectTimeout>30</connectTimeout>
    <computeRequestDataSize>
        <info>Request body is in a memory buffer..</info>
    </computeRequestDataSize>
    <approxRequestSize>3052</approxRequestSize>
    <fullRequest ms="140">
        <httpRequest>
            <httpVersion>1.1</httpVersion>
            <verb>POST</verb>
            <path>/sgdtws/documentosTransporte</path>
            <contentType />
            <charset>windows-1252</charset>
            <sendCharset>0</sendCharset>
            <mimeHeader>SOAPAction: envioDocumentoTransporte</mimeHeader>
        </httpRequest>
        <HttpOptions>
            <AddHostHeader>1</AddHostHeader>
            <AllowCookieResponseCaching>0</AllowCookieResponseCaching>
            <AllowGzip>1</AllowGzip>
            <CookieDir />
            <FollowRedirects>1</FollowRedirects>
            <Login />
            <LoginDomain />
            <AuthMethod />
            <MaxResponseSize>0</MaxResponseSize>
            <MaxUrlLen>2000</MaxUrlLen>
            <PasswordLen>0</PasswordLen>
            <ReadTimeoutMs>20000</ReadTimeoutMs>
            <RequiredContentType />
            <ResumePoint>0</ResumePoint>
            <SaveCookies>1</SaveCookies>
            <SendBufferSize>65535</SendBufferSize>
            <SendCookies>1</SendCookies>
            <UnavailableRetryCount>0</UnavailableRetryCount>
            <UnavailableRetryWaitMs>2000</UnavailableRetryWaitMs>
        </HttpOptions>
        <a_synchronousRequest ms="140">
            <generateRequest>
                <httpRequestGenStartLine>
                    <authOnly>0</authOnly>
                    <hasMimeBody>1</hasMimeBody>
                    <genStartLine>
                        <startLine>POST /sgdtws/documentosTransporte HTTP/1.1</startLine>
                    </genStartLine>
                </httpRequestGenStartLine>
                <genHeaderSb>
                    <getMimeHeaderHttp>
                        <headerField>SOAPAction: envioDocumentoTransporte</headerField>
                    </getMimeHeaderHttp>
                </genHeaderSb>
                <addCookies>
                    <info>Not auto-adding cookies.</info>
                    <sendCookies>1</sendCookies>
                    <cookieDir />
                </addCookies>
                <addHostHeader>servicos.portaldasfinancas.gov.pt</addHostHeader>
            </generateRequest>
            <fullHttpRequest ms="140">
                <domain>servicos.portaldasfinancas.gov.pt</domain>
                <port>701</port>
                <ssl>1</ssl>
                <openHttpConnection ms="93">
                    <info>Opening connection directly to HTTP server.</info>
                    <httpHostname>servicos.portaldasfinancas.gov.pt</httpHostname>
                    <httpPort>701</httpPort>
                    <ssl>1</ssl>
                    <bUsingHttpProxy>0</bUsingHttpProxy>
                    <httpProxyAuthMethod />
                    <socket2Connect ms="93">
                        <connect2 ms="93">
                            <hostname>servicos.portaldasfinancas.gov.pt</hostname>
                            <port>701</port>
                            <ssl>1</ssl>
                            <connectImplicitSsl ms="93">
                                <info>Clearing TLS client certificates.</info>
                                <connectSocket ms="31">
                                    <domainOrIpAddress>servicos.portaldasfinancas.gov.pt</domainOrIpAddress>
                                    <port>701</port>
                                    <connectTimeoutMs>30000</connectTimeoutMs>
                                    <connect_ipv6_or_ipv4 ms="31">
                                        <info>Multi-threaded domain to IP address resolution</info>
                                        <info>connecting to IPV4 address...</info>
                                        <ipAddress>213.13.158.240</ipAddress>
                                        <createSocket>
                                            <info>Setting SO_SNDBUF size</info>
                                            <sendBufSize>262144</sendBufSize>
                                            <info>Setting SO_RCVBUF size</info>
                                            <recvBufSize>4194304</recvBufSize>
                                        </createSocket>
                                        <connect ms="31">
                                            <info>Waiting for the connect to complete...</info>
                                            <myIP>192.168.1.75</myIP>
                                            <myPort>53945</myPort>
                                            <info>socket connect successful.</info>
                                        </connect>
                                    </connect_ipv6_or_ipv4>
                                </connectSocket>
                                <clientHandshake ms="62">
                                    <certChain>
                                        <subjectDN>C=PT, ST=LISBOA, L=LISBOA, O=AT - Autoridade Tributaria e Aduaneira, OU=ASI, CN=TestesWebServices</subjectDN>
                                        <subjectDN>DC=local, DC=ritta, CN=DGITA Issuing CA1</subjectDN>
                                        <subjectDN>DC=local, DC=ritta, CN=DGITA Root CA</subjectDN>
                                    </certChain>
                                    <cacheClientCerts>
                                        <info>Cached TLS client certificates.</info>
                                        <certChain>
                                            <subjectDN>C=PT, ST=LISBOA, L=LISBOA, O=AT - Autoridade Tributaria e Aduaneira, OU=ASI, CN=TestesWebServices</subjectDN>
                                            <subjectDN>DC=local, DC=ritta, CN=DGITA Issuing CA1</subjectDN>
                                            <subjectDN>DC=local, DC=ritta, CN=DGITA Root CA</subjectDN>
                                        </certChain>
                                    </cacheClientCerts>
                                    <clientHandshake2 ms="62">
                                        <readHandshakeMessages>
                                            <processHandshakeRecord>
                                                <processHandshakeMessage>
                                                    <processServerHello>
                                                        <MajorVersion>3</MajorVersion>
                                                        <MinorVersion>3</MinorVersion>
                                                        <cipherSuite>RSA_WITH_AES_256_CBC_SHA</cipherSuite>
                                                        <cipherSuiteNumeric>00,35</cipherSuiteNumeric>
                                                        <compressionMethod>0</compressionMethod>
                                                        <minAcceptableRsaKeySize>1024</minAcceptableRsaKeySize>
                                                    </processServerHello>
                                                </processHandshakeMessage>
                                            </processHandshakeRecord>
                                        </readHandshakeMessages>
                                        <info>Sending client-side certificate(s)...</info>
                                        <sendClientCertificates>
                                            <buildCertificatesMessage>
                                                <numCerts>3</numCerts>
                                            </buildCertificatesMessage>
                                        </sendClientCertificates>
                                        <buildClientKeyExchange ms="15">
                                            <buildClientKeyExchangeRsa ms="15">
                                                <modulus_bitlen>2048</modulus_bitlen>
                                                <bigEndian>1</bigEndian>
                                                <padding>PKCS 1.5</padding>
                                            </buildClientKeyExchangeRsa>
                                        </buildClientKeyExchange>
                                        <sendCertificateVerify ms="32">
                                            <info>Sending ClientCertVerify message...</info>
                                            <signatureSize>260</signatureSize>
                                        </sendCertificateVerify>
                                    </clientHandshake2>
                                </clientHandshake>
                                <checkServerCert>
                                    <info>Not verifying server certificate...</info>
                                    <info>Set the RequireSslCertVerify property to enable verification.</info>
                                </checkServerCert>
                                <info>SSL/TLS Channel Established.</info>
                            </connectImplicitSsl>
                        </connect2>
                    </socket2Connect>
                    <socketOptions>
                        <SO_SNDBUF>262144</SO_SNDBUF>
                        <SO_RCVBUF>4194304</SO_RCVBUF>
                        <TCP_NODELAY>0</TCP_NODELAY>
                        <SO_KEEPALIVE>1</SO_KEEPALIVE>
                    </socketOptions>
                    <info>HTTPS secure channel established.</info>
                </openHttpConnection>
                <connectTime>Elapsed time: 93 millisec</connectTime>
                <startLine>POST /sgdtws/documentosTransporte HTTP/1.1</startLine>
                <fullRequestHeader>
                    <requestHeader><![CDATA[SOAPAction: envioDocumentoTransporte Host: servicos.portaldasfinancas.gov.pt:701 Content-Length: 3052]]></requestHeader>
                </fullRequestHeader>
                <computeRequestDataSize>
                    <info>Request body is in a memory buffer..</info>
                </computeRequestDataSize>
                <sendRequestHeader>
                    <sendHeaderElapsedMs>0</sendHeaderElapsedMs>
                </sendRequestHeader>
                <sendRequestBody>
                    <idleTimeoutMs>20000</idleTimeoutMs>
                    <sendBodyElapsedMs>0</sendBodyElapsedMs>
                </sendRequestBody>
                <readResponseHeader ms="32">
                    <responseHeader><![CDATA[HTTP/1.1 500 Internal Server Error Content-Type: text/xml X-Backside-Transport: FAIL FAIL Connection: close Set-Cookie: SERVICOS-48386-SG_SERVICOS_TCP701=HCIOLPAKLNAC; Expires=Tue, 22-Dec-2015 19:54:58 GMT; Path=/ ]]></responseHeader>
                </readResponseHeader>
                <statusCode>500</statusCode>
                <statusText>Internal Server Error</statusText>
                <readResponseBody ms="15">
                    <info>Response has no content-length.</info>
                    <info>Non-chunked response with no Content-Length.</info>
                    <readingUntilServerClosesConnection ms="15">
                        <info>Any errors reported within this context are not actual errors...</info>
                        <numBytesRequested>5</numBytesRequested>
                        <error>Connection closed by peer.</error>
                        <passiveClose ms="15">
                            <info>Passive socket closing complete.</info>
                        </passiveClose>
                        <error>Failed to read beginning of SSL/TLS record.</error>
                        <error>Failed to receive more TLS applicaton data.</error>
                        <readNToOutput>Socket connection closed.</readNToOutput>
                    </readingUntilServerClosesConnection>
                </readResponseBody>
                <checkCloseConnection>
                    <info>Response includes connection:close header (or proxy-connection:close header)</info>
                </checkCloseConnection>
            </fullHttpRequest>
            <originalUrl>https://servicos.portaldasfinancas.gov.pt:701/sgdtws/documentosTransporte</originalUrl>
            <success>1</success>
        </a_synchronousRequest>
        <success>1</success>
    </fullRequest>
    <totalTime>Elapsed time: 140 millisec</totalTime>
    <info>Success.</info>
</SynchronousRequest>
</chilkatlog>

Anyone can explain me what's the diference between them, since there is the same code and the same service behind them.

Tried a DIFF tool but couldn't understand diferences.

chilkatftp2 version 2.6.11 no longer connecting - 201 error

$
0
0

We purchased a chilkat license in 2011 to embed a chilkatftp2 object in a VB6 program that would launch automatically each night at client sites and connect via ftp(s) to billing clearinghouses to upload claims and download reports. It worked fine all this time until a couple weeks ago when one of the clearinghouses changed upgraded their own ftp client. Now the vb6 app will not connect, and the error code the chilkatftp2 dll generates is 201, which according to documentation on the chilkat site has to do with ssl authorization.

I tried using a filezilla inteface to connect to that site, and it did so. The problem seems to be the chilkatftp2 ssl capability in our purchased version (2.6.11) is now out of date. We would like to keeo using our script, and the embedded chilkat reference, and would be happy to purchase what is needed.

My question is: is there a newer version of chilkatftp2 we can use/purchase, or a substitute? Our current vb6 code follows (again, it worked for years). Thanks - Matt

Private oFtp As New ChilkatFtp2

oFtp.HostName = ftps.xxxxx.com

oFtp.Username = UserNameyy

oFtp.Password = Pwordzz

oFtp.Passive = 1

oFtp.AuthTls = 1

success = oFtp.Connect

If success = 0 Then error = oFtp.ConnectFailReason 'error now is 201

Error Chilkat PHP Extension on Windows

$
0
0

Fatal error: Uncaught Error: Call to undefined function dl() in C:xampphtdocschilkatchilkat_9_5_0.php:16 I'm using php version 7.0 When running test.php , I have this error, I ask for your help. thank you ![alt text][1] ![alt text][2]

SSHTUNNEL CPU Load 100%

$
0
0

Hello!

I made a simple console application for port forwarding like plink. When i made 410 ports forwardings (run 410 copies of application) , everything is fine, CPU Load 0%. But when i made 450 ports forwardings, CPU Load is 100%. Each console application starts consuming 1-2% of the processor time. All port forwardings is working. Why is this happened?

program stineconnect;

{$APPTYPE CONSOLE}

{$R *.res}

uses
  System.SysUtils,Chilkat_v9_5_0_TLB,classes;

  var

success: Integer;
tunnel: TChilkatSshTunnel;
sshHostname: PWideChar;
sshPort: Integer;
waitForThreadExit: integer;
info:tstringlist;
cmd:string;
port,user,ip:string;

begin

if paramstr(1)<>'' then
begin
  info:=tstringlist.create;
  info.Delimiter:='@';
  info.DelimitedText:=paramstr(2);
  user:=info[0];
  ip:=info[1];
  info.Clear;
  info.Delimiter:=':';
  info.DelimitedText:=paramstr(8);
  port:=info[1];
  info.Free;

tunnel := TChilkatSshTunnel.Create(nil);
tunnel.UnlockComponent('Anything for 30-day trial.') ;

sshHostname := pchar(ip);
sshPort := strtoint(paramstr(4));

  success :=tunnel.Connect(sshHostname,sshPort);

if (success <> 1) then
  begin
   Exit;
  end;

  success := tunnel.AuthenticatePw(pchar(user),pchar(paramstr(6)));
if (success <> 1) then
  begin

    Exit;
  end;
  tunnel.DynamicPortForwarding:=1;
 success := tunnel.BeginAccepting(strtoint(port));
if (success <> 1) then
  begin
    Exit;
  end;

   ReadLn(cmd);
end;
end.

Can Chilkat be used with Xojo for iOS?

$
0
0

Is it possible for the Chilkat Xojo plugin to be used with Xojo iOS projects?


Issue uploading the file to remote server

$
0
0

Hi chilkat

I am using the chilkat software for the trail basis and I am planning to buy it.It seems pretty good software and will organized too. I am able to done most of things with it. Like connecting to FTP, getting files from FTP and some other things. But I stucked at a point where nothing seems to be working. I want to upload a directory to the remote directory. It is showing success in LastErrorText but no files is being uploaded to the remote server.

It is really important part of project and it should work. I also need to buy this fully once it fulfill the requirements. v9.5.0.68 • 29-May-2017 • MD5 Sum: 3064d5efd3e753ba8baf3c88be2d3ebc Chilkat PHP 7.0.* 64-bit

Many Thanks

AppendFiles is not invoking?

$
0
0

Hi, I am using the library on a Ruby on Rails project. I used basically the same code as in the example "(Ruby) Create a WinZip compatible AES Encrypted Zip".

Here is the code:

  zip = Chilkat::CkZip.new()
  success = zip.UnlockComponent("Anything for 30-day trial")
    if (success != true)
    @message.encryption_description = zip.lastErrorText() + "\n";
    exit
  else
    @message.encryption_description = "zero sucess!"
  end

  success1 = zip.NewZip("app/encryptedzipfiles/aes.zip")
  if (success1 != true)
    @message.encryption_description = zip.lastErrorText() + "\n";
    exit
  else
    @message.encryption_description = "first success!"
  end

  zip.put_Encryption(4)
  zip.put_EncryptKeyLength(128)
  zip.put_EncryptPassword("password")

  success2 = zip.AppendFiles("app/contents/*", true)
  if (success2 != true)
    @message.encryption_description = zip.lastErrorText() + "\n";
    exit
  else
    @message.encryption_description = "second sucess!"
  end

  success3 = zip.WriteZipAndClose()
  if (success3 != true)
    @message.encryption_description = zip.lastErrorText() + "\n";
    exit
  else
    @message.encryption_description = "third sucess!"
  end

However, after this method is called and I examine the aes.zip it has only 22 bytes, and no files in it to be unzipped.
There are three files under "app/contents/"

Could you provide some information about what could be wrong with this?

Thanks!!!

Android c++ gnutls play store rejection

$
0
0

I'm using the droid c++ libraries and we've just had a play store rejection (https://support.google.com/faqs/answer/6344084).

Does chilkat use gnutls under the covers?

I am a bit behind on the chilkat version so I should probably upgrade it anyway.

We use other native libs in the app too so I'm just trying to narrow it down, thanks for any assistance you can provide.

FTP2 AuthTls

$
0
0

Hi,

According to the documentation the AuthTls is still using TLS 1.0. Is this so? Our version of the chilkat dll is 9.5.0.0 runtime v4.0.30319. How can I be sure that I am using the latest TLS and SSL versions please?

Thanks, Justin

GetMailboxInfoXml() different size to what service provider says

$
0
0

Hi Guys...,

I've just moved a customers emails from a different host to my hosting provider... I knew they had a lot of emails in one email account so I thought I would do some experimenting...

I used GetMailboxInfoXml() and it reported back 6.9GB of emails, but when I logged into my hosts webmail it said they had 11gb of emails...

I checked the number of messages on the old host and the new host and the number of messages and folders were the same. I also checked the GetMailboxInfoXml() on the old host and it came back with a very similar figure to 6.9GB.

Any ideas why there could be this much discrepancy with what my provider is reporting back as space used and what the GetMailboxInfoXml() is reporting back as space used?

Regards

Steve

CkDateTime DiffSeconds returns 0 when negative is expected

$
0
0

CkDateTime::DiffSeconds returns 0 when it should have returned a negative value (according to the documentation):

CkDateTime ckdt1, ckdt2;
ckdt1.SetFromTimestamp("2016-01-01T12:00:00Z");
ckdt2.SetFromTimestamp("2017-01-01T12:00:00Z");
auto nSeconds1 = ckdt1.DiffSeconds(ckdt2); // nSeconds1 = 0
auto nSeconds2 = ckdt2.DiffSeconds(ckdt1); // nSeconds2 = 31622400

ckdt1 is obviously older than ckdt2, but does not return -31622400 as expected. No error is returned and put_VerboseLogging/put_DebugLogFilePath/lastErrorText does not indicate any issues.

This has been tested with version 9.5.0.68 of Chilkat C/C++ Libs for VC++ 12.0 XP / win32.

By the way I am missing a simple method to compare dates. Maybe DiffSeconds was meant for that purpose, but counting the exact difference ought to be slower than to simply determine which is newer/older/equal.

some extensions to CkTar ?

$
0
0

Hey!

Just wondering... do you plan to extend the functionality of the CkTar module? PHP being what it is, there's not a lot of options except to exec() which is problematic.

I was looking to see if we could use CkTar, but it seems a little limited for anything beyond basic: here's a directory, tar it.

What would be nice to see is: - addFile() - if this would retain the the full path within the tar as what was given to it originally. Unless it's a bug. if I do: addFile( 'path/to/file.ext' ) then the content of the tar when written just contains "file.ext" without the path.

basically providing the ability to add a file from the filesystem and at the same time specify the path that would be stored within the Tar would be fantastic.

File lists. For example, I might have a directory from which I want to add files to a tar. I want to keep all the relative paths in that directory, but I don't want to add all the files. I can achieve this in gnu by providing a dir and a list of relative file paths in that dir.

This would again all be covered by something like addFile( path_to_file, path_to_file_in_tar );

Any extensions to CkTar to assist with more than just adding whole directory routes would be great.

Thanks!


Chilkat not working on Raspberry 3 and Raspbian Jessy

$
0
0

Hello,

i installed Raspian on a RP3 and try to get chilkat working. I installed python and i think i have all the preq. But unfortunately its not working. The installChilkat.py works without an error but on testChilkat.py i get:

Traceback (most recent call last):

File "testChilkat.py", line 1, in <module> import chilkat File "/usr/local/bin/chilkat-9.5.0-python-3.4-armv7l-linux/chilkat.py", line 28, in <module> _chilkat = swig_import_helper() File "/usr/local/bin/chilkat-9.5.0-python-3.4-armv7l-linux/chilkat.py", line 24, in swig_import_helper _mod = imp.load_module('_chilkat', fp, pathname, description) File "/usr/lib/python3.4/imp.py", line 243, in load_module return load_dynamic(name, filename, file) ImportError: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/local/bin/chilkat-9.5.0-python-3.4-armv7l-linux/_chilkat.so)

I google for this error but nothing will help me. My System is up to date and has all current patches. I downloaded https://chilkatdownload.com/9.5.0.68/chilkat-9.5.0-python-3.4-armv7l-linux.tar.gz and i think its right version because i cant install other versions.

I appreciate any help, thanks.

Custom URLProtocol with local Socks5 proxy CkoHttp

$
0
0

Hi guys,

I tried to put all request from an application by the ssh tunnel via Chilkat library. Currently, the main problem is that custom URLProtocol can't use a local proxy for receiving data:

there some code snippets: ssh tunnel + local socks5 proxy (from example)

tunnel = CkoSshTunnel()

    var sshHostname: String? = Server.current?.ipAddress
    var sshPort: Int = 22

    success = tunnel!.connect(sshHostname, port: sshPort as NSNumber)
    if success != true {
        print("\(tunnel?.lastErrorText! ?? "unknown error")")
        return
    }

    success = (tunnel?.authenticatePw("some", password: "password"))!
    if success != true {
        print("\(String(describing: tunnel?.lastErrorText))")
        return
    }

    tunnel?.dynamicPortForwarding = true

    success = tunnel!.beginAccepting(1082)
    if success != true {
        print("\(String(describing: tunnel?.lastErrorText))")
        return
    }

    self.httpProxyServer.socksHostname = "localhost"
    httpProxyServer.verboseLogging = true
    httpProxyServer.basicAuth = true
    httpProxyServer.socksPort = 1082
    httpProxyServer.socksVersion = 5
    httpProxyServer.socksUsername = "test"
    httpProxyServer.socksPassword = "test"

    httpProxyServer.sendCookies = true
    httpProxyServer.saveCookies = true
    httpProxyServer.cookieDir = "memory"
    httpProxyServer.socksVersion = 5

and custom URLProtocol start method:

override func startLoading() {
    let userName = "test"
    let userPassword = "test"

    let userPasswordString = userName + ":" + userPassword
    let userPasswordData = userPasswordString.data(using: String.Encoding.utf8)
    let base64EncodedCredential:String = userPasswordString.base64Encoded()!
    let authString = "Basic \(base64EncodedCredential)"
    mutableRequest.addValue(authString, forHTTPHeaderField: "Proxy-Authorization")

    let configuration = URLSessionConfiguration.default

    var proxyConfiguration = [NSObject: AnyObject]()
    proxyConfiguration[kCFNetworkProxiesHTTPProxy] = "localhost" as AnyObject
    proxyConfiguration[kCFNetworkProxiesHTTPPort] = 1082 as AnyObject
    proxyConfiguration[kCFNetworkProxiesHTTPEnable] = 1 as AnyObject
    proxyConfiguration[kCFStreamPropertyHTTPSProxyHost] =  "localhost" as AnyObject
    proxyConfiguration[kCFStreamPropertyHTTPSProxyPort] =  1082 as AnyObject

    configuration.connectionProxyDictionary = proxyConfiguration

    let session = URLSession(configuration: configuration, delegate: self, delegateQueue: nil)
    dataTask = session.dataTask(with: mutableRequest)
    dataTask?.resume()
}

maybe somebody did the same thing before and can help me with it.

P.S. Excuse me for my English.

CkoSshTunnel (with dynamicPortForwarding) and custom URLProtocol

$
0
0

Hi guys,

I tried to put all request from an application by the ssh tunnel via Chilkat library. Currently, the main problem is that custom URLProtocol can't use a local proxy for receiving data:

there some code snippets: ssh tunnel + local socks5 proxy (from example)

tunnel = CkoSshTunnel()

    var sshHostname: String? = Server.current?.ipAddress
    var sshPort: Int = 22

    success = tunnel!.connect(sshHostname, port: sshPort as NSNumber)
    if success != true {
        print("\(tunnel?.lastErrorText! ?? "unknown error")")
        return
    }

    success = (tunnel?.authenticatePw("some", password: "password"))!
    if success != true {
        print("\(String(describing: tunnel?.lastErrorText))")
        return
    }

    tunnel?.dynamicPortForwarding = true

    success = tunnel!.beginAccepting(1082)
    if success != true {
        print("\(String(describing: tunnel?.lastErrorText))")
        return
    }

    self.httpProxyServer.socksHostname = "localhost"
    httpProxyServer.verboseLogging = true
    httpProxyServer.basicAuth = true
    httpProxyServer.socksPort = 1082
    httpProxyServer.socksVersion = 5

    httpProxyServer.sendCookies = true
    httpProxyServer.saveCookies = true
    httpProxyServer.cookieDir = "memory"
    httpProxyServer.socksVersion = 5

and custom URLProtocol start method:

override func startLoading() {
    let userName = "test"
    let userPassword = "test"

    let userPasswordString = userName + ":" + userPassword
    let userPasswordData = userPasswordString.data(using: String.Encoding.utf8)
    let base64EncodedCredential:String = userPasswordString.base64Encoded()!
    let authString = "Basic \(base64EncodedCredential)"
    mutableRequest.addValue(authString, forHTTPHeaderField: "Proxy-Authorization")

    let configuration = URLSessionConfiguration.default

    var proxyConfiguration = [NSObject: AnyObject]()
    proxyConfiguration[kCFNetworkProxiesHTTPProxy] = "localhost" as AnyObject
    proxyConfiguration[kCFNetworkProxiesHTTPPort] = 1082 as AnyObject
    proxyConfiguration[kCFNetworkProxiesHTTPEnable] = 1 as AnyObject

    configuration.connectionProxyDictionary = proxyConfiguration

    let session = URLSession(configuration: configuration, delegate: self, delegateQueue: nil)
    dataTask = session.dataTask(with: mutableRequest)
    dataTask?.resume()
}

maybe somebody did the same thing before and can help me with it.

P.S. Excuse me for my English.

c++ FTP2 Upload Percent

$
0
0

I have set the following:

_ftp.put_EventCallbackObject(&_ftpProgress);

_ftp.put_Hostname(_host.c_str());
_ftp.put_Username(_user.c_str());
_ftp.put_Password(_password.c_str());

_ftp.put_Passive(false);
_ftp.put_HeartbeatMs(250);
_ftp.put_SendBufferSize(4096);

But i am never getting calls to my FtpPercentDone method. Only AbortCheck

Error 0x80040154 when trying to run prog with Chilkat on other PC

$
0
0

Hi,

I'm trying to run a programm using on a other pc (not compiled on this machine) and I always getting error 0x80040154 (REGDB_E_CLASSNOTREG)! When I rename the ChilkatDotNet45.dll I'm getting file not found! Does somebody know how to register the .net dll? Running on x64 PC, solution is x86!

Thx!

Michael

Viewing all 1061 articles
Browse latest View live