vito

  • Sr. Member
  • Posts: 405
A Great Idea
« on April 30th, 2016, 03:42 PM »
Is it possible to add function to make remote screenshots of the game? This is will be useful to detect txd mods like no-leafs generic.txd

aXXo

  • Full Member
  • Posts: 169
Re: A Great Idea
« Reply #1, on May 5th, 2016, 08:57 PM »
This will be very useful to detect and prevent cheaters.
However, there are certain possible abuses and limitations:

Assuming that it is feasible to create a client side screenshot function. What will the script do with the yielded screenshot?

Option 1: The scripts automatically uploads it to a server, where the server owners can review it.
Challenges: Possible abuse by server owners. They could put the function in an infinite loop and kill the player's/remote server's bandwidth due to infinite upload/download.

Option 2: The scripts store the screenshots in client's store folder locally. The server owner would need to request the player to share the screenshots if they need to be reviewed.
Challenges: Possible abuse by server owners. They could put the function in infinite loop and flood the player's hard-disk with screenshots. This is also somewhat unreliable, since the player could tamper the screenshots.

A solution could be to reserve slots for screenshots.
So, each store/<SERVER_IP>/screenshots should contain 10 files: image00, image01....image09. The screenshot taken replaces one of those files. It never creates a new file. That should solve the harddisk flood abuse.
Steps would also need to be taken to make the screenshots write protected and somehow unreadable to the player himself. No-one would hand over their own ban evidence :D

vito

  • Sr. Member
  • Posts: 405
Re: A Great Idea
« Reply #2, on May 5th, 2016, 09:22 PM »
Quote from aXXo on May 5th, 2016, 08:57 PM
Steps would also need to be taken to make the screenshots write protected and somehow unreadable to the player himself. No-one would hand over their own ban evidence :D
We can use semi-cryptography to make md5(unical_key_from_server + md5(image_file)) and send it back to server to check valid this file later. It's still can be hacked and it's not so big problem. Any realisation will be fine. But sending file right after creating screenshot will be better.

KAKAN

  • Wiki Contributor
  • Posts: 3,343
Re: A Great Idea
« Reply #3, on May 6th, 2016, 05:23 AM »
Quote from vito on May 5th, 2016, 09:22 PM
Quote from aXXo on May 5th, 2016, 08:57 PM
Steps would also need to be taken to make the screenshots write protected and somehow unreadable to the player himself. No-one would hand over their own ban evidence :D
We can use semi-cryptography to make md5(unical_key_from_server + md5(image_file)) and send it back to server to check valid this file later. It's still can be hacked and it's not so big problem. Any realisation will be fine. But sending file right after creating screenshot will be better.
Using own hashing system :D
I agree with this, +1.
oh no

EK.IceFlake

  • Hero Member
  • "We are the champions my fellahs" - Sufyan/VK.SuFy
  • Posts: 1,761
Re: A Great Idea
« Reply #4, on May 6th, 2016, 06:25 AM »
I agree with using transfer over network.
Squirrel and the server and its own bandwith simply cant handle enough packets to hog someones bandwith, and anyways, there obviously could be a limit of lets say 1 screenshot per second. You can use compression techniques or just a more efficient format such as png over bmp.

Hanney

  • Beta Tester Emeritus
  • Posts: 68
Re: A Great Idea
« Reply #5, on May 7th, 2016, 12:38 AM »
On the topic of remote screenshots it pops another thing into my mind. It would be nice if servers could have the ability to record the last 24-48 hours of chat logs on the server in a loop. There's been times where something has happened on the server that is related to chats between players whether it be lost money, scamming or whatever else. Sure there is player logs saved locally but there just .txt and .html files which can also be easily tampered with.

Stormeus

  • VC:MP Developer
  • oh god how did i get here im not good w computer
  • Posts: 1,127
Re: A Great Idea
« Reply #6, on May 7th, 2016, 01:00 AM »
Quote from Hanney on May 7th, 2016, 12:38 AM
On the topic of remote screenshots it pops another thing into my mind. It would be nice if servers could have the ability to record the last 24-48 hours of chat logs on the server in a loop. There's been times where something has happened on the server that is related to chats between players whether it be lost money, scamming or whatever else. Sure there is player logs saved locally but there just .txt and .html files which can also be easily tampered with.
Isn't this scriptable or programmable via plugin?

Bob

  • Hero Member
  • Posts: 777
Re: A Great Idea
« Reply #7, on May 7th, 2016, 07:33 AM »
First thing to pop in my mind is WriteIni onPlayerChat. As well pm messages.

The only thing I can think of is If you could use onScriptLoad on client to detect files. But even if onScriptLoad exist on client side I would never do so as you are basically getting files from another players pc and that's the worst thing you could do as a scripter ! Even though the detection would 100 percent be file names you are still getting files from another pc.

What would be nice is an xml setting to detect the size of modified .txd files. Keeping your pc away from viruses and who knows what.

vito

  • Sr. Member
  • Posts: 405
Re: A Great Idea
« Reply #8, on May 7th, 2016, 07:59 AM »
Hanney, any chats is absolutly server-side, so just ask your server's admin to store logs.

Hashing every file in data and models its too long time... And not help in some cases.