NW.js Is Vulnerable (Developer Tools Can Be Accessed!)

Bugs will be moved here once resolved.

Post » Tue Aug 16, 2016 10:47 am

I think there's an interesting analogy with fan games. Some people (quite possibly a non-overlapping section of users to those posting here) like to make their own versions of Mario, Sonic, etc. and end up using ripped sprites. Firstly even these big companies can't stop people getting hold of artwork and such, even if they originate from cartridge-based systems. People find ways to rip it, or they just take them off screenshots, promotional imagery, or whatever they can find. Secondly they sometimes get upset when these big companies send them cease-and-desists, sometimes trying to frame it as "just trying to have some fun" (note these companies usually have a legal obligation to defend their work in order to keep their trademarks and such). Ultimately I think the same process will occur with your own games, you're just an indie dev instead of a megacorp.
Scirra Founder
B
402
S
238
G
89
Posts: 24,613
Reputation: 195,993

Post » Tue Aug 16, 2016 11:47 am

irbis wrote:@TheRealDannyyy @shinkan Old news. Me and many others had been reporting this from like forever. No one gave a damn back then, and I don't think they started caring here and now. Plus, they are too busy adding that Xbox support that no one will ever use :D
newt wrote:You could encode everything into base64 strings, and load it that way.
It would bloat the already bloated nwjs export of course.
shinkan wrote:@TheRealDannyyy and you will.
"Hackers" or "Pirates" are not the issue here. They don't care about your assets, they just want to crack your game so other people can play it for free.
The real issue here are "modern teenage devs" raised on internet and cracked games. Too lazy or too cheap to make/paid for their own assets they will take all ...

Wow you guys are finally coming out of your shells? :roll:
Those are things that I would normally say and receive hate and threatening E-Mails for...


Ashley wrote:I think there's an interesting analogy with fan games. Some people (quite possibly a non-overlapping section of users to those posting here) like to make their own versions of Mario, Sonic, etc. and end up using ripped sprites. Firstly even these big companies can't stop people getting hold of artwork and such ...

It depends on the case, nowadays pretty much any kind of game mechanic could be marked as "stolen" from X games.
For me personally it doesn't matter if someone is trying to copy my games basic mechanics and add some unique changes to it.
It's more about the fact that people would try to steal my whole IP, including my games art.
I highly doubt that we can do something about that anyway, at least as an indie developer.

There was recently a case of a big company shutting down a fangame (Metroid 2 clone I believe), which received a tremendous amount of hate from the community.
That's basically why I want to try to prevent a case like that from happening beforehand.

In my perspective it's like one of the following, without proper prevention:
A - Let the "fans" do what they want = Possible drop in sales because of look-alike copies of my game
B - Block/shut down fangames using the law = Possible drop in sales because of you forcing a shutdown of a popular fan game

Besides all of that, I still don't know how much control you actually have with NWjs @Ashley.
Do you manage all the folders and archives or does NWjs handle everything and you have to deal with it?
I would like to suggest things that are actually possible with the current setup of exporting desktop games.
ImageImageImage
B
68
S
24
G
78
Posts: 683
Reputation: 45,281

Post » Tue Aug 16, 2016 4:30 pm

Well, if you want unhackable software, it's not possible!

We basically bundle the game data with NW.js and that's it. If you make actual suggestions of changes, I could perhaps evaluate them.
Scirra Founder
B
402
S
238
G
89
Posts: 24,613
Reputation: 195,993

Post » Tue Aug 16, 2016 5:39 pm

Ashley wrote:Well, if you want unhackable software, it's not possible!

I know and I accept that no changes will be made about that because it would be pointless as you already stated.

Ashley wrote:We basically bundle the game data with NW.js and that's it. If you make actual suggestions of changes, I could perhaps evaluate them.

My suggestion would go more into the "personal preference" category of suggestions and actually not be really useful.

I personally like my games folder to be clean and each file to be sorted into folders and sub-folders.
The packaging of assets into a single file for example is a thing that I like, maybe other files such as dll's or some of the
other random (surely useful) files that can be found inside the exported game folder, could also be sorted like that.

That's basically why I asked on how much control you actually have about NWjs and it's file structure.
Again, I don't think that this is something with high priority. As long as everything works I'm ok with it.

Well, I think this "Bugreport" went a little too far but I'd like to thank everyone, who participated in this discussion.
If someone thinks that there is still a lot to discuss about, feel free to create a topic in the general section. ;)
ImageImageImage
B
68
S
24
G
78
Posts: 683
Reputation: 45,281

