Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

REVERSE ENGINEERING

Posted on 2003-10-31
12
Medium Priority
?
330 Views
Last Modified: 2010-04-17
I have a set of dlls which my client is using on his application. Now as the company has stopped giving support for this package. i have to manage the application on my own. But thwe problem is that all the cfunctions etc are in dlls.

The Dlls have been written in VB.

Any guess on how i can do that..

Thanks
0
Comment
Question by:pg_india_job
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9656443
Apparantly No its not possible at the most you will get all the classes, their public methods and properties. getting the logic is not possible.
0
 
LVL 9

Accepted Solution

by:
bhagyesht earned 500 total points
ID: 9656456
to get the classes, methods and properties create a blank vb project add the reference of the dll and press F2 this will open the object browser select your dll from the dropdown and u can see the classes, methods and properties
0
 
LVL 5

Assisted Solution

by:fantasy1001
fantasy1001 earned 200 total points
ID: 9656484
You can add a reference to the dll. But then you need to know what is the method, event in it
Or
Dim objCOMDLL as Object
Set objCOMDLL = CreateObject("myDll.myDllClass")

Thanks,
~ fantasy ~
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 9

Expert Comment

by:bhagyesht
ID: 9656520
fantasy1001: "But then you need to know what is the method, event in it" this can be got using the object browser. what u cant get is the logic in the method
0
 
LVL 3

Assisted Solution

by:y2kwacko
y2kwacko earned 200 total points
ID: 9662620
pg_india_job,  The only program I know of that can "spy" on a VB programmed application is made by Numega Software (http://www.numega.com/) and is called Smart Check.  Assuming these dll's are not that complex it is probably best to either have them reprogrammed in house or purchase an alternative from a company who does support their product.

Regards,
Kevin
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 9662816
H ave you contacted the company to see if they will provide the source code?

mlmcc
0
 
LVL 5

Assisted Solution

by:DeerBear
DeerBear earned 100 total points
ID: 9663754
Hi,

I don't want to give you false expectations, but some times
VB programs are compiled in P-Code. If this is the case,
then you have a reasonable chance to get it reversed.

Anyway, it's very rare nowadays to see VB programs
deployed in the P-Code form.

HTH,

Andrew
0
 
LVL 3

Expert Comment

by:guynumber5764
ID: 9667583
To do it legally, you cannot go poking around inside the dlls (decompile etc).

What you need to do is develop test stubs which will exercise each function all with all possible parameters (or a reasonable subset).  From the you write a specification.  You then have someone (the proverbial "virgin") write code to meet that spec.

For example, suppose one of the exposed functions was (sorry it's gonna be pseudo-C)

int Max(int a, int b);

You would write a little program that would apply a whole bunch of a's and b's:
for (a=0 to 100)
   for (b=0 to 100)
      print(a,b,Max(a,b))

and you get output
0  0  0
0  1  1
...
50  48  50
...
100 100 100

At this point it is very apparent that Max(a,b) simply returns the greater of a and b so you write a requirement to that effect.

Database managers and stuff will be much more difficult of course but you have a number of things working in your favour:
- The function name will usually be indicative
- You've got the calling code so you know how it is used.
- You are the only client so, if it is not perfect you can easily fix it, either in your own code or in the (new) library.

Also if the library serves a common function (like an ISAM), see if you cannot find a product that is close enough and just wrap it to fit.


Note that, most of the time VB programs use C libraries to do things which cannot be written in VB!

0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9668684
pg_india: some feedback please
0
 

Author Comment

by:pg_india_job
ID: 9668713
really sorry i was out..

i tried the object browser method..its better to know sumthg abt dll(ya it gave functions/classes)

Does dlls have a constructor...how can i know which is the first class/function being called..

The way my client is calling is just createobject("classname.object") after that nothing..everythg is happening in dll..how to do that which is the first function/class that is getting initalized......

http://www.numega.com/ which software is that..i checke dthis site but couldn't find a one...tell me which product is that...

Sir Andrew suppose its in p-code what can be done on that...any idea on how can it be decompiled...
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9668783
for the dlls written  in vb you can have an event for the class's initialising ie something like the constructor. from the constructor some methods may be called directly from the constructor. so unless you have the code it wont be possible to identify which function is being called.
moreover
1. decompiling is against the rules of EE as the same is not Open source.
2. no decompiler is 100% successful for VB dlls.
0
 
LVL 5

Expert Comment

by:DeerBear
ID: 9669264
Hi,

Well if the DLL was compiled in P-Code there exist some decompilers...
But, again, it's very rare to see P-Code binaries deployed commercially today.

HTH,

Andrew
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Simple Linear Regression

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question