
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
NodeJS wrapper for StormLib. see(https://github.com/ladislav-zezula/StormLib).
I just use it to generate StarCraft1 maps, so no more options. Currently, just only working on windows.
npm install
node-gyp build
Support MacOSX, Linux
JStormLib.openOpen a MPQ archive, return a Promise.
JStormLib.open(filepath).then(arcive => {
//archive.
}, err => {
console.log(err)
});
JStormLib.createCreate a new MPQ archive.
JStormLib.create(filepath, flags, maxFileCount).then(arcive => {
//archive.
}, err => {
console.log(err)
});
| Name | Type | Description |
|---|---|---|
| filepath | string | Archive file name |
| flags | int | Additional flags to specify creation details. see CreateArchiveFlags |
| maxFileCount | int | Limit for file count |
Specifies additional flags for MPQ creation process. This parameter can be combination of the following flags:
| Value | Description |
|---|---|
| 0x00100000 | The newly created archive will have (listfile) present. |
| 0x00200000 | The newly created archive will have additional attributes in (attributes) file. |
| 0x00400000 | The newly created archive will be signed with weak digital signature (the "(signature) file). |
| 0x00000000 | The function creates a MPQ version 1.0 (up to 4 GB). This is the default value |
| 0x01000000 | The function creates a MPQ version 2.0 (supports MPQ of size greater than 4 GB). |
| 0x02000000 | The function creates a MPQ version 3.0 (introduced in WoW-Cataclysm Beta). |
| 0x03000000 | The function creates a MPQ version 4.0 (used in WoW-Cataclysm). |
StormArchive.getLocaleJStormLib.open(filepath).then(arcive => {
archive.getLocale();
}, err => {
console.log(err)
});
Returns current locale ID for adding new files
StormArchive.setLocalearchive.setLocale(lcid);
Changes default locale ID for adding new files
StormArchive.getFileListarchive.getFileList();
// ['a.txt', 'b.txt]
get a list of all files in the current archive
StormArchive.readFilearchive.readFile(filename).then(fileBuffer => {
//save the buffer;
}, err => {
console.log(err);
})
read file data by the specified file name.
StormArchive.writeFilearchive.writeFile(buffer, filename, lcid, flags, compression).then(fileBuffer => {
//save the buffer;
}, err => {
console.log(err);
})
writes data to the archive.
| Name | Type | Description |
|---|---|---|
| buffer | Buffer | data to be written |
| filename | string | file name |
| lcid | int | language Code Identifier |
| flags | int | See WriteFileFlags |
| compression | int | See Compression |
Specifies additional options about how to add the file to the MPQ. The value of this parameter can be a combination of the following values:
StarCraft1 Map(.scx, .scm) use 0x00010200
| Value | Description |
|---|---|
| 0x00000100 | The file will be compressed using IMPLODE compression method. |
| 0x00000200 | The file will be compressed |
| 0x00010000 | The file will be stored as encrypted. |
| 0x00020000 | The file's encryption key will be adjusted according to file size in the archive. |
| 0x02000000 | The file will have the deletion marker. |
| 0x04000000 | The file will have CRC for each file sector. Ignored if the file is not compressed or if the file is stored as single unit. |
| 0x01000000 | The file will be added as single unit. Files stored as single unit cannot be encrypted, because Blizzard doesn't support them. |
| 0x80000000 | If this flag is specified and the file is already in the MPQ, it will be replaced. |
Compression method of the first file block. This parameter is ignored if MPQ_FILE_COMPRESS is not specified in dwFlags. This parameter can be a combination of the following values:
StarCraft1 Map(.scx, .scm) use 0x08
| Value | Description |
|---|---|
| MPQ_COMPRESSION_HUFFMANN(0x01) | Use Huffman compression. This bit can only be combined with MPQ_COMPRESSION_ADPCM_MONO or MPQ_COMPRESSION_ADPCM_STEREO. |
| MPQ_COMPRESSION_ZLIB (0x02) | Use ZLIB compression library. This bit cannot be combined with MPQ_COMPRESSION_BZIP2 or MPQ_COMPRESSION_LZMA. |
| MPQ_COMPRESSION_PKWARE(0x08) | Use Pkware Data Compression Library. This bit cannot be combined with MPQ_COMPRESSION_LZMA. |
| MPQ_COMPRESSION_BZIP2(0x10) | Use BZIP2 compression library. This bit cannot be combined with MPQ_COMPRESSION_ZLIB or MPQ_COMPRESSION_LZMA. |
| MPQ_COMPRESSION_SPARSE(0x20) | Use SPARSE compression. This bit cannot be combined with MPQ_COMPRESSION_LZMA. |
| MPQ_COMPRESSION_ADPCM_MONO(0x40) | Use IMA ADPCM compression for 1-channel (mono) WAVE files. This bit can only be combined with MPQ_COMPRESSION_HUFFMANN. This is lossy compression and should only be used for compressing WAVE files. |
| MPQ_COMPRESSION_ADPCM_STEREO(0x80) | Use IMA ADPCM compression for 2-channel (stereo) WAVE files. This bit can only be combined with MPQ_COMPRESSION_HUFFMANN. This is lossy compression and should only be used for compressing WAVE files. |
| MPQ_COMPRESSION_LZMA(0x12) | Use LZMA compression. This value can not be combined with any other compression method. |
FAQs
NodeJS wrapper for StormLib
We found that stormlib 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.