Skip to main content
gamedev.net
🔒 Locked

libs...

Started by clrscr Dec 30, 2001 at 5:18 PM 7 replies 300+ views
Original Post
clrscr
clrscr
Is there anyway to open .lib file and see the source code? "A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila." -Mitch Ratliffe
-----------------------------When men speak of the future, the Gods laugh.An apology for the devil: it must be remembered that we have heard one side of the case. God has written all the books.Samuel Butler (1835 - 1902)
clrscr
clrscr
Why not?

"A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila."
-Mitch Ratliffe
-----------------------------When men speak of the future, the Gods laugh.An apology for the devil: it must be remembered that we have heard one side of the case. God has written all the books.Samuel Butler (1835 - 1902)
DrPizza
DrPizza
Because they don''t contain source code.

char a[99999],*p=a;int main(int c,char**V){char*v=c>0?1[V]:(char*)V;if(c>=0)for(;*v&&93!=*v;){62==*v&&++p||60==*v&&--p||43==*v&&++*p||45==*v&&--*p||44==*v&&(*p=getchar())||46==*v&&putchar(*p)||91==*v&&(*p&&main(0,(char**)(--v+2))||(v=(char*)main(-1,(char**)++v)-1));++v;}else for(c=1;c;c+=(91==*v)-(93==*v),++v);return(int)v;} /*** drpizza@battleaxe.net ***/
Drizzt DoUrden
Drizzt DoUrden
Here, let''s refrase it:

Is there any way to view the data inside of a .lib file?

------------------------------
Simple DirectMedia Layer:
Main Site - (www.libsdl.org)
Cone3D Tutorials- (cone3D.gamedev.net)
GameDev.net''s Tutorials - (Here)
------------------------------Put THAT in your smoke and pipe it
Vaporisator
Vaporisator
.lib files are compiled and linked so there isn''t any sourcecode in it! You could surely take a hexeditor and look at the data in it, but to get the source code (the .c and .h files that are human readable) you need to disassemble and decompile the lib!
BUT:
If it is copyrighted material, then reversengineering (that''s how this is called) is forbidden and illeagal.
While disassembling is fairly easy (many tools) decompilation is possible, but the output is very very bad (extremely hard to understand) as there is no way to restore the names of the variables and comments, etc.

Anyway, what lib do you want to decompile and why?


Yesterday we still stood at the verge of the abyss,
today we''re a step onward!
Yesterday we still stood at the verge of the abyss,today we're a step onward! Don't klick me!!!
clrscr
clrscr
I was just wondering if it can be done.

"A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila."
-Mitch Ratliffe
-----------------------------When men speak of the future, the Gods laugh.An apology for the devil: it must be remembered that we have heard one side of the case. God has written all the books.Samuel Butler (1835 - 1902)
Omaha
Omaha
.lib files are not linked. They are just compiled.

You can link other files with them.

Edited by - Omaha on December 30, 2001 9:56:29 PM
Vaporisator
Vaporisator
quote:
Original post by Omaha
.lib files are not linked. They are just compiled.

You can link other files with them.

Edited by - Omaha on December 30, 2001 9:56:29 PM


Definetly right, thanks!
Wouldn''t that make reversengineering easier?


Yesterday we still stood at the verge of the abyss,
today we''re a step onward!
Yesterday we still stood at the verge of the abyss,today we're a step onward! Don't klick me!!!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.