EldoS | Feel safer!

Software components for data protection, secure storage and transfer

ElSimpleSSHClientX CRC errors

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#1344
Posted: 10/03/2006 10:54:42
by Ken Ivanov (EldoS Corp.)

Quote
I can provide the IP address of the server but not in a public forum. I can't, however provide a username and password.

It would be great, thank you. Please use the helpdesk system (http://www.eldos.com/support/ticket_list.php) to post the IP address. I suppose we will be able to reproduce the issue having just an address of your server.
#1345
Posted: 10/03/2006 11:18:35
by Mike Scriven (Standard support level)
Joined: 05/19/2006
Posts: 102

I posted the IP address to the help desk.

In the demo you need to add the following to CSSHDemoDlg::OnElSSHClientError function:

m_Error = true;

to avoid an endless loop in OnButtonConnect!
#1346
Posted: 10/03/2006 11:33:33
by Ken Ivanov (EldoS Corp.)

Quote
In the demo you need to add the following to CSSHDemoDlg::OnElSSHClientError function to avoid an endless loop in OnButtonConnect!

You are right, thank you. Fixed.
#1348
Posted: 10/03/2006 13:57:38
by Mike Scriven (Standard support level)
Joined: 05/19/2006
Posts: 102

I'm adding support for keyboard-interactive authentication. I can get the prompts using the following code:

CElStringListX prompts(Prompts);
long nCount = prompts.GetCount();
for (int i = 0; i < nCount; i++)
{
CString str = prompts.GetString(i);
TRACE(_T("Prompt %d = %s\n"), i, str);
}

but I can't figure out how to send the responses. Can you help me please.
#1350
Posted: 10/03/2006 15:54:38
by Ken Ivanov (EldoS Corp.)

You should add the responses to the string list pointed by Responses property, e.g.:
Code
CString username, password;
BSTR bstr;
long r;
// setting username
username = "testuser";
bstr = username.AllocSysString();
Responses->Add(bstr, &r);
SysFreeString(bstr);
// setting password
password = "testpass";
bstr = password.AllocSysString();
Responses->Add(bstr, &r);
SysFreeString(bstr);
#1351
Posted: 10/03/2006 16:16:30
by Mike Scriven (Standard support level)
Joined: 05/19/2006
Posts: 102

Thanks. This COM stuff is very confusing (I've never worked with it before so sorry if I seem a little obtuse).

My OnAuthenticationKeyboard function has the following parameters:
(LPDISPATCH Prompts, const VARIANT FAR& Echo, LPDISPATCH Responses)

so I cast Responses to an IElStringListX pointer and I get an abend (Access violation at address F9D1F0 in module "BaseBBox.dll". Read of address 000000A4), so I guess my code is incorrect (this is it):

CString username, password;
BSTR bstr;
long r;
// setting username
username = "testuser";
bstr = username.AllocSysString();
((IElStringListX*)Responses)->Add(bstr, &r);
SysFreeString(bstr);
// setting password
password = "testpass";
bstr = password.AllocSysString();
((IElStringListX*)Responses)->Add(bstr, &r);
SysFreeString(bstr);

Can you assist me yet again please.
#1352
Posted: 10/03/2006 16:36:55
by Ken Ivanov (EldoS Corp.)

Unfortunately, VC6 has certain problems with COM (particularly with IDispatch interface -- that's why we've implemented our own low-level wrappers in the demo we posted to the topic earlier). Please try to use the following code in your case:
Code
IElStringListX* intf = NULL;
HRESULT hr = Responses->QueryInterface(IID_IElStringListX, (void**)&intf);
if (SUCCEEDED(hr)) {
  // add the responses as described in my previous post
  intf->Release();
}
#1353
Posted: 10/03/2006 16:38:26
by Ken Ivanov (EldoS Corp.)

Just a note -- the responses should be added via 'intf' interface (obtained using QueryInterface() method).
#1354
Posted: 10/03/2006 17:16:40
by Mike Scriven (Standard support level)
Joined: 05/19/2006
Posts: 102

Unfortunately that doesn't work either (same result, abend). However, I added your code to the demo program and it works there. Here's the code that still fails:

IElStringListX* intf = NULL;
HRESULT hr = Responses->QueryInterface(IID_IElStringListX, (void**)&intf);
if (SUCCEEDED(hr))
{
CString username, password;
BSTR bstr;
long r;
// setting username
username = "testuser";
bstr = username.AllocSysString();
intf->Add(bstr, &r);
SysFreeString(bstr);
// setting password
password = "testpass";
bstr = password.AllocSysString();
intf->Add(bstr, &r);
SysFreeString(bstr);
intf->Release();
}

Thanks for all your help.
#1355
Posted: 10/03/2006 17:22:26
by Ken Ivanov (EldoS Corp.)

Quote
Unfortunately that doesn't work either (same result, abend).

Hmm, it's quite strange. Will try to find some workaround now.
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

Topic viewed 21806 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!