Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

7 May, 2024: fms is rebuilding. Don't expect much in that section for quite a few days, maybe longer.


devel / comp.lang.xharbour / Re: I wanted to find an anti-software piracy solution

SubjectAuthor
* I wanted to find an anti-software piracy solutionreina...@gmail.com
+- Re: I wanted to find an anti-software piracy solutionDan
`* Re: I wanted to find an anti-software piracy solutionCV
 `- Re: I wanted to find an anti-software piracy solutionreina...@gmail.com

1
I wanted to find an anti-software piracy solution

<cff1c93c-9401-4fac-98ba-b88894a6fda3n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17244&group=comp.lang.xharbour#17244

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a37:9a08:0:b0:73b:37b:9053 with SMTP id c8-20020a379a08000000b0073b037b9053mr418182qke.321.1676301393633;
Mon, 13 Feb 2023 07:16:33 -0800 (PST)
X-Received: by 2002:a0d:e0c3:0:b0:4fd:d979:28ba with SMTP id
j186-20020a0de0c3000000b004fdd97928bamr2953482ywe.326.1676301393357; Mon, 13
Feb 2023 07:16:33 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Mon, 13 Feb 2023 07:16:33 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=2804:17bc:15f:d200:106f:398:da76:8a05;
posting-account=yZJwlQoAAADzKZZdom395T93hGRZPX0-
NNTP-Posting-Host: 2804:17bc:15f:d200:106f:398:da76:8a05
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cff1c93c-9401-4fac-98ba-b88894a6fda3n@googlegroups.com>
Subject: I wanted to find an anti-software piracy solution
From: reinaldohf@gmail.com (reina...@gmail.com)
Injection-Date: Mon, 13 Feb 2023 15:16:33 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1458
 by: reina...@gmail.com - Mon, 13 Feb 2023 15:16 UTC

Hello developers,
I know you don't have much free time.
So I wanted to find an anti-software piracy solution. I've been thinking about creating a server/client with a socket, and hosting it in the cloud, to run in the cloud, and the client checking if it is enabled to continue running my system.

I really don't know how to do this above.

So thanks a lot for any help,

Reynaldo Henrique

Re: I wanted to find an anti-software piracy solution

<tsfkp6$2fsou$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17245&group=comp.lang.xharbour#17245

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: webmaster@appliserver.com (Dan)
Newsgroups: comp.lang.xharbour
Subject: Re: I wanted to find an anti-software piracy solution
Date: Tue, 14 Feb 2023 10:37:37 +0100
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <tsfkp6$2fsou$1@dont-email.me>
References: <cff1c93c-9401-4fac-98ba-b88894a6fda3n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Feb 2023 09:37:46 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="5488a2b7cc76c99da40058b1e5932948";
logging-data="2618142"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pfRsvIZejN7qr6zfW5arG"
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Cancel-Lock: sha1:cpDkcKH1D8I5VaTZQQcACsPolpA=
In-Reply-To: <cff1c93c-9401-4fac-98ba-b88894a6fda3n@googlegroups.com>
 by: Dan - Tue, 14 Feb 2023 09:37 UTC

Il 13/02/2023 16:16, reina...@gmail.com ha scritto:
> Hello developers,
> I know you don't have much free time.
> So I wanted to find an anti-software piracy solution. I've been thinking about creating a server/client with a socket, and hosting it in the cloud, to run in the cloud, and the client checking if it is enabled to continue running my system.
>
> I really don't know how to do this above.
>
> So thanks a lot for any help,
>
> Reynaldo Henrique

I don't know how to run a xHarbour program "in the cloud" but with a
standard hosting you can do a lot.

You could run a CGI program on a provider's server. A program that will
be executed by the Web server at request. Since providers offer this
possibility only on Linux hosts, the CGI must be compiled under Linux.

Or try a javascript solution: you can have a page on your website, with
a name difficult to guess, containing a list of valid licences and a
Javascript program. When the page is invoked, some parameters are passed
along with the URL
(www.mysite.com/Aasw54Xzvp0.html?param=1&opt=abcdef...). The script in
the page reads the parameters and emits an answer. Every time you create
a new licence, you must update the page of course. (Untested).

