View Full Version : disabled button
Santa_barbiego
06-25-2006, 03:10 AM
How can I find, trace disabled button? What is the best and the fastest
method to do it
8)
Santa_barbiego
06-25-2006, 05:21 AM
Sorry, :) I'm trying to enable SAVE menu item not button. When I click save as.. option, pop up window Save as, then I put name and click button Save, than pop up messageBox - Demo version :). I don't now how to find, where this menu item is disabled.
WhyKing
06-25-2006, 04:43 PM
Based on your description there are two mostlikely cases here:
1) Program checks if it's in "demo" or "full" mode and it takes action based on that.
In this case actual 'save' code exist and could be enabled by patching, giving correct registration information or combination of those (case usually with proper public key cryptography implementatios, if registration routine is the target of attack).
2) Only thing implemented to "save as" action is to show that messagebox.
This is more tricky, only way is by patching. If you are really lucky (result depends a lot of from build environment and implementation) there can be found actual executable code to save files. In this case you only need to find way to enable it and patch. Mostlikely situation is that there doesn't exist actual code in demo version and so you would have to implement it by your self and make patch. This means you need to know how program stores information in memory and the fileformat which used for saved files.
In either case it's best start looking for how code ended up to that messagebox and identify which case you are dealing with. For case number 2 without code it usually isn't worth of effort.
ps.
3rd possible case could be that actual code exist to save but it is encrypted with secret key cryptography. In this case you would need to have correct registration code (assuming there isn't any fuckups in implementation). If you don't have access to one it would lead to same problem as in case 2 without actual code. Here though is second solution (brute force decryption key, but you sitll have the problem how to identify if you got it right) which is more time consuming (if strong cryptography is assumed) than reimplement "save" function.
Maybe EnableMenuItem helps :) (in case the code it's there)
perhaps bp on GetSaveFilename (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/commondialogboxlibrary/commondialogboxreference/commondialogboxfunctions/getsavefilename.asp) - might get you a bit closer to the nag screen
fileoffset
09-06-2006, 01:53 AM
G'day,
Is the program Delphi or VB or .Net perhaps ?
If so, common save code might look like this (c# style for easy reading):
if (SaveDialog.ShowModal == Button.OK)
{
* *// save everything to file
}
Perhaps your program does this:
if (SaveDialog.ShowModal == Button.OK)
{
* *if (fTrial == true)
* *{
* * * MessageBox("Go away!");
* * * return;
* *}
* *// save everything to file
}
It is very likely something like this, if so, your best bet is to find the MessageBox call either via debugging or deadlisting, and trace backwards.
This might become difficult if the app is MFC, otherwise you shouldn't have too much problem...
vBulletin® v3.6.4, Copyright ©2000-2016, Jelsoft Enterprises Ltd.