Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

password checker

kambasanakambasana Member Posts: 2
Hi,

I have a screen scraper made in c++, the problem is that it shows passwords and i need to add another IF statement that avoids textboxes with passwords, i think its called masked input textboxes.
Code is below, can anyone help?

[code]
// Get window text
int count, nItems;
BOOL bGot=FALSE;
CString strItem;
char winTxt[5000];
memset(winTxt, 0, 5000);

// Is it a ListBox
if(strcmp(szClassName, "ListBox") == 0)
{
CListBox lb;
lb.Attach(hwndFoundWindow);
nItems=lb.GetCount();
for(count=0; count < nItems; count++)
{
lb.GetText(count, strItem);
strItem+="
";
strcat_s(winTxt, strItem);
}
lb.Detach();
bGot=TRUE;
}

// Is it a ComboBox
if(strcmp(szClassName, "ComboBox") == 0)
{
CComboBox cb;
cb.Attach(hwndFoundWindow);
int nItems=cb.GetCount();
for(count=0; count < nItems; count++)
{
cb.GetLBText(count, strItem);
if(cb.GetCurSel() == count)
strItem+=(" <- Selected");
strItem+="
";
strcat_s(winTxt, strItem);
}
cb.Detach();
bGot=TRUE;
}

// Catch all, if we haven't got the window's text yet :(
if(!bGot)
SendMessage(hwndFoundWindow, WM_GETTEXT, 5000, (LPARAM)winTxt);

SetDlgItemText(hwndDialog, IDC_WINDOWTEXT_EDIT, winTxt);

return lRet;
}
[/code]


Comments

  • kambasanakambasana Member Posts: 2
    I had a look around, i need to GetClassName, then compare that against any EDITcontrol, if true GetStyle equal to ES_PASSWORD flag then set the output to blank so that if you use spy it will not show the password.
    How can i do this in code?


Sign In or Register to comment.