Post » Fri Oct 21, 2016 3:10 am

I know that this bug report is closed, however for people that stumble upon this post for a fix here you go:
1. Add the "browser" plugin to your project
2. Add an event "on start of layout" (you might have to use it on a globally included eventsheet)
3. Add the browser action "execute Javascript" and use the code from below
4. All right click actions should be blocked from now on

Code:
Code: Select all
"document.addEventListener('contextmenu', function(e){e.preventDefault();}, false);"
ImageImageImage
B
68
S
24
G
78
Posts: 683
Reputation: 45,281

Post » Fri Oct 21, 2016 6:15 am

TheRealDannyyy wrote:I know that this bug report is closed, however for people that stumble upon this post for a fix here you go:
1. Add the "browser" plugin to your project
2. Add an event "on start of layout" (you might have to use it on a globally included eventsheet)
3. Add the browser action "execute Javascript" and use the code from below
4. All right click actions should be blocked from now on

Code:
Code: Select all
"document.addEventListener('contextmenu', function(e){e.preventDefault();}, false);"



Thank you so much!! It won't happen anymore :twisted: :twisted:
B
66
S
22
G
4
Posts: 360
Reputation: 6,584

Post » Tue Oct 25, 2016 4:10 pm

TheRealDannyyy wrote:I know that this bug report is closed, however for people that stumble upon this post for a fix here you go:
1. Add the "browser" plugin to your project
2. Add an event "on start of layout" (you might have to use it on a globally included eventsheet)
3. Add the browser action "execute Javascript" and use the code from below
4. All right click actions should be blocked from now on

Code:
Code: Select all
"document.addEventListener('contextmenu', function(e){e.preventDefault();}, false);"



There is a similiar thing happening when middle-mouse clicking: it appears a scrolling icon and the some key actions are prevented unless i remove it. Is there a way to disable it too?
B
66
S
22
G
4
Posts: 360
Reputation: 6,584

Post » Tue Oct 25, 2016 4:56 pm

Danwood wrote:There is a similiar thing happening when middle-mouse clicking: it appears a scrolling icon and the some key actions are prevented unless i remove it. Is there a way to disable it too?

Could you provide more details please, maybe screenshots?
Also please note that I only tested this using NWjs, the result of this script may vary using other browsers.


EDIT: Never mind I know what you mean now, I thought there were problems with the script.
To be honest I have no clue how to prevent that icon from appearing, there might be a way to block the button itself.
I'll ask this question to some experienced JS devs, they might find an easy solution for you soon.
ImageImageImage
B
68
S
24
G
78
Posts: 683
Reputation: 45,281

Post » Tue Oct 25, 2016 6:28 pm

TheRealDannyyy wrote:Could you provide more details please, maybe screenshots?
Also please note that I only tested this using NWjs, the result of this script may vary using other browsers.


EDIT: Never mind I know what you mean now, I thought there were problems with the script.
To be honest I have no clue how to prevent that icon from appearing, there might be a way to block the button itself.
I'll ask this question to some experienced JS devs, they might find an easy solution for you soon.



Thank you! I tried to take a screenshot but as i press any button the icon disappears. It's problematic not for the icon itself, but the fact it makes it difficult to properly use the middle mouse button.
B
66
S
22
G
4
Posts: 360
Reputation: 6,584

Post » Wed Oct 26, 2016 7:50 am

Danwood wrote:Thank you! I tried to take a screenshot but as i press any button the icon disappears. It's problematic not for the icon itself, but the fact it makes it difficult to properly use the middle mouse button.

Yeah you would have to use an auto-screenshot program with a delay to screenshot that, whoops :roll: .

Anyway, thanks to the JS magician Armaldio I've got this for you:
1. Add the "browser" plugin to your project
2. Add an event "on start of layout" (you might have to use it on a globally included eventsheet)
3. Add the browser action "execute Javascript" and use the code from below

4. Set an ID for the form element(s) where you want to prevent middle clicking
5. Replace the ID inside the script with the ID you want to use (I've already set "test" as the ID in the script below, just replace the word after the "#" to whatever you like.)
6. Middle clicking is now no longer an option, you rule over the middle click function now! :twisted:

Code: Select all
"$(function(){$('#test').mousedown(function(e){if(e.button==1)return false});});"


By the way, I think that it should be possible to implement features like this into the plugins themselves.
If someone thinks about doing a "form +" plugin with additional features, feel free to add the stuff from above.
ImageImageImage
B
68
S
24
G
78
Posts: 683
Reputation: 45,281

PreviousNext

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests