Results 1 to 12 of 12

Thread: how to protect exe?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    877

    how to protect exe?

    hello, how to protect a exe file?

    let say the exe contains

    Text1.Text = "YOUR NAME"

    you compiled it in .exe

    and then open the .exe into Hex Workshop

    u will see the YOUR NAME in the Hex workshop

    how to prevent this? i don't want to show the YOUR NAME in hex

    thanks..

  2. #2
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: how to protect exe?

    There are lots of (illegal) ways to reverse engineer other people's software.

    If you want to stop simple hex editing, then you'll have to encrypt the string.

    Possibly stick it in a res file, and decrypt as and when you need it (or at program start up)

    Depending on what you're storing a Caeser Cipher might even be enough.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  3. #3
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: how to protect exe?

    Is this in IDE mode, or at runtime?

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    877

    Re: how to protect exe?

    @I_Love_My_Vans

    it is a runtime apps... (standalone)

    thanks...

  5. #5
    Hyperactive Member divined's Avatar
    Join Date
    Aug 2004
    Location
    Thessaloniki, Greece
    Posts
    447

    Re: how to protect exe?

    yes. but then you just defer the problem as to where to store the encryption key! If decryption is to be done automatically, at least!
    SteadFast!

  6. #6
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: how to protect exe?

    I jjust tested this when the text is loaded on runtim, and it cannot see what is going in at all.

    Try loading the text on runtime.

    ILMV

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    877

    Re: how to protect exe?

    @I_Love_My_Vans

    how to do that?

    thanks...

  8. #8
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: how to protect exe?

    Quote Originally Posted by divined
    yes. but then you just defer the problem as to where to store the encryption key! If decryption is to be done automatically, at least!
    Using a caesar cipher only requires a LONG. So the fact that this key is a number wouldn't be immediately obvious inside a hex editor.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  9. #9
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: how to protect exe?

    Quote Originally Posted by nokmaster
    . . . and then open the .exe into Hex Workshop . . .
    Thanks, I was looking for a good Hex Editor and here is the link for all others that are interested: http://www.bpsoft.com/
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    877

    Re: how to protect exe?

    @all

    i find this code it works.......

    how to create this into opening a file like CommonDialog

    VB Code:
    1. Private Sub Command1_Click()
    2.  
    3.     A = "."
    4.     Open Text1.Text For Binary As #1
    5.     Seek #1, 25
    6.     Put #1, , A
    7.     Close #1
    8.     MsgBox "The File, ''" & Text1 & "'', Was Protected from being decompiled!", vbOKOnly, "Decompile Protection Attempt Successful!"
    9. End Sub
    10.  
    11.  
    12.  
    13. Private Sub Dir1_Change()
    14.  
    15.     File1 = Dir1
    16.     Text1 = Drive1 & "/" & Dir1
    17. End Sub
    18.  
    19.  
    20.  
    21. Private Sub Drive1_Change()
    22.  
    23.     Drive1 = Dir1
    24. End Sub
    25.  
    26.  
    27.  
    28. Private Sub File1_Click()
    29.  
    30.     Text1 = Dir1 & "\" & File1
    31. End Sub
    32.  
    33.  
    34.  
    35. Private Sub File1_DblClick()
    36.  
    37.     Command1_Click
    38. End Sub

  11. #11
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: how to protect exe?

    Is this what you mean?
    VB Code:
    1. Private Sub Command1_Click()
    2. With CommonDialog1
    3.   .CancelError = True
    4.   ' Set filters
    5.   .Filter = "Text Files (*.txt)|*.txt|"
    6.   ' Display the Open dialog box
    7.   .ShowOpen
    8. End With
    9.     A = "."
    10.     Open CommonDialog1.FileName For Binary As #1
    11.     Seek #1, 25
    12.     Put #1, , A
    13.     Close #1
    14.     MsgBox "The File, ''" & CommonDialog1.FileName & "'', Was Protected from being decompiled!", vbOKOnly, "Decompile Protection Attempt Successful!"
    15.    
    16. End Sub

  12. #12
    Fanatic Member wildcat_2000's Avatar
    Join Date
    Nov 2000
    Location
    Italy
    Posts
    727

    Re: how to protect exe?

    what you are intending to do remains quite vague to me.

    if you only want to avoid other people reading directly from your compiled .exe you have to pack it.

    i use ASPack for various reasons i won't detail here. just know that this is the only packer that does not have an automated 'unpacker' out there.

    cheers,

    wc.
    When your car breaks down,
    close all windows and retry

    => please rate all users posts! <=

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width