FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Software Protection
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
Software Protection
Posted: Thu Nov 08, 2007 12:40 PM

Thank you jeff. Now I understand, the array musy be completed with proper values provided when you buy the product.

Also, I suppose that you have to include a dll into the software folder. Do you have to include the .exe file in the usb?

And, by the way, are you happy with this software?.

Thank you!!!

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Software Protection
Posted: Thu Nov 08, 2007 01:46 PM

You do need to include the DLL in the folder where your exe is.

You do not need to add anything to the usb drive, just use the make program to set it as a valid key and that's all you need to do the the usb drive.

Note: the usb drive can still be used as a regular drive, you can copy and delete files as normal.

>>Am I happy with the software<<
Antonio and I are still working out some Fivewin code setup.
What I have tested so far is very promising.

Once the final changes have been completed we will post the code here.

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
Software Protection
Posted: Thu Nov 08, 2007 08:25 PM

Thank you very much to you and Antonio for your work!!!!

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Software Protection
Posted: Fri Nov 09, 2007 07:42 PM

Jeff, thanks for the tip. This looks interesting. I'm curious however whether softwares that are protected using this method can run on Win9x? Their webpage states among the system requirement is XP/2000/Vista etc. No mention of win 9x at all.

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 67
Joined: Thu Jan 05, 2006 10:35 PM
Software Protection
Posted: Sun Nov 11, 2007 09:39 PM
I found this vb6 code on the net. I tested it here under xp home, xp pro and vista and it returned the usb memory drive info. Id does not work on win98.

If anyone can translate this vp6 app we could all use usb memory drives as software protection keys.

Private Sub Form_Load()
Dim colProcessList
Dim objprocess
Set colProcessList = GetObject("Winmgmts:").ExecQuery("Select * from Win32_DiskDrive ")
For Each objprocess In colProcessList
If Mid(objprocess.PnPDeviceID, 1, 7) = "USBSTOR" Then
List1.AddItem objprocess.PnPDeviceID
End If
Next
Set colProcessList = Nothing
Set objprocess = Nothing
End Sub


This would make one of the simplest and inexpensive software protection methods around. The thought is - save the usb drive info to an encrypted dbf file that is already in your software package, preferably a file that holds a lot of setting for your application. Then on startup check the key.
You will have to select usb ram drives carefully not all have serial numbers.

Any thoughts or comments appreciated.
Mike Buckler
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Software Protection
Posted: Sun Nov 11, 2007 10:15 PM
FUNCTION MAIN()

    LOCAL oLoc := CREATEOBJECT( "wbemScripting.SwbemLocator" )
    LOCAL oSrv := oLoc:ConnectServer()
    LOCAL oJbs := oSrv:ExecQuery( "SELECT * FROM Win32_DiskDrive" )

    LOCAL oJob

    FOR EACH oJob IN oJbs
//        IF SUBSTR( oJob:PnPDeviceID, 1, 7 ) = "USBSTOR" Then
            ? oJob:PnPDeviceID
//        ENDIF
    NEXT

    INKEY( 0 )

    RETURN NIL


EMG
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Software Protection
Posted: Mon Nov 12, 2007 12:33 AM

I wonder how good is this protection system if the USB pendrive containts get cloned...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 67
Joined: Thu Jan 05, 2006 10:35 PM
Software Protection
Posted: Mon Nov 12, 2007 04:28 PM

That is why I proposed to embedded id of the usb drive.

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Software Protection
Posted: Mon Nov 12, 2007 06:05 PM

Mike,

But the usb drive id is defined by software or hardware ?

When you do a dir of it, you get its id. Will it will remain the same if we reformat it ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 67
Joined: Thu Jan 05, 2006 10:35 PM
Software Protection
Posted: Mon Nov 12, 2007 07:08 PM

To Test I checked the serial before and after format of the use drive and it returned the same.
I also tried formatting it on an ex pro station and a vista home station and it returned the same.

So I believe that it is returning the hardware id.

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Software Protection
Posted: Mon Nov 12, 2007 07:14 PM

> So I believe that it is returning the hardware id.

In that case then its a valid tool for software protection, though no extra software should be required. Just check the usb drive ID, encrypt it and store it.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Software Protection
Posted: Mon Nov 12, 2007 09:40 PM

Jeff, Mike,

If we are able to locate the UDB pendrive ID then we can protect the application using standard FWH code :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Software Protection
Posted: Mon Nov 12, 2007 10:56 PM
This code detects the USB pendrives. Next step, get their IDs :-)
#include "FiveWin.ch"

#define DRIVE_REMOVABLE   2

function Main()

   local nBitDrives := GetLogicalDrives(), n, cDrive
   
   for n = 1 to 32
      if lAnd( nBitDrives, 2 ^ ( n - 1 ) )
         cDrive = Chr( Asc( "A" ) - 1 + n ) + ":\"
         if n != 1 .and. GetDriveType( cDrive ) == DRIVE_REMOVABLE        
            MsgInfo( "USB pendrive: " + CRLF + cDrive )
         endif   
      endif
   next

return nil

#pragma BEGINDUMP

#include <hbapi.h>
#include <windows.h>

HB_FUNC( GETLOGICALDRIVES )
{
   hb_retnl( GetLogicalDrives() );
}

HB_FUNC( GETDRIVETYPE )
{
   hb_retnl( GetDriveType( hb_parc( 1 ) ) );
}   	

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Software Protection
Posted: Mon Nov 12, 2007 11:08 PM

To get the USB pendrive is as easy as (in the above code):

        MsgInfo( "USB pendrive: " + CRLF + cDrive, nSerialHD( cDrive ) )

Getting closer to have our own based USB pendrive copy protection system... :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Software Protection
Posted: Mon Nov 12, 2007 11:22 PM

Mike,

I have formated a pendrive several times here, and everytime it gets a new volume ID. A complete format, not a quick one.

Not good...

regards, saludos

Antonio Linares
www.fivetechsoft.com