URGENT - Serial number over network

URGENT - Serial number over network

Postby Jeff Barnes » Wed Jan 31, 2007 8:14 pm

Hi Everybody,

I have a situation that I hope someone can help with....

I use a "software key" to protect my application from unauthorized copies.
The key is based on the serial number of the hard drive (nSerialHD())

I have just been asked if it is possible to install my program on a network and have others access the .exe via a shared drive letter.

The program runs but of course it looks at the LOCAL computers hard drive for the serial number not where the program is actually sitting (lets say drive X:)

Is it possible to get the serial number of the system where the program is sitting?


Thanks,

Jeff
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: URGENT - Serial number over network

Postby Enrico Maria Giordano » Wed Jan 31, 2007 8:36 pm

You may try

Code: Select all  Expand view
nSerialHD( "X:\" )


where X is the network mapped drive but I'm not sure it will work.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby James Bott » Thu Feb 01, 2007 9:01 am

Jeff,

You may want to try searching the forum for this. I seem to remember some discussion about this awhile back.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Rochinha » Thu Feb 01, 2007 1:29 pm

Hello Friends

I use one proprietary solution, geting a serial number in the server with nSerialHD, inputing a password code liberation and saving inside .EXE. The application runs on other computer with no problems, but don't moved.

Original post in http://www.pctoledo.com.br/forum/viewtopic.php?t=3275

But you can test NSLock.OCX too, review this post:

http://fivetechsoft.com/forums/viewtopi ... ght=nslock
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Postby Rochinha » Thu Feb 01, 2007 1:48 pm

Hii

I found this too:

Code: Select all  Expand view
#include "struct.ch"

function NetSerialNumber()
   local oNCB, oAdapterStatus, cBuffer
   STRUCT oNCB
      MEMBER command  AS BYTE
      MEMBER retcode  AS BYTE
      MEMBER lsn      AS BYTE
      MEMBER num      AS BYTE
      MEMBER buffer   AS LONG
      MEMBER length   AS LONG
      MEMBER callname AS STRING LEN 16
      MEMBER name     AS STRING LEN 16
      MEMBER rto      AS BYTE
      MEMBER sto      AS BYTE
      MEMBER post     AS LONG
      MEMBER lana_num AS BYTE
      MEMBER cmd_cplt AS BYTE
      MEMBER reserve  AS STRING LEN 10
      MEMBER event    AS LONG
      MEMBER dummy    AS STRING LEN 30
   ENDSTRUCT
   STRUCT oAdapterStatus
      MEMBER address           AS STRING LEN 6
      MEMBER rev_major         AS BYTE
      MEMBER reserved0         AS BYTE
      MEMBER adapter_type      AS BYTE
      MEMBER rev_minor         AS BYTE
      MEMBER duration          AS LONG
      MEMBER frmr_recv         AS LONG
      MEMBER frmr_xmit         AS LONG
      MEMBER iframe_recv_err   AS LONG
      MEMBER xmit_aborts       AS LONG
      MEMBER xmit_success      AS LONG
      MEMBER recv_success      AS LONG
      MEMBER iframe_xmit_err   AS LONG
      MEMBER recv_buff_unavail AS LONG
      MEMBER t1_timeouts       AS LONG
      MEMBER ti_timeouts       AS LONG
      MEMBER reserved1         AS LONG
      MEMBER free_ncbs         AS LONG
      MEMBER max_cfg_ncbs      AS LONG
      MEMBER max_ncbs          AS LONG
      MEMBER xmit_buf_unavail  AS LONG
      MEMBER max_dgram_size    AS LONG
      MEMBER pending_sess      AS LONG
      MEMBER max_cfg_sess      AS LONG
      MEMBER max_sess          AS LONG
      MEMBER max_sess_pkt_size AS LONG
      MEMBER name_count        AS LONG
   ENDSTRUCT
   oNcb:command = 50 // NCBRESET
   MsgInfo( oNcb:command )
   MsgInfo( Netbios( oNcb:cBuffer ) )
   MsgInfo( oNcb:retcode )
   oNcb:command  = 51 // NCBASTAT
   oNcb:buffer   = GETVDMP32( StrPtr( oAdapterStatus:cBuffer ) )
   oNcb:length   = oAdapterStatus:SizeOf()
   oNcb:callname = "*" + space( 15 )
   MsgInfo( Netbios( oNcb:cBuffer ) )
   MsgInfo( oNcb:retcode )

return DecToHex( Asc( SubStr( oAdapterStatus:address, 1, 1 ) ) ) + ;
       DecToHex( Asc( SubStr( oAdapterStatus:address, 2, 1 ) ) ) + ;
       DecToHex( Asc( SubStr( oAdapterStatus:address, 3, 1 ) ) ) + ;
       DecToHex( Asc( SubStr( oAdapterStatus:address, 4, 1 ) ) ) + ;
       DecToHex( Asc( SubStr( oAdapterStatus:address, 5, 1 ) ) ) + ;
       DecToHex( Asc( SubStr( oAdapterStatus:address, 6, 1 ) ) )

DLL32 FUNCTION Netbios( pncb AS LPSTR ) AS LONG PASCAL LIB "NETAPI32.DLL"
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Postby Jeff Barnes » Fri Feb 02, 2007 12:23 am

Thanks everybody.
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

posible solucion

Postby sildata » Wed Feb 07, 2007 1:20 pm

Trata de que se revise o chequee el numero serial solo y exclusivamente desde el equipo servidor con una funcion de CTIII que se llama NETDISK()
o algo parecido de esta manera cualquiera estacion de trabajo no verifica este numero y podra correr libremente, a mi me funciona pruebala.
Saludos
Rodolfo Silva
sildata@cantv.net
sildata
 
Posts: 38
Joined: Thu May 11, 2006 7:41 pm

Postby Silvio » Thu Feb 08, 2007 9:31 am

How I can show in a window all pc link to me ( server) ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Milan Mehta » Fri Feb 09, 2007 10:59 am

Hello rochinha,

From where can I get NLSOCK.OCX ?

With best regards,

Milan.

Rochinha wrote:Hello Friends

I use one proprietary solution, geting a serial number in the server with nSerialHD, inputing a password code liberation and saving inside .EXE. The application runs on other computer with no problems, but don't moved.

Original post in http://www.pctoledo.com.br/forum/viewtopic.php?t=3275

But you can test NSLock.OCX too, review this post:

http://fivetechsoft.com/forums/viewtopi ... ght=nslock
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Postby Rochinha » Fri Feb 09, 2007 3:41 pm

Here

Macoratti.NET

This is my test:
Code: Select all  Expand view
// FiveWin ActiveX support demo - Using Adobe Acrobat Reader

#include "FiveWin.ch"

function Main()

   local oWnd, oActiveX, cLiberationKey := space(16)

   DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support"

   oActiveX = TActiveX():New( oWnd, "nslock15vb5.ActiveLock" )

   oActiveX:Do( "Password"           , "rochinha" )
   oActiveX:Do( "SoftwareName"       , "5Volution" )
   oActiveX:Do( "LiberationKeyLength", 16 )
   oActiveX:Do( "SoftwareCodeLength" , 16 )

   //? oActiveX:GetProp( "SoftwareCode" )

   if ! oActiveX:GetProp( "RegisteredUser" )
      MsgGet( "Entre a chave de liberacao",; // Title
              "Chave:",;                     // Label
              @cLiberationKey )              // A variable by reference
      oActiveX:Do( "LiberationKey", cLiberationKey )
   endif

   if ! oActiveX:GetProp( "RegisteredUser" )
      if oActiveX:GetProp( "LastRunDate" ) > date()
         ? 'Data foi retrocedida. Programa sera encerrado'
      else
         ? 'Faltam ' + Str( 30 - oActiveX:GetProp( "UsedDays" ) ) + ' dias.'
      endif
      ? 'DEMONSTRACAO'
      oWnd:cCaption := 'DEMONSTRACAO'
      SysRefresh()
   else
      ? 'REGISTRADO'
      oWnd:cCaption := 'REGISTRADO'
      SysRefresh()
   endif

   //oWnd:oClient = oActiveX // To fill the entire window surface

   ACTIVATE WINDOW oWnd

return nil


I'm test in Windows Server 2003.
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 25 guests