Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

exe-edit

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exe-edit - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

4

out/versioninfo.d.ts

@@ -32,3 +32,3 @@ /// <reference types="node" />

}
interface ReadVersionInfoBlock {
export interface ReadVersionInfoBlock {
readonly offset: number;

@@ -40,5 +40,5 @@ readonly end: number;

}
export declare function parseVersionInfoBlock(buffer: Buffer, offset?: number): ReadVersionInfoBlock;
export declare function printVersionInfo(logger: Logger, block: InputVersionInfoBlock): void;
export declare function formatVersionInfo(block: InputVersionInfoBlock): Buffer;
export declare function parseBinaryVersion(str: string | undefined): BinaryVersion | undefined;
export {};

@@ -32,3 +32,3 @@ "use strict";

}
return readVersionInfoBlock(entry.data);
return parseVersionInfoBlock(entry.data);
}

@@ -169,3 +169,3 @@ exports.readVersionInfoResource = readVersionInfoResource;

exports.createDefaultStringTable = createDefaultStringTable;
function readVersionInfoBlock(buffer, offset = 0) {
function parseVersionInfoBlock(buffer, offset = 0) {
const length = buffer.readUInt16LE(offset);

@@ -194,3 +194,3 @@ const end = offset + length;

while (childOffset < end) {
const child = readVersionInfoBlock(buffer, childOffset);
const child = parseVersionInfoBlock(buffer, childOffset);
childOffset = util_1.align(child.end, 4);

@@ -201,2 +201,3 @@ children.push(child);

}
exports.parseVersionInfoBlock = parseVersionInfoBlock;
function printVersionInfo(logger, block) {

@@ -247,8 +248,10 @@ if (Buffer.isBuffer(block.value) &&

const type = Buffer.isBuffer(block.value) ? 0 : 1;
const valueSize = type === 0 ? block.value.length : block.value.length * 2 + 2;
let offset = util_1.align(keyEnd + valueSize, 4);
let length = offset;
const valueSize = type === 0 || !block.value.length
? block.value.length
: block.value.length * 2 + 2;
const selfLength = keyEnd + valueSize;
let length = selfLength;
const children = block.children.map(formatVersionInfo);
for (const child of children) {
length += child.length;
length = util_1.align(length, 4) + child.length;
}

@@ -266,5 +269,6 @@ const result = Buffer.alloc(length);

}
let offset = util_1.align(selfLength, 4);
for (const child of children) {
child.copy(result, offset);
offset += child.length;
offset = util_1.align(offset + child.length, 4);
}

@@ -271,0 +275,0 @@ return result;

{
"name": "exe-edit",
"description": "Portable parsing and editing of EXE files, including icon and string resources.",
"version": "0.1.0",
"version": "0.1.1",
"license": "MIT",

@@ -16,3 +16,3 @@ "repository": {

],
"bin": "./out/cli.js",
"bin": "./out/cli.js",
"scripts": {

@@ -24,5 +24,5 @@ "prepublish": "yarn compile",

"@types/node": "^12.6.9",
"typescript": "~3.5.3",
"prettier": "^1.18.2"
"prettier": "^1.18.2",
"typescript": "~3.5.3"
}
}

@@ -53,3 +53,3 @@ // RT_VERSIONINFO format

}
return readVersionInfoBlock(entry.data);
return parseVersionInfoBlock(entry.data);
}

@@ -231,3 +231,3 @@

interface ReadVersionInfoBlock {
export interface ReadVersionInfoBlock {
readonly offset: number;

@@ -240,3 +240,3 @@ readonly end: number;

function readVersionInfoBlock(
export function parseVersionInfoBlock(
buffer: Buffer,

@@ -268,3 +268,3 @@ offset = 0,

while (childOffset < end) {
const child = readVersionInfoBlock(buffer, childOffset);
const child = parseVersionInfoBlock(buffer, childOffset);
childOffset = align(child.end, 4);

@@ -340,9 +340,11 @@ children.push(child);

const valueSize =
type === 0 ? block.value.length : block.value.length * 2 + 2;
let offset = align(keyEnd + valueSize, 4);
let length = offset;
type === 0 || !block.value.length
? block.value.length
: block.value.length * 2 + 2;
const selfLength = keyEnd + valueSize;
let length = selfLength;
const children = block.children.map(formatVersionInfo);
for (const child of children) {
length += child.length;
length = align(length, 4) + child.length;
}

@@ -360,5 +362,6 @@ const result = Buffer.alloc(length);

let offset = align(selfLength, 4);
for (const child of children) {
child.copy(result, offset);
offset += child.length;
offset = align(offset + child.length, 4);
}

@@ -383,2 +386,2 @@

return (parts as unknown) as BinaryVersion;
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc