Important alert: (current site time 7/16/2013 4:12:17 AM EDT)
 

VB icon

Decompile Protector

Email
Submitted on: 4/22/1999
By: Michael L. Canejo  
Level: Advanced
User Rating: By 7 Users
Compatibility: VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0
Views: 69555
author picture
(About the author)
 
     What my source code does is make 32bit and 16bit Visual Basics compiled projects (.EXE) "decompile protected". So no one out there can steal your source code from your vb made EXE's. Well the code is simple but you can make a decompiler protector program with the code. Enjoy and keep programming :-)
 

Windows API/Global Declarations:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
'**************************************
'Windows API/Global Declarations for :Decompile Protector
'**************************************
None!
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
'**************************************
' Name: Decompile Protector
' Description:What my source code does is make 32bit and 16bit Visual Basics compiled projects (.EXE) "decompile protected". So no one out there can steal your source code from your vb made EXE's. Well the code is simple but you can make a decompiler protector program with the code. Enjoy and keep programming :-)
' By: Michael L. Canejo
'
' Assumes:1.) Make a TextBox and name it "Text1"
2.) Make a CommandButton and name it "Command1" With the caption "Protect It!"
3.) Make a DirListBox and name it "Dir1"
4.) Make a DriveListBox and name it "Drive1"
5.) Make a FileListBox and name it "File1"
Please make sure that Command1's caption says "Protect It!" and Text1's caption is ""(Bank)
'
'This code is copyrighted and has' limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=1468&lngWId=1'for details.'**************************************

'********** Copy and Paste all this into your Form, NOT A MODULE! **********
Private Sub Command1_Click()
 A = "."
 Open Text1.Text For Binary As #1
 Seek #1, 25
 Put #1, , A
 Close #1
 MsgBox "The File, ''" & Text1 & "'', Was Protected from being decompiled!", vbOKOnly, "Decompile Protection Attempt Successful!"
 End Sub
Private Sub Dir1_Change()
 File1 = Dir1
 Text1 = Drive1 & "/" & Dir1
End Sub
Private Sub Drive1_Change()
 Drive1 = Dir1
End Sub
Private Sub File1_Click()
 Text1 = Dir1 & "\" & File1
End Sub
Private Sub File1_DblClick()
 Command1_Click
End Sub
Private Sub Form_Load()
MsgBox "Enjoy the Free source Code. This was FULLY Provided ßy: MiKE32. If you have any questions or comments, email me at cindy.joyce@worldnet.att.net", 40, "Enjoy!"
Text1.Text = ""
Command1.Caption = "Protect It!"
End Sub


Other 45 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
4/11/1999 8:42:00 PMSandy Valentine

Hey Mike, thanx for the free msource code for the Decompile Protecter! Its been so useful now that i dont have to worry about people stealing my coding from my VB Projects now that i used your source to do it. Thanx again Mike, Sandy
(If this comment was disrespectful, please report it.)

 
4/24/1999 8:49:00 AMEugene

Mike,

This is a great little hack that will fool most of
the decompilers out there, especially the freeware
ones.
(If this comment was disrespectful, please report it.)

 
12/20/1999 1:11:54 PM[]D[][]V[][]D

Hmm. I have looked around but I cant find any decompilers for vb5 and up. I need one/s because I have lost source code b4. Source code I would like to get back. So if you know of any, please email me or contact me either on icq: 44661482 or on aim: cshjrh45 and tell me about it. Thanks...

Oh and this code looks good, keep up the good work.
(If this comment was disrespectful, please report it.)

 
1/1/2000 2:38:41 AMJust Someone

Maybe the title of this code should be "come post your request here for a decompiler!"
(If this comment was disrespectful, please report it.)

 
1/3/2000 4:08:53 PMAbraham

I just want to know how I can write a Title on the Input Box.
(If this comment was disrespectful, please report it.)

 
1/6/2000 10:05:57 AMM-Hubet

I want a decompiler because I made a program, messed up my computer and only have the .exe file. I wanted the source code back so i can finish what took me 6 months to make and to lose.
(If this comment was disrespectful, please report it.)

 
1/6/2000 3:18:36 PM[]D[][]V[][]D

