Click here to Skip to main content
15,896,606 members
Articles / Programming Languages / C++

Open Source Software protection system - Part 1

Rate me:
Please Sign up or sign in to vote.
2.48/5 (35 votes)
18 Apr 20049 min read 151.2K   4.3K   102  
Outlines in developing an open source implementation of a new software protection system.
This package/DLL only encapsulates drive enumeration and drive info creation through single linked lists

When the GetMeDrives(nDriveType) is called it adds drives of nDriveType to the user defined linked list object.By default nDriveType is DRIVE_CDROM
It under the hood actually calls GetLogicalDrives, followed by a call to the member add() which just adds the drive letters to the linked list.
Next,validate(), fills up drive volume information,volume label and filesystem to the above linked list.
Last we call CheckMachine() , which simply copies the above collected data alongwith system RAM,OS Name,and processor name into a single string(say szKeyString) and then calculates MD5(szKeyString) returning it into another string say szKey.It returns the strlen(szKeyString), so you can allocate the required number of bytes required for the characters strings
The above can be achived by calling CheckMachine(szKeyString,szKey) on the object

If under any case, you require to reset the created linked list(say you want to add drives of another type), then instead of creating another object, you can just call lCCD_ObjectName.Reset() and all the data of lCCD_ObjectName is removed from memory
The DLL also exports

char MyCDLabel[256];//Label of our CD
char MyDriveLetter;//To be updated within the program

These two exports will be put to use soon(they ARE being used internally) when we might take upon CD Protection

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
Kamal Shankar is a programming freak (or so he feels).He currently lives in the Salt Lake City and loves doing what he has been since 1990 - coding horribly Wink | ;)

Comments and Discussions