|
Shouting is about GLOBAL WARMING?
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Hi all,
I'm not sure if this is the right place to post this question, but I have a problem in C++ app i'm developing. I have developed a little tool that reveals hidden passwords in CEdit (EDIT class) objects, but now I need to extract passwords that have been filled in in web pages in boxes. Does anyone know how to do this? I was hoping that Spy++ would show me that Firefox/Explorer renders these controls by inserting EDIT class objects as windows, but it doesn't seem to do this...
This has been bugging me for ages- any ideas anyone?
Thanks in advance!
|
|
|
|
|
I believe that little feature was fixed in one of the XP service packs, and I believe that modern browsers use RichEdit or similar controls (hence the ability to drag-n-drop text with them).
Cannot help you with an easy way to do it - the only way I can think of is to hook into the process and get the text directy (WM_GETTEXT ) or get access to the internal buffer(s) used by the edit control and extract the text from there.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
So the browser IS actually creating a rich edit control? If so that's good news because I have a dll I can inject into the process to acquire the password, this lets me skip over XPs new security updates. What I need now is some way of getting the HWND of an edit control in a webpage- when I look at the page with spy++, I just see one window for the entire page- no children!
any ideas?
|
|
|
|
|
It is possible that the page being rendered is not placing/positioning real controls on the client area, but simply drawing onto it using off-screen controls, similar to how you print something. If they are using real controls (which I think that they are), you should be able to figure out the HWND of the parent/container and then enumerate windows looking for password-styled controls.
Other than that, no ideas...
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
|
Hai All,
I'm creating an onscreen keyboard.In that I'm using the techinique of changing the focus from the keyboard window to the last focused window after the mouse click on the keyboard window and then sending the input using the keybd_event().
It is working good with notepad.
My problems are
1.It is not working with WordPad.
2.the oter problem is that if I'm having a password dialog created in MFC and while I'm trying to enter the password using the keyboard window,only thye current key entered is shown.the earlier one if exits is replaced.So I tried to store the last cursor postion and retrive it to set as soon as the password window getthe focus(ie,after the keybord windows button is pressed).But I'm not able to set the cursor to the previous postion of password dialog.
Please tell me some way to fix it.Or if my logic is inadiquate please refer me some suggestions or links to do that.When I checked the default Onscreen Keyboard supplied by "Windows" and it works really good.
Please tell me some way to proceed.
Thanks and regards
Robs Here
|
|
|
|
|
I'd recommend never letting your on screen keyboard take the focus in the first place, have it behave as a persistent ontop popup. I've only done keyboard replacement stuff on WinCE where things are a little different but in that case you register your Software Input Panel as a special kind of control and Windows loads it and displays it for you. I guess there is probably something similar on whatever version of windows you're using and you should probably go that way to get it to behave properly. Also you need to insert your key presses into the keyboard chain as if you were operating a real keyboard, keybd_event() may or may not be right for this, otherwise IME keyboard handling and other stuff that might be in the keyboard chain like global hotkeys will not work. I'd check the documentation for Text Services Framework as a reasonable place to start.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
I use these code for register my dll.
STARTUPINFO si;<br />
PROCESS_INFORMATION pi;<br />
<br />
ZeroMemory(&si, sizeof(si));<br />
si.cb = sizeof(STARTUPINFO);<br />
si.dwFlags = STARTF_USESHOWWINDOW;<br />
si.wShowWindow = SW_SHOW;<br />
ZeroMemory(&pi, sizeof(pi));<br />
sprintf(pszCmdLine, "regsvr32.exe \"%s\"", m_COMPath);<br />
if(CreateProcess(0, pszCmdLine, 0, 0, FALSE, CREATE_DEFAULT_ERROR_MODE | NORMAL_PRIORITY_CLASS, 0, 0, &si, &pi))<br />
{<br />
CloseHandle(pi.hProcess);<br />
CloseHandle(pi.hThread);<br />
}
It work fine and every time I register it will pop up message box from regsvr32.exe that tell about the registration successful.
But my I don't want to show this message in my program.
How can I avoid this message box?
|
|
|
|
|
I just checked the help of regsvr32 but I never tried this myself.
I think if you pass "/s" as a commandline parameter to regsvr32, it will no display the msg box (silent mode). Just try it and tell me if that works, I would be interested.
|
|
|
|
|
You are correct - the usage is:
Usage: regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname
/u - Unregister server
/s - Silent; display no message boxes
/i - Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall
/n - do not call DllRegisterServer; this option must be used with /i Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
every thing work fine
Thanks a lot.
|
|
|
|
|
You can take the help on command on command prompt by typing the command followed by "/?".
eg. dir /?
Regards,
Paresh.
|
|
|
|
|
Is this legal:
char *text;
text="";
text="hello";
It's been a long time since i had to do with strings... (no alternative wanted, this is pure C without any libs)
|
|
|
|
|
It's legal. text first points to an empty string, and then to a "hello".
Just don't attempt to change the string that text is pointing to
|
|
|
|
|
IMHO, it is kinda legal - constant strings usually use constant memory, but you are assigning them to a non-const pointer.
That code will compile on lots of compilers, if that means "legal" to you.
Remember that a pointer and an array are two different things - a pointer points to a location in memory (which may or may not be valid), while an array IS a valid location in memory.
Since your pointer is not set up (initially) to point to any valid memory, you could not strcpy(...) into it without risking a crash or other problems.
char *text;
text="";
text="hello";
char *text;
strcpy( text, "some string" );
char textarray[ 64 ];
char *text = textarray;
strcpy( text, "some string" );
strcpy( textarray, "another string" ); Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Oh yes, that's it. Thanks James.
|
|
|
|
|
Related topic! Ofcourse another "root"
James, Imagine I'm initializing a char-string array statically like :
char chArray[MAX_LEN][MAX_LEN]={"ONE","TWO","THREE".....};
This being declared/defined globally makes no issues. Now I want this be wrapped up inside a class. and still wanting to do it in a single line. like the above. You cannot certainly init it inside a class' declaration.
and if you take this to the constructor, you would lose the declaration(data memeber!) inside the class. so how to go? Should I use refs inside the constructor?
|
|
|
|
|
VuNic wrote: char chArray[MAX_LEN][MAX_LEN]={"ONE","TWO","THREE".....};
That still creates a single linear block of memory, and the indexes are just calculations to index into it. So you can still allocate all of it in one shot (size == MAX_LEN * MAX_LEN), and still use multiple bracket operators to get specific memory locations and initialize those locations. You could (theoritically) initialize all of those locations them on a single line, although not a single statement.
But then again I might not be understanding your question correctly...
If you need to "hide" access to chArray , you can place it into a namespace and then have the class manipulate it in that namespace...
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
I want to know, after registration of COM server object to windows and if i want to ship that object to other machine, whether that object will carry registration information(e.g. CLSID registered with that object) or not?
If it is not carring this information then is another CLSID generated after i installs that object to other machine than the CLSID that of previous machine?
If it is true then how windows maintains GLOBAL UNIQUE IDENTIFIER for that COM object.
|
|
|
|
|
sachinjegaonkar wrote: GLOBAL UNIQUE IDENTIFIER
Here[^] is some information on this topic.
|
|
|
|
|
A GUID comprises of information taken from the resources on your machine, however the algorithm for creating GUID's is criticized worldwide for the way it is implemented. Every machine has a network card MAC address. This network cards MAC address provides the basis of creation of GUID. Then the algorithm uses some other details to create a unique ID. The ID is itself not guaranteed to be unique but the probability of two ID's to be same is very low.
The CLSID does not change for a object from machine to machine. It remains the same.
I hope this helps you.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi
COM server's CLSIDs are inside them.
these CLSIDs are set with the COM server when it is developed.
So it is developers work, When any body installs a COM server
that CLSID which is embed inside the COM server is written in the
registry of the computer where that server is being installed.
|
|
|
|
|
Hello all i have made a sdi application having view derived from CFormView Class. In that class i have made a list control. I have also made ui thread which performs certain task and then has to return some CString and int values using which we fill our list control. now i want to know how do i pass these values to my list control class.
Can anybody please tell me the way with the code
thanks in advance...
|
|
|
|
|
neha.agarwal27 wrote: now i want to know how do i pass these values to my list control class.
Allocate them on the heap in the view class. Pass that address to the thread.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|