Notice
This package has been archived. It is outdated and follows bad patterns. For all future work, please refer to my new package Rodentify.
Hey people! I’m back on the grind with my very few community releases (I want to do more).
Spent the last hour or so rewriting my own module for checking if a request is from a Roblox game - but decided I may as well open source it as I know lots of people will find it useful!
What is it?
When your Roblox client joins a game, it asks the Roblox API for the IP address and port to send packets to. RoCheck basically does the same thing - it asks the Roblox API for the IP of a server. Using this information, we can compare it to the requesters IP address and we will know for sure that the request is from a Roblox game.
It is pretty much impossible to bypass. The only point of failure would be your bot cookie expiring or your method of getting the requesters IP. Keep in mind RoCheck does NOT compare IPs, it only retrieves the IP of the server. You must compare the IPs!
Use cases
There are various use cases for a module like this! For example, does your game have a private API? You can use this to be 100% sure a request is from that Roblox game. Let’s say a rouge developer leaks your API key, if you also use this method then you don’t have to worry about someone using that API key maliciously because the API will only work if the request is from your game!
How do I use it?
You can install the module with NPM by using the following console command npm i rocheck
. Then you can use the module like this:
const rocheck = require('rocheck')
rocheck(placeId, jobId, cookie).then(ip => {
console.log(ip)
}).catch(err => {
console.log(err)
})
Drawbacks
Because we basically get a bot account to join a game, the game server must be accessible to the bot. This means the game must be 100% public and > 1 max players. That’s pretty much the only requirement, though!
You could get around the game having to be public by giving your bot account access to the game somehow.
Feedback
This is my first NPM module ever, so I’d really appreciate some constructive feedback! Everyone is welcome to fork and improve upon the module, it’s an MIT license so you use it how you please
RoCheck for Python
Kwok6140 has ported RoCheck to Python. If you’d like to use a version for Python then that’s what you’re gonna want! I haven’t tested it properly myself, so you should contact Kwok if you have any issues with it.