Hey "Just Someone" I am not a theif and if you have something bad to say, talk to me and dont publish it to the whole planet. I am a vb programmer and I have been programming for quite some time now. I got hacked a few times and after like the third time, I lost my files. I was pissed so I downloaded my programs again and so I have the .exe's but I dont have the source. So back off. If you dont have something nice to say, dont say it at all. (Especially if it isn't true!!!)
(If this comment was disrespectful, please report it.)

 
1/10/2000 5:30:11 PMCoozzzzz

lol well Just Someone since you said this page is for the person who wrote the code above then why are you constantly filling it up with immature insults? but i guess kids will be kids...
(If this comment was disrespectful, please report it.)

 
1/12/2000 8:19:21 PMTronghiep

Thanks your code
(If this comment was disrespectful, please report it.)

 
1/28/2000 3:26:04 PMGriM ReApEr

hmmm there aint no decompiler for vb 6 or 5. Thats guaranteed there is for 4, but the programs you have to buy
(If this comment was disrespectful, please report it.)

 
2/6/2000 10:38:26 PMHaKs

If you Change..
A = "." to
A = "@"

Then you can Un-Guard, Guarded Programs, and Still Decompile them.
(If this comment was disrespectful, please report it.)

 
2/11/2000 9:44:11 PMIndoCAD

thanks for your great idea
(If this comment was disrespectful, please report it.)

 
2/15/2000 4:25:28 AMArushan

There is no decompiler for VB5 and VB6 but there is a program which allows you to see what the program is doing... in VB's language.

It's called NuMega SmartCheck (http://www.numega.com)
(If this comment was disrespectful, please report it.)

 
2/19/2000 10:01:25 AMA.A.Dokkan

Thanks for this Good Information.
I hope if you can help me on
1- Decompiler Program
2- Software Protoction
Thanks .........
(If this comment was disrespectful, please report it.)

 
2/24/2000 11:25:10 AMHacker

I have one for vb6.0 and vb5.0.
This decompiler was written in c++
(If this comment was disrespectful, please report it.)

 
3/16/2000 7:29:52 PMUltimatum

Since there are already a few too many posts here, what's one more? =)
(If this comment was disrespectful, please report it.)

 
5/8/2000 8:07:44 PMTo Hacker

Can you tell me where to get the decompiler programs you have or email them to me?
(If this comment was disrespectful, please report it.)

 
7/11/2000 2:13:19 PMDetonate

This is an old trick that only works
against old decompilers and is one of
the first things software hackers look
for. Protection-wise its not worth the
ten seconds it'll take to apply the
1-byte change.

The theory behind
this single byte protection is flawed -
it's relying on the debugger to have a
BUG in it which doesnt read the PE
header properly. Any protection that
relies on the existance of a bug in
software is seriously flawed, and the
bug is only isolated to a few certain,
old compilers.

(If this comment was disrespectful, please report it.)

 
7/14/2000 6:04:54 PMJohn

Hacker,
can you tell me where or how I can find your Vb5, VB6 decompiler program I too lost a source code after my system crashed. please email me at:
vbamateur@hotmail.com
(If this comment was disrespectful, please report it.)

 
8/19/2000 7:06:13 AMBrian Makka

Can someone help me with a decompiler for Visual Basic? I have lost my work due to a bug in 128-bit encryption software. My password for encryption was long, so I pasted it in the box, and what happened? when it came to decryption time it wouldnt decrpyt. This software was called Kremlin, and I also deleted the source files thinking they were safely encrypted. Please help!!!!
(If this comment was disrespectful, please report it.)

 
11/12/2000 10:33:58 AMWinDi$$ RulZZz.

1. for a good encrypted .exe there is always a good decompiler for that .exe.

2. for a decompiler that will ripp vb 5, 6 does not exist. well there is softICE if you like to crack passwords,
(bpc) (*) (what a brakepoint)
also a HEX Editor Hex Workshop is one example. but to make a program not-crackable or hackable... well its not possible... well, tell you what you make it (:_-eye-_:) crack it.
(If this comment was disrespectful, please report it.)

 
11/15/2000 3:32:51 PMChris_The_Man

Hi! I dont care to find a decompiler.
(If this comment was disrespectful, please report it.)

 
12/4/2000 7:05:04 AMChris

Thanx for the code :)
(If this comment was disrespectful, please report it.)

 
12/28/2000 6:04:15 AMTerrance Henry Shaw