I suppose that other solutions are possible with PHP and SQL.

The desktop app should create a socket, emit the request to the server
and wait for an answer, then process the answer.

HTH
Dan

Re: I wanted to find an anti-software piracy solution

<11484a50-3f05-46e9-895c-66209b412d7bn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17248&group=comp.lang.xharbour#17248

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a37:8244:0:b0:705:b29d:c666 with SMTP id e65-20020a378244000000b00705b29dc666mr286748qkd.462.1676548184453;
Thu, 16 Feb 2023 03:49:44 -0800 (PST)
X-Received: by 2002:a81:9384:0:b0:4fd:d979:28ba with SMTP id
k126-20020a819384000000b004fdd97928bamr768034ywg.326.1676548184128; Thu, 16
Feb 2023 03:49:44 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Thu, 16 Feb 2023 03:49:43 -0800 (PST)
In-Reply-To: <cff1c93c-9401-4fac-98ba-b88894a6fda3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=152.170.233.99; posting-account=PzJOtwoAAAB-nLPGTsEPjzvj-I7nsyBK
NNTP-Posting-Host: 152.170.233.99
References: <cff1c93c-9401-4fac-98ba-b88894a6fda3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <11484a50-3f05-46e9-895c-66209b412d7bn@googlegroups.com>
Subject: Re: I wanted to find an anti-software piracy solution
From: cvoskian@gmail.com (CV)
Injection-Date: Thu, 16 Feb 2023 11:49:44 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 177
 by: CV - Thu, 16 Feb 2023 11:49 UTC

El lunes, 13 de febrero de 2023 a la(s) 12:16:34 UTC-3, reina... @ gmail.com escribió:
> Hello developers,
> I know you don't have much free time.
> So I wanted to find an anti-software piracy solution. I've been thinking about creating a server/client with a socket, and hosting it in the cloud, to run in the cloud, and the client checking if it is enabled to continue running my system.
>
> I really don't know how to do this above.
>
> So thanks a lot for any help,
>
> Reynaldo Henrique

Hi Reynaldo

I have developed an applet for taking snapshots (screenshots) from users periodically, and the pictures are sent to a "server" hosted wherever you wish, as it depends on internet service (it could be a server in the LAN or in any other external host).
It is based on the code below, obviously modified in many different ways.

This code was published in the docs for the xharbour.com flavour.

Hope it serves for your purpose.
Regards
--
Claudio Voskian
Buenos Aires - Argentina

---
// Server side
// This example is the server side of a TCP/IP communication between
// processes. The server socket is created with INetServer() and then
// configured with a timeout value. As a result, INetAccept() returns
// every half second when there is no connection request. This allows
// for querying the keyboard two times a second and check if the user
// pressed a key to terminate the server process.
//
// Note: the example must be built as multi-threading application
// e.g. Xbuild -mt TestServer

PROCEDURE Main
LOCAL pServer, pClient

CLS

INetInit()

// listen on port 1800
pServer := INetServer( 1800 )

// stop listening after .5 seconds
INetSetTimeout( pServer, 500 )

? "Server up and running", pServer
? "Press any key to quit"

DO WHILE Inkey(.1) == 0
// wait for incoming connection requests
pClient := INetAccept( pServer )

IF INetErrorCode( pServer ) == 0
// process client request in separate thread
StartThread( @ServeClient(), pClient )
ELSE
// display some kind of "I am still alive" message
?? "."
ENDIF
ENDDO

// make sure second thread has ended
WaitForThreads()

// close socket and cleanup memory
INetClose( pServer )
INetCleanup()
RETURN

PROCEDURE ServeClient( pSocket )
LOCAL cBuffer, nBytes, cData := ""

// display IP address of client
? "Serving:", INetAddress( pSocket )

// wait until data containing CRLF has arrived
// (this is blocking the thread)
cData := INetRecvLine( pSocket, @nBytes )

? "Bytes received:", nBytes
? "Data received:", cData

cData := "Server reports: " + ;
LTrim(Str( nBytes )) + ;
" bytes " + INetCRLF()

// report to client process
INetSend( pSocket, cData )
RETURN


