#1
  1. Senior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    424
    Rep Power
    15

    Restrict Usage of my App


    Hi folks.

    This is a general programming question really, although my app is written using Powershell.

    My requirement is that I've made an app, and I want to sell this to people. But I only want them to be able to run the app x amount of times. For example, let's assume I want to release my app in trial mode and only allow users to run it 30 times before it stops working.

    Does anybody have any ideas of how I could implement this? Ideally it would be a local solution, and not require any activation/counters online.

    Thanks for any ideas.
    Captain Planet.
  2. #2
  3. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Posts
    5,893
    Rep Power
    509
    Perhaps you could store this---I'll call it "meta information"---in a file. The difficult part here: you'd need to learn to read files, write files, and alter variables. For extra credit you could use a trick to test for simple kinds of tampering. The file could be binary. That's easiest and most efficient. It might contain a hidden program written in the white space programming language that must work. These extra controls could be useful since you've got this local test requirement. I like the white space idea, the code or simply signature would be available after stripping the inked characters. Other data could be randomly (sequentially) interspersed with it.

    When you detect tampering your program should send you email, start the guy's car and drive it off a cliff.
    Last edited by b49P23TIvg; December 1st, 2014 at 06:58 PM.
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. Senior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    424
    Rep Power
    15
    Thanks for the reply. I like the idea of a binary file. I guess my issue is that if I implement the above and decrement the app count variable in the binary file after each run, what would stop the user from making a copy of the initial binary file and re-instating it for each use?
    Captain Planet.
  6. #4
  7. Lord of the Dance
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Oct 2003
    Posts
    4,131
    Rep Power
    2011
    The first thing you should now is that no matter what security you have, it will never be 100% secure if a person has enough computer knowledge.

    Just look at some of the bigger companies and see how great a success they have with this.

    The best thing you can do (/hope for), is to make it complex enough to prevent the "average joe" from cheating.
  8. #5
  9. Senior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    424
    Rep Power
    15
    Originally Posted by MrFujin
    The best thing you can do (/hope for), is to make it complex enough to prevent the "average joe" from cheating.
    - yeah, that's exactly what I'm doing. My app isn't going to make me millions, but I just want a 'best endeavours' approach to ensuring that the average Joe can only run it x times (unless they pay, and I'll add more to the usage count).
    Captain Planet.

IMN logo majestic logo threadwatch logo seochat tools logo