Wow, this source code is excellent! :) This has inspired me to try to create a decompiler for the Visual Basic 5.0/6.0 versions. Thanks again for the source code! :)
(If this comment was disrespectful, please report it.)

 
1/1/2001 12:43:16 PMRichard Hayden

Is it just me or does your code apparently have an average vote of 5.5????????????? My computer thinks it does. If the maximum one can vote is 5 then it is obviously impossible to have an average vote higher than 5.
(If this comment was disrespectful, please report it.)

 
2/19/2001 1:19:34 AMJN

Hey Mike, this is a great program. I just have some suggestions. To give someone a lesson who tries to decompile a VB program, how about adding a procedure within the program itself. This procedure will detect whether the program is running as a stand alone program or it is running within VB. If it is running within VB, then you know what to do. :) I am sure there's a place to put this procedure, where the hackers can't even see it. Now, the hackers really have to think twice before running a decompiled program.
(If this comment was disrespectful, please report it.)

 
4/30/2001 11:01:06 AMChristopher Redfearn

Terrence Henry Shaw, exactly how r u going to make a decompiler? Please advise me, cos i wanna make 1 too!
(If this comment was disrespectful, please report it.)

 
7/1/2001 4:22:32 AMPhilippe Lord

Just wanted to say that this is in no way a protection, neither will it stop crackers. The reason is simple, crackers generally uses W32DASM 8.93 or IDA (newest is 4.04 i believe. Crackers share theses fully registered programs and uses them to dissassemble most exes. Now my point is that theses are being distributed well over the net for over 2 years and all crackers have them. Now for the punch, well, your 'protection' did not do anything against them. It did nothing. BTW, write at address 25 means you're writing in the DOS STUB PE header, thus have absolutely nothing to do with protecting the executable, all it's gonna do is make the win32 program unworking under DOS (because a win32 PE contains a dos executable that says: This program requires you be in windows.) Just my 2 cents.

BTW, i verified, address 25 is:
e_lfarlc As String * 2 'File address of relocation table
which is located in IMAGE_DOS_HEADER.
This code protects nothing
(If this comment was disrespectful, please report it.)

 
8/2/2001 4:16:20 PMKomodo9@msn.com

Philippe Lord, how do you check something like that?
(If this comment was disrespectful, please report it.)

 
8/4/2001 4:51:37 PMPreben Nyloekken

Daugh....Havent ANY of you herd about ResHacker, it opens dll, ocx, exe like visual basic, you can add remove buttons, and crack programs.....I can crack almost anything. :)

- preben
(If this comment was disrespectful, please report it.)

 
9/4/2001 12:13:38 AMfEllFrOscH

cant someone just post a link here for a decompiler? theres so many ppl here in need of one, apparently due to windows losing stuff in crashes or viruses or whatever (okay, so mebbe its not windows fault.... but i like to blame anything i can on microsoft =P)
(If this comment was disrespectful, please report it.)

 
9/4/2001 11:21:10 PMDoctor Evil

I have no valuable input.

Just thought I'd post something. :)
(If this comment was disrespectful, please report it.)

 
1/15/2002 1:25:57 PMJohn

I don't get why padding offset 25 with 00's should protect any EXE! I have verified my suspicion and found that your protector like others posted at psc does fail to work.
I have tested it with the vb5/6
decompiler found at http://come.to/cute-bits.
(If this comment was disrespectful, please report it.)

 
4/15/2002 3:31:11 AMGustavo Luiz

First: NOT exist decompiler for VB5 or VB6 that retorn for the code original, only a little program that retorn the visual (of forms) with commandButtons, textBOx, etc... without CODE!!!!