// Client side
// This example is the client side of a TCP/IP communication between
// processes. The server IP address defaults to "127.0.0.1", which is
// the IP address of the local station. The user can enter data in a
// single GET. This data is transferred to the server process, and the
// response of the server process is displayed in the client process.
//
// Note: the example can be built as a single threaded application
// e.g. Xbuild TestClient

#include "Inkey.ch"

PROCEDURE Main( cServerIPAddress )
LOCAL pSocket, cData, nBytes

IF Empty( cServerIPAddress )
// IP address of the local station
cServerIPAddress := "127.0.0.1"
ENDIF

INetInit()

DO WHILE Lastkey() <> K_ESC
CLS

// let the user enter some data
cData := Space(80)
@ 2,2 SAY "Enter a string:" GET cData PICTURE "@S30"
READ

IF Lastkey() == K_ESC
EXIT
ENDIF

cData := Trim( cData )
nBytes := Len ( cData )

// connect to server on port 1800
pSocket := INetConnect( cServerIPAddress, 1800 )

IF INetErrorCode( pSocket ) <> 0
? "Socket error:", INetErrorDesc( pSocket )
INetCleanUp()
QUIT
ENDIF

// Send data and append "new line" characters
// This is what the "example server" expects
INetSend( pSocket, cData + INetCRLF() )

CLS
? "sent:", LTrim(Str(nBytes)), "bytes"

// Receive the server's response
cData := ""

DO WHILE nBytes > 0
cBuffer := Space( 100 )
nBytes := INetRecv( pSocket, @cBuffer )
cData += Left( cBuffer, nBytes )
ENDDO

// disconnect from server
INetClose( pSocket )

? "received:", cData
WAIT
ENDDO

INetCleanUp()
RETURN
---

Re: I wanted to find an anti-software piracy solution

<9e1edad7-332a-46b8-aa5f-467a58311b0an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17249&group=comp.lang.xharbour#17249

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a0c:abc5:0:b0:56e:a791:3a2d with SMTP id k5-20020a0cabc5000000b0056ea7913a2dmr503884qvb.31.1676784360914;
Sat, 18 Feb 2023 21:26:00 -0800 (PST)
X-Received: by 2002:a81:7dc1:0:b0:527:81c8:8b87 with SMTP id
y184-20020a817dc1000000b0052781c88b87mr667356ywc.116.1676784360611; Sat, 18
Feb 2023 21:26:00 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Sat, 18 Feb 2023 21:26:00 -0800 (PST)
In-Reply-To: <11484a50-3f05-46e9-895c-66209b412d7bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2804:17bc:14b:8700:61ff:e053:3817:1204;
posting-account=yZJwlQoAAADzKZZdom395T93hGRZPX0-
NNTP-Posting-Host: 2804:17bc:14b:8700:61ff:e053:3817:1204
References: <cff1c93c-9401-4fac-98ba-b88894a6fda3n@googlegroups.com> <11484a50-3f05-46e9-895c-66209b412d7bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9e1edad7-332a-46b8-aa5f-467a58311b0an@googlegroups.com>
Subject: Re: I wanted to find an anti-software piracy solution
From: reinaldohf@gmail.com (reina...@gmail.com)
Injection-Date: Sun, 19 Feb 2023 05:26:00 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2314
 by: reina...@gmail.com - Sun, 19 Feb 2023 05:26 UTC

Hello
> Hello developers,
> > I know you don't have much free time.
> > So I wanted to find an anti-software piracy solution. I've been thinking about creating a server/client with a socket, and hosting it in the cloud, to run in the cloud, and the client checking if it is enabled to continue running my system.
> >
> > I really don't know how to do this above.
> >
> > So thanks a lot for any help,
> >
> > Reynaldo Henrique
> Hi Reynaldo
>
> I have developed an applet for taking snapshots (screenshots) from users periodically, and the pictures are sent to a "server" hosted wherever you wish, as it depends on internet service (it could be a server in the LAN or in any other external host).
> It is based on the code below, obviously modified in many different ways.
>
> This code was published in the docs for the xharbour.com flavour.
>

Helo Claudio,

Thank you very much.

I tested the codes, and it worded very well. I doesn't compiled with xharbour but only with xharbour builder.

Reynaldo Henrique

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor