Software Protection

Postby MOISES » 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!!!
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Postby Jeff Barnes » Thu Nov 08, 2007 1: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)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Postby MOISES » Thu Nov 08, 2007 8:25 pm

Thank you very much to you and Antonio for your work!!!!
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Postby hua » Fri Nov 09, 2007 7: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.
hua
 
Posts: 1047
Joined: Fri Oct 28, 2005 2:27 am

Postby Mike Buckler » Sun Nov 11, 2007 9: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
Mike Buckler
 
Posts: 67
Joined: Thu Jan 05, 2006 10:35 pm
Location: Canada

Postby Enrico Maria Giordano » Sun Nov 11, 2007 10:15 pm

Code: Select all  Expand view
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
User avatar
Enrico Maria Giordano
 
Posts: 8356
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Mike Buckler » Mon Nov 12, 2007 4:28 pm

That is why I proposed to embedded id of the usb drive.
Mike Buckler
 
Posts: 67
Joined: Thu Jan 05, 2006 10:35 pm
Location: Canada

Postby Antonio Linares » Mon Nov 12, 2007 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Mike Buckler » Mon Nov 12, 2007 7: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.
Mike Buckler
 
Posts: 67
Joined: Thu Jan 05, 2006 10:35 pm
Location: Canada

Postby Antonio Linares » Mon Nov 12, 2007 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Mon Nov 12, 2007 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Mon Nov 12, 2007 10:56 pm

This code detects the USB pendrives. Next step, get their IDs :-)
Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Antonio Linares, Google [Bot] and 50 guests