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.
dungeon-generator
Advanced tools
This is a procedural dungeon generator written in javascript.
@TODO
import Dungeon from 'dungeon-generator';
let dungeon = new Dungeon({
size: [100, 100],
seed: 'abcd', //omit for generated seed
rooms: {
initial: {
min_size: [3, 3],
max_size: [3, 3],
max_exits: 1,
position: [0, 0] //OPTIONAL pos of initial room
},
any: {
min_size: [2, 2],
max_size: [5, 5],
max_exits: 4
}
},
max_corridor_length: 6,
min_corridor_length: 2,
corridor_density: 0.5, //corridors per room
symmetric_rooms: false, // exits must be in the center of a wall if true
interconnects: 1, //extra corridors to connect rooms and make circular paths. not 100% guaranteed
max_interconnect_length: 10,
room_count: 10
});
dungeon.generate();
dungeon.print(); //outputs wall map to console.log
dungeon.size; // [width, heihgt]
dungeon.walls.get([x, y]); //return true if position is wall, false if empty
for(let piece of dungeon.children) {
piece.position; //[x, y] position of top left corner of the piece within dungeon
piece.tag; // 'any', 'initial' or any other key of 'rooms' options property
piece.size; //[width, height]
piece.walls.get([x, y]); //x, y- local position of piece, returns true if wall, false if empty
for (let exit of piece.exits) {
let {x, y, dest_piece} = exit; // local position of exit and piece it exits to
piece.global_pos([x, y]); // [x, y] global pos of the exit
}
piece.local_pos(dungeon.start_pos); //get local position within the piece of dungeon's global position
}
dungeon.initial_room; //piece tagged as 'initial'
dungeon.start_pos; //[x, y] center of 'initial' piece
FAQs
prodecural dungeon generator for games
The npm package dungeon-generator receives a total of 1 weekly downloads. As such, dungeon-generator popularity was classified as not popular.
We found that dungeon-generator 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.