protecting my plugin

This is a discussion on protecting my plugin within the C++ Programming forums, part of the General Programming Boards category; Hello, I'm about to finish writing beta version of my first plugin. I am going to be very selective as ...

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    8

    protecting my plugin

    Hello,
    I'm about to finish writing beta version of my first plugin. I am going to be very selective as to who uses it. I want to prevent any potential pirating (I know nothing is foolproof). Is there a way I can limit my code to run on a specific machine?

    Someone mentioned using the,

    mac address
    ms win install guid
    ip address
    pc network name

    to confirm the machine. Is there a function or header file that I should be looking into?


    Daniel

    ( The scope of my knowledge is C++, the Maya API and rudimentary STL. )

  2. #2
    Registered User
    Join Date
    Aug 2004
    Location
    San Diego, CA
    Posts
    313
    Here is a nice list of ways to get a MAC address in C++.

  3. #3
    Registered User
    Join Date
    Mar 2005
    Posts
    8
    Quote Originally Posted by Lithorien
    Here is a nice list of ways to get a MAC address in C++.
    Hi Lithorien,

    Have you given any of these a try? I can't get any of them to compile.

    this is probably the most viable one. Requires Windows SDK to be installed.

    http://www.codeguru.com/Cpp/I-N/netw...cle.php/c5437/

    Daniel
    Last edited by danielC++; 03-09-2005 at 08:39 PM.

  4. #4
    Registered User Kybo_Ren's Avatar
    Join Date
    Sep 2004
    Posts
    136
    Using the MAC address method is good, but it needs to be used in combination with remote authentication. If you do a comparison in your program, anybody can change the allowed MAC addresses. I recommend setting up a web server you have with a PHP script that takes the MAC address as a variable and outputs a 0 or 1 for if the MAC is allowed or disallowed (respectively). It takes a bit more work, and isn't totally secure (you could still remove that entire section, or change the jumps to their opposites), but it isn't as obvious. Any noobies will be prevented from using it

  5. #5
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    You might want to consider a comercial software protection such as Armadillo.
    If you still want to do it yourself then here are a few more ideas:
    • Hard disk serial number
    • username/serial authentication
    • CPU ID
    • All mentioned Ideas combined.

  6. #6
    Registered User
    Join Date
    Mar 2005
    Posts
    8
    Thank you guys for responding. I found sample code that retrieves CPU Id and it works beautifully.

    http://www3.ccw.com.cn/club/essence/200305/13942.htm

    This is probably the best solution for me because the code is short and sweet, it is easy to convert hex values to ints for a quick comparison and because I will be installing the plugins on computers that I have physical access to, I can easily custom compile the plugin for each computer.

    If you know of any potential issues please let me know.

    Daniel

  7. #7
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Quote Originally Posted by danielC++

    If you know of any potential issues please let me know.

    Daniel
    Well if the user upgrades his machine with a new CPU your software will stop working.
    Remember if you're just comparing the CPU ID with a value stored somewhere in your program this will be easily cracked but then again all software protection can be cracked.

  8. #8
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Or the user might not provide access to his CPU ID in the first place.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Plugin System Architecture
    By appleGuy in forum C++ Programming
    Replies: 0
    Last Post: 06-08-2009, 01:09 PM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. Plugin doesn't load on some systems
    By C+/- in forum C++ Programming
    Replies: 0
    Last Post: 06-16-2007, 08:46 AM
  4. trying to figure out someone's code for a plugin
    By paulpars in forum C++ Programming
    Replies: 4
    Last Post: 07-20-2006, 10:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21