Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@2003scape/rsc-data-server
Advanced tools
manage rsc-server worlds, player persistence, friends, etc.
manage rsc-server worlds, player storage, friend communication, etc. jagex refered to theirs as the loginserver. this server uses JSON to communicate with rsc-server over TCP or UNIX file sockets for IPC.
# npm install @2003scape/rsc-data-server # -g for the CLI program
const Server = require('@2003scape/rsc-data-server');
const fs = require('fs').promises;
(async () => {
const config = JSON.parse(await fs.readFile('./config.json'));
const server = new Server(config);
await server.init();
})();
$ rsc-data-server -c /etc/rsc-data-server/config.json
{
"sockFile": "/tmp/rsc-data-server.sock", // unix IPC socket files
"port": 8001, // optional TCP port
"sqliteFile": "./rsc-data-server.sqlite",
// default is "test"
"password": "$2y$10$wufvP1CJMLYmBHKl2Ah2k.CGQwQV5aUMIcXrPNUfmqJ9ibNhhvFnS",
"passwordHashRounds": 12,
"recoveryHashRounds": 15,
"playersPerIp": 1
}
rsc-data-server responds to JSON messages with the .handler
property set to
the following:
authenticate rsc-server or rsc-www instance to allow the rest of the handlers to be used.
{
handler; 'authenticate',
password: 'test'
}
returns:
{
success: true, // or false
error: '' // if success false
}
initialize an rsc-server for players to login to.
{
handler; 'worldConnect',
id: 1, // 1-254
tcpPort: 43594,
websocketPort: 43595,
members: false, // or true
country: 'CAN' // ISO 3166-1 alpha-3
}
returns:
{
success: true, // or false
error: '' // if success false
}
disconnect an rsc-server instance. happens automatically if the connection is dropped.
{
handler: 'worldDisconnect'
}
get a list of worlds.
returns:
[
{
id: 1,
members: false,
country: 'CAN',
online: true,
players: 0 // to 1250
}
]
the total number of registered players.
{
handler: 'playerCount'
}
the number of players online in each world.
{
handler: 'playerOnlineCount'
}
{
handler: 'playerRegister'
username: '',
password: '',
ip: ''
}
returns:
{
success: true, // or false
code: 0 // used in the client to display error message or indicate success
}
checks if a player's credentials are correct and if they're allowed onto the world they're logging into (membership check).
{
handler: 'playerLogin',
username: '',
password: '',
ip: ''
}
returns:
{
success: true, // or false
code: 0 // similar to registration code
player: {
id: 1,
bank: [ { id: 10, amount: 1000 } ],
inventory: [ { id: 10, amount: 1000 } ],
skills: { attack: { current: 1, experience: 332 } },
// etc.
} // undefined if invalid credentials
}
send a message to a player on another world.
{
handler: 'playerMessage',
fromUsername: '',
toUsername: '',
message: ''
}
returns:
{
success: true, // or false
error: '' // if success false
}
rsc-data-server sends these to certain (or all) clients with the each header
corresponding to the .handler
property:
sent to rsc-server instances when players login.
{
handler: 'playerLoggedIn',
username: '',
world: 1 // up to 254
}
sent to the rsc-server instance corresponding to the the world toUsername
resides in the playerMessage
handler.
{
handler: 'playerMessage',
fromUsername: '',
toUsername: '',
message: ''
}
Copyright (C) 2020 2003Scape Team
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.
FAQs
manage rsc-server worlds, player persistence, friends, etc.
The npm package @2003scape/rsc-data-server receives a total of 1 weekly downloads. As such, @2003scape/rsc-data-server popularity was classified as not popular.
We found that @2003scape/rsc-data-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.