This commit is contained in:
2026-03-25 14:14:07 +01:00
parent d6b31e2ef7
commit a0073b4fb1
10368 changed files with 2214340 additions and 0 deletions

126
APP/nexus-remote/node_modules/resedit/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,126 @@
# Changelog
## v1.7.2
- Same update for [v2.0.3](https://github.com/jet2jet/resedit-js/releases/tag/v2.0.3)
- Fix icon item image size to ignore biImageSize when biCompression is BI_RGB (#56)
## v1.7.1
- Same update for [v2.0.1](https://github.com/jet2jet/resedit-js/releases/tag/v2.0.1):
- Add nullish check for some fields
- Add demo page link to README
- Same update for [v2.0.2](https://github.com/jet2jet/resedit-js/releases/tag/v2.0.2):
- Update pe-library
## v1.7.0
- Add support for ES module loading in Node.js environment
- Update pe-library
## v1.6.1
- Fix width byte calculation (#30)
## v1.6.0
- Update pe-library
## v1.5.0
- Update pe-library
## v1.4.1
- Remove more unused functions/files
## v1.4.0
- resedit now uses [pe-library](https://www.npmjs.com/package/pe-library) to parsing/generating PE binaries
- `ResEdit.NtExecutable` and some classes are now aliases of pe-library's classes.
## v1.3.0
- Add `signData` method to `SignerObject`
## v1.2.0
- Add 'setFileVersion' and 'setProductVersion' methods to VersionInfo (#23)
## v1.1.0
- Add options to generateResourceData/outputResource (#21)
## v1.0.0
- Add `sizeImage` on `BitmapInfo` to keep original values
- Change icon mask to be non-null data
- Add BigInt support for `ImageOptionalHeader64`
- Add `getResourceEntriesAsString`, `replaceResourceEntryFromString`, and `removeResourceEntry` methods in `NtExecutableResource`
- Drop Node.js v10
## v0.7.0
- Add `NtExecutable.createEmpty` which creates 'empty' executable data
- Add ESM (ES Module) support
- Fix some minor bugs
## v0.6.0
- Add support for extra data, which is not a part of any sections, on parsing/generating executables
- Add `alignment` parameter for `generateExecutableWithSign`
## v0.5.2
- Add predefined digest algorithms and support OIDs for `getDigestAlgorithm` and `getEncryptionAlgorithm`
- Fix calculating executable digest for binaries which previously contained signed information
## v0.5.1
- Rename `getPublicKeyData` to `getCertificateData`
- `getPublicKeyData` can still be used now, but will be no longer called in the future.
- Re-export types used by `SignerObject`
## v0.5.0
- Improve usability for some classes, such as `VersionInfo` and `IconGroupEntry`
- Update descriptions for some types / methods
- Add support for multiple certificates on `SignerObject.getPublicKeyData`
## v0.4.0
- Added signing process function (#14), which enables to generate signed executable binaries
- Additionally, signed executables are now supported on `NtExecutable.from` with explicit option. (On `NtExecutable.generate` signed information will be lost.)
- Support for `ArrayBufferView` as an input data for some methods (e.g. `NtExecutable.from` and `IconFile.from`)
- TypedArray (e.g. `Uint8Array`), `DataView`, and Node.js `Buffer` class are subclasses of `ArrayBufferView`, so these classes now can be used as input data directly.
## v0.3.1
- Added missing string table rounding up for `VersionInfo` (#13, thanks to @AlexanderOMara)
## v0.3.0
- Throw error if specified executable binary is signed (#10)
- Implemented PE checksum calculation (#8, thanks to @AlexanderOMara)
- (Internal change) Updated package dependencies for developments
- TypeScript version is updated to 3.7.x, so the type definitions might be incompatible for older version of TypeScript (especially <3.4.x)
## v0.2.2
- Fix width and height usage for icon group, especially when loading from an icon file (#5)
## v0.2.1
- Fix the build paths to match package.json file (#3, thanks to @AlexanderOMara)
## v0.2.0
- Fix some bugs as followings:
- Fix adding new section entry to executable
- Fix changing section addresses on replacement
- Fix parsing icon resource data and icon file data
- Add `is32bit` method for `NtExecutable` and `removeAllStrings` method for `VersionInfo`
## v0.1.0
- Initial version

21
APP/nexus-remote/node_modules/resedit/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 jet
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

127
APP/nexus-remote/node_modules/resedit/README.md generated vendored Normal file
View File

@@ -0,0 +1,127 @@
[![NPM version](https://badge.fury.io/js/resedit.svg)](https://www.npmjs.com/package/resedit)
[![Build Status](https://github.com/jet2jet/resedit-js/actions/workflows/main-ci.yml/badge.svg)](https://github.com/jet2jet/resedit-js)
# resedit-js
resedit-js is a library that manipulates resouces contained by Windows Executable files. All implementations are written in JavaScript (TypeScript), so there are no further restrictions for running environment.
This library is not tested well for modifying and/or signing executables yet. Please be careful with the emitted binaries.
To use in command line, consider using [resedit-js-cli](https://www.npmjs.com/package/resedit-cli).
The demo page: [resedit demo](https://www.pg-fl.jp/program/resedit/index.en.htm)
- [Install](#install)
- [Supported formats](#supported-formats)
- [Parsing signed executables](#parsing-signed-executables)
- [Signing executables with resedit-js](#signing-executables-with-resedit-js)
- [Notes](#notes)
- [Examples](#examples)
- [License](#license)
## Install
```
npm install resedit
```
## Supported formats
- Windows Executables (PE Format, such as `.exe` and `.dll`), both 32-bit and 64-bit, are supported.
- Executables for 16-bit Windows is not supported.
- `.res` file is not supported now.
- PNG-based icon data is supported on `require('resedit').Resource.IconGroupEntry` class.
## Parsing signed executables
- Parsing signed executables (by using Authenticode or etc.) is not allowed by default and an exception will be thrown if `NtExecutable.from` receives a signed binary.
- To parse signed, `{ ignoreCert: true }` object must be passed to the second argument of `NtExecutable.from`.
- Although the base executable data is signed, `NtExecutable.generate` will generate unsigned executable binary. If you want to re-sign it, you must use generate-function with signing (see below) or any other signing tool such as Microsoft `signtool`.
## Signing executables with resedit-js
resedit-js provides basic signing process `generateExecutableWithSign` function, which is based on [Authenticode specification](https://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/authenticode_pe.docx) and related RFCs.
To keep resedit-js generic library, the followings are required to use signing process.
- Encryption / calculating hash (digest) process (e.g. Node.js built-in `crypto` module)
- A private key data is implicitly required to encrypt data.
- DER-format certificate binary (such as `*.cer` file data or `*.p7b` file data with DER-format), which is paired with the private key used by encryption process.
- (optional) Generating timestamp data, especially communicating with TSA server (e.g. HTTP/HTTPS API)
These requirements are represented as [`SignerObject`](./src/main/sign/SignerObject.ts). The caller of `generateExecutableWithSign` function must implement this object to sign executables.
An example code is here: [signTest.js](./examples/sign/signTest.js)
Note that resedit-js only provides basic signing process, and provides as beta version. For example adding more attributes/informations to certificates are not supported now.
> Some digest algorithms, such as SHA3 algorithms, might not be supported by current Windows.
## Notes
- **It is not strongly recommended that the destination executable file is equal to the source executable file (which is not an intermediate data).**
## Examples
For more APIs, please see `dist` directory of the package. And, [some test codes](./src/test) may help you for usages.
```js
import * as PELibrary from 'pe-library';
import * as ResEdit from 'resedit';
import * as fs from 'fs';
// load and parse data
const data = fs.readFileSync('MyApp.exe');
// (the Node.js Buffer instance can be specified directly to NtExecutable.from)
const exe = PELibrary.NtExecutable.from(data);
const res = PELibrary.NtExecutableResource.from(exe);
// rewrite resources
// - You can use helper classes as followings:
// - ResEdit.Resource.IconGroupEntry: access icon resource data
// - ResEdit.Resource.StringTable: access string resource data
// - ResEdit.Resource.VersionInfo: access version info data
// -- replace icons
// load icon data from file
// (you can use ResEdit.Data.IconFile to parse icon data)
const iconFile = ResEdit.Data.IconFile.from(fs.readFileSync('MyIcon.ico'));
ResEdit.Resource.IconGroupEntry.replaceIconsForResource(
// destEntries
res.entries,
// iconGroupID
101,
// lang ('lang: 1033' means 'en-US')
1033,
// icons (map IconFileItem to IconItem/RawIconItem)
iconFile.icons.map((item) => item.data)
);
// -- replace version
const viList = ResEdit.Resource.VersionInfo.fromEntries(res.entries);
const vi = viList[0];
// setFileVersion will set `vi.fixedInfo.fileVersionMS`/`fileVersionLS` and 'FileVersion' string value
// ('1033' means 'en-US')
vi.setFileVersion(1, 0, 0, 0, 1033);
// ('lang: 1033' means 'en-US', 'codepage: 1200' is the default codepage)
vi.setStringValues(
{ lang: 1033, codepage: 1200 },
{
FileDescription: 'My application',
ProductName: 'My product',
}
);
vi.outputToResourceEntries(res.entries);
// write to another binary
res.outputResource(exe);
const newBinary = exe.generate();
fs.writeFileSync('MyApp_modified.exe', Buffer.from(newBinary));
```
## License
[MIT License](./LICENSE)

82
APP/nexus-remote/node_modules/resedit/package.json generated vendored Normal file
View File

@@ -0,0 +1,82 @@
{
"name": "resedit",
"version": "1.7.2",
"engines": {
"node": ">=12",
"npm": ">=6"
},
"engineStrict": true,
"description": "Node.js library editing Windows Resource data",
"main": "./dist/index.js",
"module": "./dist/_esm/index.js",
"exports": {
"node": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"import": "./dist/_esm/index.js",
"require": "./dist/index.js"
},
"types": "./dist/index.d.ts",
"author": "jet",
"license": "MIT",
"homepage": "https://github.com/jet2jet/resedit-js",
"keywords": [
"windows",
"resource",
"javascript",
"library",
"version",
"icon",
"edit",
"resedit",
"pe-executable",
"authenticode"
],
"repository": {
"type": "git",
"url": "https://github.com/jet2jet/resedit-js.git"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/jet2jet"
},
"scripts": {
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc -p ./tsconfig.app.json",
"build:esm": "tsc -p ./tsconfig.app.esm.json && node ./tools/copyEsmFile.js",
"lint": "npm run lint:prettier && npm run lint:eslint",
"lint:eslint": "eslint -c .eslintrc.yml --ext .js,.jsx,.ts,.tsx .",
"lint:eslint:fix": "eslint -c .eslintrc.yml --fix --ext .js,.jsx,.ts,.tsx .",
"lint:fix": "npm run lint:prettier:fix && npm run lint:eslint:fix",
"lint:prettier": "prettier --config ./.prettierrc.yml --check \"**/*.{js,jsx,ts,tsx,yml,json,md}\"",
"lint:prettier:fix": "prettier --config ./.prettierrc.yml --write \"**/*.{js,jsx,ts,tsx,yml,json,md}\"",
"test": "jest --config ./jest.config.basic.js",
"test:basic": "jest --config ./jest.config.basic.js",
"test:lint": "npm run lint",
"test:win-x86": "jest --config ./jest.config.win-x86.js",
"test:win-x64": "jest --config ./jest.config.win-x64.js",
"version": "node ./tools/updateVersion.js ./src/main/version.ts && git add -A ./src/main/version.ts",
"typecheck": "tsc --project tsconfig.json --noEmit && echo \"Done\"."
},
"dependencies": {
"pe-library": "^0.4.1"
},
"devDependencies": {
"@types/jest": "^27.5.0",
"@types/node": "^12.20.37",
"@typescript-eslint/eslint-plugin": "^5.48.0",
"@typescript-eslint/parser": "^5.48.0",
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.6.0",
"eslint-config-standard": "^17.0.0",
"eslint-config-standard-with-typescript": "^26.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.6.0",
"eslint-plugin-promise": "^6.1.1",
"jest": "^28.1.3",
"prettier": "^2.8.2",
"ts-jest": "^28.0.8",
"typescript": "~4.2.4"
}
}