Page 1 of 2 12 LastLast
Results 1 to 40 of 71

Thread: self-destruct my software

  1. #1
    YEA BABY
    Guest

    self-destruct my software

    I was wondering of a way to get my .exe to stop working, while making it look like a bug or something in the software (the reason is job security or too get back at the company after I leave)

    I was thinking of a .dll that has a timeing control on it say, 90 days and after the alloted time a msgbox or form comes up that says something like... "Invalid procedure call...blah.blah.blah" but looks just like a real VB message, then I could set it up to accept only certain key strokes (a password) all other keystrokes do nothing. Then an input box comes back and lets me reset the timer/day counter for whatever.

    The key is too make it look like some other type of error, so the company doesn't think I did something. It also has to be something an average VB or C++ programmer or administrator can't figure out!!!! (yes, I know this is malicous)

    Do you see any flaws??

    Any better suggestions.

  2. #2
    Fanatic Member Slaine's Avatar
    Join Date
    Jul 2002
    Posts
    641
    A better strategy would be to concentrate on making the program a killer application, thus elevating your self in the eyes of your manager. Then they would consider you an asset to the company and wouldn't dream of letting you go, instead lavishing you with more money, cars, gifts and girls of dubious nature (or boys if you prefer).

    Thats what I did - you'll have to excuse me now my assistant has just finished peeling my grape.
    Martin J Wallace (Slaine)

  3. #3
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    That is the funniest thing I have ever heard. I fell out of my chair when I read this. Damn man, that is hillarious!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    oh my god is that funny
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  4. #4
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    By the way... Did you every figure out how to do that? I need to create a trial version of my program. I need it to self destruct in 30 days. Any insite?
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  5. #5
    PowerPoster eiSecure's Avatar
    Join Date
    Jul 2000
    Location
    Texas
    Posts
    2,209
    try making the program run its own un-install after the time has expired.

  6. #6
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    i dunno, but a better way to do this is just do kill *.* when the expiration runs out... that will screw the company (at least the comp)
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  7. #7
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    how do you run the un-install?
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  8. #8
    PowerPoster eiSecure's Avatar
    Join Date
    Jul 2000
    Location
    Texas
    Posts
    2,209
    but it will still show in the add-remove programs menu. Or you could temporarily disable the program by having the program check a specific yet inconspicious file the user won't mess with, like a file under the windows\system directory called explorershell.vxd or something. Then, all you have to do is pu some data into it saying if your program should be running normally or give your special message box when it starts up.

    Optionally, you can encrypt that vxd file to make it look like it's a real virtual device driver (or whatever file type you choose).

  9. #9
    From your original post: to get back at your company? Screw that! That's not what we're here for.

  10. #10
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    Originally posted by filburt1
    From your original post: to get back at your company? Screw that! That's not what we're here for.
    yah... but my idea would have worked fine
    Kill (*.*)
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  11. #11
    PowerPoster eiSecure's Avatar
    Join Date
    Jul 2000
    Location
    Texas
    Posts
    2,209
    Skitchen8, i don't think you can do kill *.*, since the program itself would still be running, so it would not be possible to delete the program file. Plus, it would be kinda hard to reactivate it again.

    An artificial "lockup" of the program would work better.

  12. #12
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    yes... that would kill all files though, which means it would kill everything needed to start your computer... i don't know if it stops at a file it can't delete though, im checking now trying to deletea running program
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  13. #13
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    I'm not trying to ruin any company. I am trying to prepare a beta version of my program for testing. I am going to have to give it to people to test. I only want it to work for 30 days.
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  14. #14
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    VB Code:
    1. Private Sub Command1_Click()
    2. On Error GoTo errorhandler
    3. Kill ("*.*")
    4. Exit Sub
    5. errorhandler:
    6. If Err.Number = 75 Then Resume Next
    7. End Sub

    that will delete everything that is not running... do not handle this lightly...

    Disclaimer: This is for educational purposes only, any destructive acts are the responsibility of the person that ran this code
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  15. #15
    PowerPoster eiSecure's Avatar
    Join Date
    Jul 2000
    Location
    Texas
    Posts
    2,209
    Just display a message box saying that the time is up, and don't give the user a "continue" option. Just an "uninstall" and "exit" option.

  16. #16
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    damn, that means you won't use my cod
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  17. #17
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    Yes I understand that but....HOW THE HELL DO YOU CODE TO START AN UN INSTALL. PLEASE INFORM
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  18. #18
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    Could yo udo this?
    Code:
    Private Sub Command1_Click()
    On Error GoTo errorhandler
    Kill ("vbprogram.exe")
    Exit Sub
    errorhandler:
    If Err.Number = 75 Then Resume Next
    End Sub
    Could you do that? Just kill the VB program that you want destroyed?
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  19. #19
    PowerPoster eiSecure's Avatar
    Join Date
    Jul 2000
    Location
    Texas
    Posts
    2,209
    Try using InnoSetup to make your install. It automatically comes with an uninstall program. Just shell the uninstall with the correct parameters. I think Inno has that in the help file somewhere.

    Anyways, you can download it at http://www.jrsoftware.org

  20. #20
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    Listen. If you can't provide code. Don't bother replying to these messages. You are doing nothing but wasting my time.
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  21. #21
    PowerPoster eiSecure's Avatar
    Join Date
    Jul 2000
    Location
    Texas
    Posts
    2,209
    david, that could work, but what if the program you want destroyed was the program that was running the function? Then you'll have an error.

    That won't really work, but you can have a seperate program call that command, and delete the program files.

  22. #22
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    Originally posted by davidgottlieb
    Could yo udo this?
    Code:
    Private Sub Command1_Click()
    On Error GoTo errorhandler
    Kill ("vbprogram.exe")
    Exit Sub
    errorhandler:
    If Err.Number = 75 Then Resume Next
    End Sub
    Could you do that? Just kill the VB program that you want destroyed?
    no, becuase the errorhandler doesn't make it delete the file, it makes it skip to the next one
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  23. #23
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    Originally posted by eiSecure
    david, that could work, but what if the program you want destroyed was the program that was running the function? Then you'll have an error.

    That won't really work, but you can have a seperate program call that command, and delete the program files.
    your right, you could make a seperate exe file that kills the program, and when the expiration date has happened than it shells to the new exe, and closes the app. That way the exe is free to delete the file.
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  24. #24
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    So what would happen if I tried to run that?
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  25. #25
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    nothing, what the code i wrote does is make sure that the message box doesn't pop-up when attempting to kill a running file, its still won't kill it. if you had the *.* in there it would skip to the next file it was supposed to delete.
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  26. #26
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    though, looking at a book i have kill ("*.*") should only delete the files in the current dir... which should be equiv to app.path, so you would want to do
    Kill ("C:\Windows\system\*.*")
    to effectively screw up a computer

    note: you can also take out system, because destroying the windows file structure should be enough
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  27. #27
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    What I did was create a little nothing text file. Put that code behind a command button and did it. It worked. It deleted the file. So all I need to do is set a message box to come up within 30 days of the install and when they click ok, delete the database or something that the program requires to run. How can I do that?
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  28. #28
    Lively Member stever2003's Avatar
    Join Date
    Dec 2000
    Posts
    109

    [Place message subject here]

    wow, a lot goes on here in 5 hours. i've never used this code, whenever i see something that looks like it might be useful sometime down the road, and it looks like this one was somewhat useful in helping you. I think you need to use the P&D wizard for this to work. make a registry key with the date of expiration in it. have the program check that key. if the current date is the date of expiration or later, then run the code. however, this will not destroy the file, it will only run the uninstaller. you may want to put code in that diables the program after the specified date, or make another program that executes after the date, and the other program will destroy the first file and give a message that the trial period has ended. i've never done any of this, its just an idea that i have, you'll have to figure it out. cya later and email me if u have any questions
    - steve

  29. #29
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    yeah, i tried active-lock it works good, anyone care to try and see if it is hackable??
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  30. #30
    PowerPoster eiSecure's Avatar
    Join Date
    Jul 2000
    Location
    Texas
    Posts
    2,209
    its not really hackable if you implement it right. Don't make dumb mistakes like having the "trial expired" dialog non-modal and stuff.

    By the way, try opening the finished exe in notepad, and try to find your password. Not there, unlike some other "protection" schemes.

  31. #31
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    Originally posted by eiSecure
    its not really hackable if you implement it right. Don't make dumb mistakes like having the "trial expired" dialog non-modal and stuff.

    By the way, try opening the finished exe in notepad, and try to find your password. Not there, unlike some other "protection" schemes.
    think i can find it in a hex editor??
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  32. #32
    PowerPoster eiSecure's Avatar
    Join Date
    Jul 2000
    Location
    Texas
    Posts
    2,209
    probably not. I've tried it the first thing I found Active-Lock, just to see if it was good enough to use in my own programs.

  33. #33
    nullus
    Guest
    the only problem in trying to screw your app up for your company is that they can just go and change the source code. unless of course, your source code is on a local drive and you delete all that, or the company is too stupid to make routine backups, or there are no other programmers there.

    btw, i dunno if this has anything to do with the thread now, cos i couldn't be arsed to read it all

  34. #34
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    I agree with Nullus, you will have to be subtle and make it look like an accident if your source is open.

    Better for your reputation and a better approach in general is to not even think about the world in this way. You get paid by the client for work done, everyone is happy. If a client doesn't pay for work done, take appropriate action though approproate legal channels. Life is too short.

  35. #35
    Hyperactive Member Jason Badon's Avatar
    Join Date
    Feb 2001
    Location
    Colorado
    Posts
    329
    VB Code:
    1. Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
    2. Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
    3.  
    4. Private Sub WriteToINI(Section As String, Key As String, KeyValue As String, Directory As String)
    5.     Call WritePrivateProfileString(Section$, UCase$(Key$), KeyValue$, Directory$)
    6. End Sub
    7.  
    8. Private Function GetFromINI(Section As String, Key As String, Directory As String) As String
    9.    Dim strBuffer As String
    10.    strBuffer = String(750, Chr(0))
    11.    Key$ = LCase$(Key$)
    12.    GetFromINI$ = Left(strBuffer, GetPrivateProfileString(Section$, ByVal Key$, "", strBuffer, Len(strBuffer), Directory$))
    13. End Function
    14. Private Function FileExists(sFileName As String) As Boolean
    15.     If Len(sFileName$) = 0 Then
    16.         FileExists = False
    17.         Exit Function
    18.     End If
    19.     If Len(Dir$(sFileName$)) Then
    20.         FileExists = True
    21.     Else
    22.         FileExists = False
    23.     End If
    24. End Function
    25.  
    26. Private Sub Form_Load()
    27.  
    28.     Dim eval As Date
    29.     Dim value As Integer
    30.     Dim Mydate As Date
    31.     Mydate = Format$(Now, "m/d/yyyy")
    32.     Call Validate
    33.    
    34. End Sub
    35.  
    36. Private Function FirstRun()
    37.    
    38.     Mydate = Format$(Now, "m/d/yyyy")
    39.     Call WriteToINI("Eval", "Date", (Mydate), "c:/Test.dat")  'Write to the Dat on app first run I would
    40.     'have this file written to a network folder.
    41.  
    42. End Function
    43.  
    44.  
    45. Private Function Validate()
    46.    
    47.     If FileExists("c:/Test.dat") Then
    48.         Mydate = Format$(Now, "m/d/yyyy")
    49.         eval = GetFromINI("Eval", "Date", "c:/Test.dat")
    50.         If eval = "Unlocked" Then Exit Function 'you could edit the ini file after it
    51.         'has been run for the first time and change the date to Unlocked. If you get
    52.         'fired delete the dat file and your eval period will start.
    53.         value = DateDiff("d", CDate(eval), CDate(Mydate))
    54.         If value >= 90 Then
    55.             MsgBox "Eval is over"
    56.             Unload Me
    57.         End If
    58.     Else
    59.         Call FirstRun
    60.     End If
    61.    
    62.  
    63. End Function

    hope this helps..

  36. #36
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    263
    This ActiveLock is incredible. I couldn't ask for anything more. It is so easy to use and it works great. I would take this over manual code any day.
    Thanks Alot,

    David Gottlieb
    CIW Certified Internet Webmaster
    Web Developer/Designer

  37. #37
    PowerPoster eiSecure's Avatar
    Join Date
    Jul 2000
    Location
    Texas
    Posts
    2,209
    Yeah, I agree. So, you're glad you listened to me for once, huh?

  38. #38
    Lively Member
    Join Date
    Aug 2001
    Posts
    109
    i dont think kill *.* will work... i think the kill statement is only meant to delete 1 file at a time... also u cant use Kill statement to delete folders...

  39. #39
    DaoK
    Guest
    Some one in that forum had given me a code to kill my app and it worked like a charm.

  40. #40
    DaoK
    Guest
    I didnt find the old code I had but here is one I made and it work great.
    VB Code:
    1. sAppLocation = App.Path & "\" & App.EXEName & ".exe"
    2. sBatName = "deleteme.bat"
    3.     Open sBatName For Output As #1
    4.         Print #1, "@echo off"
    5.         Print #1, ":redo"
    6.         Print #1, "del " & App.EXEName & ".exe"
    7.         Print #1, "if exist " & sAppLocation & " goto redo"
    8.         Print #1, "del " & sBatName
    9.     Close #1
    10.     Shell App.Path & "\" & sBatName
    11. Unload Me

Page 1 of 2 12 LastLast

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