FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Read Partition Usb
Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM

Read Partition Usb

Posted: Mon Dec 20, 2010 10:19 AM

I Made an application and I call a file called "licence.lic" 15kb max to protect the exe's application

I wish insert this file on a partition of a Usb key and read it from mine application

I explain..

I made this file and save it on folder of mine application

and it created from serial hard disk and now i Know the serial can be changed and I cannot procted mine application

and I thinked to make a secret partition on Usb where I can unsert this file and then read the file lic from mine application

the partition cannot be copied and perhaps it can be a good protection from pirates

How I can make for it ?

FWH .. BC582.. xharbour
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

Re: Read Partition Usb

Posted: Mon Dec 20, 2010 11:13 AM
I think to create a USP-protection by Yourself, won't work, because the User can duplicate the USB.
Some Years ago, I used a DONGLE-protection from the Company => ALADIN connected to LPT
( You can search in Internet )
They are also offering special USB's as Software-protection.
Inside Your Application, You include a decrypt function. The connected Dongle / USB returns the encrypted Value.
Hardwareprotection I don't use anymore, because of many problems like a User notifies a lost Dongle or USB.
Not possible for You, to control this.
A licence-Key might be a better Solution.

My Function for Dongle-protection I used.

With a delivered Dongle-burner ( Hardware ), I burned the Dongle with a Number.
I had to include a extra Lib with special Functions, to read from Dongle.

At start I called a Testfunction :

FUNCTION TEST_LIC()
ModAd := 12227
PORT := HL_PORT(ModAd)
CINT_OFF()
Checks the Number from Dongle
CHL_ON(Port, ModAd)
The decrypted Test-string
string1 := chr(166)+chr(107)+chr(97)+chr(248)+chr(208)+chr(123)+chr(88)
string2 := chr(89)+chr(212)+chr(9)+chr(232)+chr(173)+chr(196)+chr(76)
The Function returns the encrypted strings used the Return-value from Dongle
CK_EYE(Port, @string1, 7)
CK_EYE(Port, @string2, 7)
string1 := val(string1)
string2 := val(string2)
if string1 + string2 <> 119
wrong Value
CHL_OFF(port)
CINT_ON()
quit
else
Encryption OK
CHL_OFF(port)
CINT_ON()
endif
RETURN (NIL)

Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: Read Partition Usb

Posted: Mon Dec 20, 2010 11:45 AM

I use a combination of MAC, BIOS and disk SN.
Best regards,
Otto

Posts: 401
Joined: Tue Jan 05, 2010 02:33 PM

Re: Read Partition Usb

Posted: Mon Dec 20, 2010 12:20 PM

uwe,
>because the User can duplicate the USB

the can copy the usb but he cannot Know and copy the secret partition ( if it exist)
I try coping the usb ... it copy only the master partition

FWH .. BC582.. xharbour

Continue the discussion