And this example code protect nothing!!!! If you develop in VB5 or VB6 - you not need of protect. And the HEX editors and Numega related software can view anyone program (in C++, VB, Delphi... but it's used for view the data manipuled by your program, not for e-write source code! :)

Why nobody view code of microsoft (Windows, Office)??? Becouse it's very dificult!!!! For only know the way that your program operate not is necessary to have none source... OK?

And 95% of people that like decompilers not is for your "lost source code", are thiefs!!!! And not know how programing!!! If you really lost your code, and IF was YOU that made the code, MAKE other time!!!!!!
(If this comment was disrespectful, please report it.)

 
4/26/2002 5:45:34 PMUr I.T. Mate

Okay so I am new to VB, but ther first rule of building/creating things is ALWAYS HAVE A BACKUP.

Most of what I have read on here seems to come from people that wish to de-compile "their own" exe files, which personally I do not agree with, unless they are ACTUALLY YOURS.

Nice code and very useful and yes, for the lamers out there that are thinking of stealing code BEWARE

Muhahahahahaha

Enjoy!

CrashandBurn
www.grafixlords-hideout.tk
(If this comment was disrespectful, please report it.)

 
6/28/2002 8:21:37 PM*JJ*

Jeeze does it actually work?
(If this comment was disrespectful, please report it.)

 
1/27/2003 10:13:07 PM

I am not sure what you mean Decompile.
Is it posible to see source code of EXE program?
(If this comment was disrespectful, please report it.)

 
2/10/2004 12:22:35 PMThe Lynxy

I read this post a year ago and a few months ago i started working on a decompiler. visual basic 6 makes it hard to decompile, but i have a program that is almost complete! the source code is make-outable (like only 30% there) and there are no commnad buttons or any objects. I am willing to share my code with anyone that has something like this going and are williams to help!!!
o yea this only works for vb6 compiled EXEs
(If this comment was disrespectful, please report it.)

 
6/9/2004 1:37:28 PM

hi
(If this comment was disrespectful, please report it.)

 
6/30/2004 6:40:32 AMSPY-3

I have read all the posts and alot of people say this doesnt work or they want a vb6 decompiler. As for anwsers to both Yes it does protect agienst the decompilers that just get the visual forms and module names. and so far there are no FULL vb6 decompilers i found one that gets you the visual format of it and thats enough to remake the program.
SPY-3
(If this comment was disrespectful, please report it.)

 
1/3/2005 7:33:37 AMJamie Pocock

Good idea, simple and it works.
I have shareware on the net and the baster#s hack it very quickly within 2 to 3 days of release, the protection used is checking the serial with a database on my site using the serial of the users HDD and use that as a key for the serial creation so on another machine it will not work, this only protects against serial hacks, good hackers will decompile the software with a Hex editor and change Bits around until they stop the protection working.
Read next comment
(If this comment was disrespectful, please report it.)

 
1/3/2005 7:34:27 AMJamie Pocock

They stick to it for weeks if necessary.
Even the above does not stop them they make an exe to replace the original and it does not check anymore.
The registry is useless for protection as programs like Reg-spy just tell hackers what
Key changes were made by your exe to the registry.
Encrypted files are useless as there just put on hack sites.
Basically a hacker can and will hack your programs, just make it hard by using multiple protections and check at different points during the program, newbie’s will give up, pros will walk all over it
Read next
(If this comment was disrespectful, please report it.)

 
1/3/2005 7:35:06 AMJamie Pocock

Decompilers. Ha! What u people like, just think about it
Decompilers decompile to Hex not source; there are no VB source viewers out there because when you compile an exe it becomes Hex THE SORCE IS GONE, all you have is an exe full of bits 011001110 and so on which decompilers convert to Hex for you, reverse engineering this would be impossible. No software author in there write mind would begin such a huge project, just imagine you would have to take in to account every user made variable which in its self would be impossible because it may be called through out the project, (change one and nothing works), convert the hex back to the original variable name which would have been lost when the exe was compiled then give it correct value. If you even managed such a task then you would have to start with the constants, menus, controls, arrays, hooks, API calls, and so on.
Get real, it could not be done.

(If this comment was disrespectful, please report it.)

 
1/7/2005 4:35:54 PM

Do you know where i can find the source code for a vb6 decompiler?


(If this comment was disrespectful, please report it.)

 
5/20/2005 3:30:19 PM

Well said Jamie..After all that you had to write well just cudnt help but laugh my butts off at the very next post... lmao!
(If this comment was disrespectful, please report it.)

 
1/25/2007 11:10:31 PMMega

GOod
(If this comment was disrespectful, please report it.)

 
3/8/2008 8:42:36 PMRPG MAKER

better way to fool decompiler instead of putting a A on byte 24 is putting a

Rnd * 255 .. random chracter has much better chance after reading this protector I could just check for that A if it exists its still vb.. u see my point this wont protect.
(If this comment was disrespectful, please report it.)

 
4/7/2008 9:09:35 PMThe Rogue

THIS DOES NOT WORK! Vb Decompiler Pro decompiled without an error. This code fails.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.