flat assembler
Message board for the users of flat assembler.

Index > Main > Exe to return a value

Author
Thread Post new topic Reply to topic
FireAndIce



Joined: 20 Dec 2007
Posts: 6
FireAndIce 06 Apr 2010, 00:55
hello everyone

Need a little help here since I'm so close to pulling out my hair Shocked

A previous student in my lab wrote a program. This program is updating a box within itself to one of 4 possible pictures.

Now I am writing a program, however, I also need access to this information. Unfortunately, our previous student did not write a makefile, or readme instructing us on how to compile or run his project

So now we are left with only his Executable and are trying to obtain that information from his program. Is there some way to modify/change his program so that it writes to some file the same information it is updating so that our program also has access to it.

thanks in advance for any tips or help you might have!
Post 06 Apr 2010, 00:55
View user's profile Send private message Reply with quote
score_under



Joined: 27 Aug 2009
Posts: 27
score_under 06 Apr 2010, 01:00
If the source is there, it's probably not that much of a puzzle to compile. At the moment, your post is a little vague, so I have no idea even where to start. If there's no sensitive info, uploading source or EXE could help a great amount.
Post 06 Apr 2010, 01:00
View user's profile Send private message Reply with quote
FireAndIce



Joined: 20 Dec 2007
Posts: 6
FireAndIce 06 Apr 2010, 02:13
The source is hundreds of Matlab and C++ files.

The program reads emg signals from a human arm and shows a picture showing what position your hand is in.

Here is an image of his program. The upper right hand corner is the part I'm interested. When his program runs it changes to display one of 5 possible pictures.

Image

Here are the possible pictures. I included all of them together. But when his program runs, only one is displayed in the box depending on what position the persons hand is in.

Image

Really, the information I want is simple. When his arm shows the "Spherical Grasp" picture, I need the number 0 written to a file. When it shows "Key", I need the number 1 written to some file. "Cylindrical" should have 2 written to same file, and the "Disk" picture should write 4 to some file. thats it!!

we've tried to contact the previous student but his contact info is out of date. otherwise it would be trivial to change his source, recompile and we'd be done

thanks again for any help(soory for the size of the images!)
Post 06 Apr 2010, 02:13
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko 06 Apr 2010, 03:15
Every program has about dialog commonly.
And this one too: "Help" submenu "About" must be in.
Patching, we put your code instead BUT there is nothing to work with as ou gave pics only.
Post 06 Apr 2010, 03:15
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko 06 Apr 2010, 03:20
informal: i found board time is not summer-time set
Post 06 Apr 2010, 03:20
View user's profile Send private message Reply with quote
FireAndIce



Joined: 20 Dec 2007
Posts: 6
FireAndIce 06 Apr 2010, 08:42
edemko wrote:
Every program has about dialog commonly.
And this one too: "Help" submenu "About" must be in.
Patching, we put your code instead BUT there is nothing to work with as ou gave pics only.


I don't understand what you're saying. The "About" menu only has our lab name and the student's name.

could anyone else help me with my problem?
Post 06 Apr 2010, 08:42
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 06 Apr 2010, 09:19
maybe yçou can find the stundent, and ask him the source code.
if you still have the source code, then, try to compile it.
and then, try to modify it.

under windows, there is a getpixel fucntion, maybe you can temporarily use it as a capture of the image in the rectangle.
Post 06 Apr 2010, 09:19
View user's profile Send private message Visit poster's website Reply with quote
FireAndIce



Joined: 20 Dec 2007
Posts: 6
FireAndIce 07 Apr 2010, 00:23
We have the source code and it is a tangled mess. We've tried for the past month to compile/link all the Matlab and C++ files into the final executable with no success.

I've tried opening the executable with Ollydbg to check when it's updating the box with the pictures, but can't seem to locate the specific lines. Also, I wouldn't know how to change it so that it writes to some text file EVEN if I did find the right lines.

Any help or other ideas?
Post 07 Apr 2010, 00:23
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 07 Apr 2010, 01:13
Are the images included inside the executable? If not you could hook CreateFile and when you detect that one of the images is about to be opened then you execute your desired actions.
Post 07 Apr 2010, 01:13
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko 08 Apr 2010, 03:03
FireAndIce, could you upload an executive
Post 08 Apr 2010, 03:03
View user's profile Send private message Reply with quote
score_under



Joined: 27 Aug 2009
Posts: 27
score_under 08 Apr 2010, 03:58
edemko wrote:
FireAndIce, could you upload an executive

Or rather, an executable.
Post 08 Apr 2010, 03:58
View user's profile Send private message Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 08 Apr 2010, 04:13
You can easily enumerate the windows and hook (subclass)
the control to filter its messages and handle them accordingly.
The child ID is hard-coded so once you know it, it remains.
Post 08 Apr 2010, 04:13
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 08 Apr 2010, 07:52
disk grasp looks more like that:
Image
Post 08 Apr 2010, 07:52
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20306
Location: In your JS exploiting you and your system
revolution 08 Apr 2010, 07:54
edfed wrote:
disk grasp looks more like that:
But only if you are left-handed.
Post 08 Apr 2010, 07:54
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 08 Apr 2010, 08:01
only if you are right handed, don't forget you draw with right hand, and use left hand like a model. Laughing

for me it's not a problem, i can do anything with both hands, but not draw or write, even with Gimp... Very Happy
Post 08 Apr 2010, 08:01
View user's profile Send private message Visit poster's website Reply with quote
kalambong



Joined: 08 Nov 2008
Posts: 165
kalambong 17 Apr 2010, 10:24
edfed wrote:
for me it's not a problem, i can do anything with both hands, but not draw or write, even with Gimp... Very Happy
???

if you can't draw, i can dig that. i can't draw either.

but you can't write? oh my !
Post 17 Apr 2010, 10:24
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler 17 Apr 2010, 17:31
edfed can draw, did you not see this.
Post 17 Apr 2010, 17:31
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.