How do I create a site lock security layer to my game?

Get help using Construct 2

Post » Thu Jun 12, 2014 7:00 am

@Ashley and community:

Is it possible to use the browser object to create a site-lock security layer to our games?. I would like to add this to my game as an added security measure before submitting for sponsorship or game portals. If it can't be done through the editor, does some one have a sample script to get me started?

Thank you in advanced, this feature will be a helpful way to further prevent misuse of hosted game files meant to be hosted only on certain sites...
B
106
S
20
G
8
Posts: 155
Reputation: 11,716

Post » Thu Jun 12, 2014 8:02 am

Just check the domain from the Browser object. The check can be removed by modifying the JS code though, so it's not very secure.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Fri Jun 13, 2014 7:18 am

Thanks @Ashley,

I was not able to find this within the browser object, can you point me to this specific action. Regarding your advice, I do agree even if its not foolproof, is still another layer of security added.

Many thanks.
B
106
S
20
G
8
Posts: 155
Reputation: 11,716

Post » Fri Jun 13, 2014 8:59 am

@Animate

There isn't a specific condition for this in the Browser object, but Browser.Domain is a value that you can compare.

For example,
To check a game is running from DropBox, do this:
System->Compare two values->Browser.Domain = "dl.dropboxusercontent.com"

You can output Browser.Domain to a Text or SpriteFont object to confirm what the domain is for your website.
Find all the Construct 2 games that were on Steam Greenlight here
B
35
S
9
G
7
Posts: 467
Reputation: 6,864

Post » Mon Jun 16, 2014 7:27 pm

@OddConfection

Thank you for the assistance. Will follow the steps suggested.

Thanks...
B
106
S
20
G
8
Posts: 155
Reputation: 11,716

Post » Wed Jun 10, 2015 2:09 pm

Ashley wrote:Just check the domain from the Browser object. The check can be removed by modifying the JS code though, so it's not very secure.

I think you can hide it in the JS code by creating the value to be compared using more variables and concatenate the values.
instead of comparing Browser.domain with ""www.scirra.com" it can be done like this:
var a = ww
var b = w.sci
var c = r
var d = ra.c
var e = om
and compare Browser.domain = a & b & c & d & e
Searching for http://www.scirra.com in the JS file will result in no findings
B
82
S
21
G
23
Posts: 517
Reputation: 18,731

Post » Wed Jun 10, 2015 2:13 pm

ImageImageImage
B
71
S
22
G
247
Posts: 3,756
Reputation: 137,558

Post » Sun Aug 16, 2015 8:29 pm

I hate to bump this thread, but I'm also curious about this. I assume JS = Javascript.

@stasuss -

" there is another way to secure the valid url - request it from the server via ajax. but this is not a total security, because response could be spoofed..

and there are some more. we can put our code into the png image.
[can't post links. lol. google for "script to png"]
but this way requires to implements a js-coded unpacker for this png image"

Does anyone know about this? 90% of google searches just show photoshop batch run files converting layers to PNG.

I'm assuming this "script to PNG" takes your code, and turns it into an image that cannot be modified as easily by malicious users?


Its easy for people to people to steal your assets and such, but can they also take the code you used to create the game (Since you're using the C2 engine I mean)

Are there more (as in, if anyone would be so kind as to link) advanced ways or tutorials or, maybe a "Not so simple way" of protecting your games after publishing?
B
6
S
2
Posts: 60
Reputation: 1,242

Post » Mon Aug 17, 2015 10:09 pm

The most secure way is to host your own servers and self-publish.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: dop2000, R0J0hound and 6 guests