When am trying to open any .EXE file am getting information in encoded form. Any idea how to see the content of an .EXE file ????
4 Answers
I need to know what Database tables are used in the particular .EXE.
Ah, now we are getting closer to the real question.
It is probably much more productive to ask the targeted databases about the SQL queries being execute during the run, or a top-ten shortly afterwards.
The table-names might not be hard-coded recognizably as such in the executable. They might be obtained by a lookup, and some fun pre-fixing or other transformation might be in place. Admittedly they like are clear text.
Easiest is probably to just transfer to a Unix server and use STRINGS on the image.
I want to include the source here with but that failed, and I cannot find how to attach a file. Below you'll find a link OpenVMS macro program source for a STRINGS like tool. Not sure how long the link will survive.
Just read for instructions, save (strings.mar), compile ($ MACRO strings), link ($link strings), and activate ($ mcr sys$login:strings image_to_test.exe)
OpenVMS Macro String program text
Good luck! Hein

- 1,453
- 8
- 8
-
Hi Hein..Please tell me your mail ID..We can discuss on this together.. – Aksh Akshay Sep 20 '17 at 08:56
-
It's a test. If you cannot figure out my Email(s), then you are not worthy. Good luck. – Hein Sep 20 '17 at 12:18
-
Aksh - try 'Hein van der Heuvel' @heinheuvel on Twitter. Hein - do I pass the test?!? Am i now worthy?!?? – Richard Hammond Mar 10 '18 at 17:22
Use analyze/image
to view the contents of an executable image file.

- 15,314
- 5
- 39
- 57
-
I need to find the tables used in that particular .EXE......Is there any possibility to find the tables within the .EXE ????? – Aksh Akshay Sep 08 '17 at 14:58
-
@AkshAkshay What means "find": PSECT and offset? Display in a formatted grid? ... What means "tables": Global symbol table (GST)? References to other (shareable) images? Encoded database tables? Multidimensional arrays? ... – HABO Sep 08 '17 at 16:46
-
Hmm....@Habo: I need to know what Database tables are used in the particular .EXE. I will tell you the scenario.. A report is being generated using an .EXE. So i need to find out the database tables which where used in that .EXE..so that I can use those tables for my data extraction....Is there any possibility to know what database tables are used in a particular .EXE ????? – Aksh Akshay Sep 09 '17 at 10:34
-
So I assume you are looking for a known string pattern in the .EXE file. To name a couple of utilities I would try: ```$ SEARCH/FORMAT=DUMP``` filespec search-string, ```$ DUMP``` filespec, ```$ EDIT/TPU``` filespec (or any other editor which can handle 512 byte records) or (you didn't say which platform) on I64 ```$ ANALYZE/IMAGE/SEGMENT=NUMBER=```n filespec, where n is any ```LOAD``` segment without the flag ```X```, ```Nwr```, ```Nwf``` and with file size != 0. – user2116290 Sep 09 '17 at 11:47
-
```ANALYZE/IMAGE```by default formats the internal structure of an executable image: the most importat ones are image sections on Alpha and program segments on I64. Only on I64 you can ask analyze to show you the contents of these items, the program segments. – user2116290 Sep 09 '17 at 11:55
-
If the "tables" are simply RMS files being accessed by the image you can use the (undocumented) `set watch file/class=major_function` command. The file XQP will display all file open and close operations when you run the application. (IIRC, `set watch file/class=none` should turn it off.) – HABO Sep 12 '17 at 01:42
I'm guessing you are trying to look in the EXE because you do not have access to the source. I do something like this:
$ dump/record/byte/hex/out=a.a myexe.exe
Then look at a.a with any text editor (132 columns). The linker groups string literals together, and they are mostly near the beginning of the EXE, so you don't have to look to far into the file. Of course this only helps if the database references are string literals.
The string literal might be broken across a block (512 byte) boundary, so if you use search in your editor, try looking for substrings.
Aksh - you are chasing your tail on this one. Its a false dawn. Even if you could (and you can't) find the database tables, you will need the source of the .exe to do anything sensible with it, or the problem you are trying to solve. Its possible to write a program which just lists all the tables in a database without reading any of 'em. So you could spend and awful lot of effort and get nowhere. Hope this helps

- 105
- 8