jsilnet 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -6
- package/REFERENCE.md +4 -0
- package/dist/browser/index.js +345 -0
- package/dist/browser/worker.js +42480 -0
- package/package.json +23 -4
- package/src/assembly/instruction-editing.js +165 -0
- package/src/assembly/method-removal.js +789 -0
- package/src/assembly/pointer-table-editing.js +506 -0
- package/src/assembly/portable-pdb-editing.js +441 -0
- package/src/browser/index.d.ts +123 -0
- package/src/browser/index.js +373 -0
- package/src/browser/worker-runtime.js +287 -0
- package/src/browser/worker.js +47 -0
- package/src/index.d.ts +267 -0
- package/src/index.js +107 -1574
- package/src/metadata/portable-pdb.js +2 -2
- package/src/metadata/strong-name.js +84 -83
- package/src/pe/headers.js +1 -1
- package/src/platform/bytes.js +21 -0
- package/src/platform/compression.js +24 -0
- package/src/platform/crypto.js +17 -0
- package/src/types/assembly/instruction-editing.d.ts +33 -0
- package/src/types/assembly/method-removal.d.ts +3 -0
- package/src/types/assembly/pointer-table-editing.d.ts +3 -0
- package/src/types/assembly/portable-pdb-editing.d.ts +23 -0
- package/src/types/binary/errors.d.ts +7 -0
- package/src/types/binary/reader.d.ts +30 -0
- package/src/types/il/body.d.ts +51 -0
- package/src/types/il/instructions.d.ts +33 -0
- package/src/types/il/opcodes.d.ts +2 -0
- package/src/types/il/rewrite.d.ts +38 -0
- package/src/types/index.d.ts +864 -0
- package/src/types/metadata/classic-pdb.d.ts +688 -0
- package/src/types/metadata/custom-attributes.d.ts +28 -0
- package/src/types/metadata/portable-pdb.d.ts +296 -0
- package/src/types/metadata/resources.d.ts +1 -0
- package/src/types/metadata/root-writer.d.ts +1 -0
- package/src/types/metadata/signatures.d.ts +5 -0
- package/src/types/metadata/streams.d.ts +26 -0
- package/src/types/metadata/strong-name.d.ts +11 -0
- package/src/types/metadata/tables.d.ts +25 -0
- package/src/types/metadata/writer.d.ts +16 -0
- package/src/types/pe/headers.d.ts +160 -0
- package/src/types/platform/bytes.d.ts +3 -0
- package/src/types/platform/compression.d.ts +2 -0
- package/src/types/platform/crypto.d.ts +4 -0
- package/src/types/resolution/module.d.ts +12 -0
- package/src/types/writer/patch.d.ts +4 -0
- package/src/types/writer/pe.d.ts +9 -0
- package/src/types/writer/structural.d.ts +4 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
export function validatePortablePdbAssemblyReferences(pdb: any, assemblyRowCounts: any): void;
|
|
2
|
+
export function updateEmbeddedPortablePdbRowCounts(pdb: any, assemblyRowCounts: any): Uint8Array<ArrayBuffer>;
|
|
3
|
+
export function validatePortablePdbCodeViewIdentity(pdb: any, codeView: any, timeDateStamp: any): void;
|
|
4
|
+
export function decodePortablePdbCustomDebugInformation(row: any, heaps: any, documentCount?: number, methodCount?: number): {
|
|
5
|
+
kind: string;
|
|
6
|
+
embeddedSource: any;
|
|
7
|
+
sourceLink?: undefined;
|
|
8
|
+
defaultNamespace?: undefined;
|
|
9
|
+
dynamicLocalVariables?: undefined;
|
|
10
|
+
compilationOptions?: undefined;
|
|
11
|
+
compilationMetadataReferences?: undefined;
|
|
12
|
+
typeDefinitionDocuments?: undefined;
|
|
13
|
+
asyncMethodSteppingInformation?: undefined;
|
|
14
|
+
stateMachineHoistedLocalScopes?: undefined;
|
|
15
|
+
editAndContinueStateMachineStateMap?: undefined;
|
|
16
|
+
editAndContinueLocalSlotMap?: undefined;
|
|
17
|
+
editAndContinueLambdaAndClosureMap?: undefined;
|
|
18
|
+
} | {
|
|
19
|
+
kind: string;
|
|
20
|
+
sourceLink: any;
|
|
21
|
+
embeddedSource?: undefined;
|
|
22
|
+
defaultNamespace?: undefined;
|
|
23
|
+
dynamicLocalVariables?: undefined;
|
|
24
|
+
compilationOptions?: undefined;
|
|
25
|
+
compilationMetadataReferences?: undefined;
|
|
26
|
+
typeDefinitionDocuments?: undefined;
|
|
27
|
+
asyncMethodSteppingInformation?: undefined;
|
|
28
|
+
stateMachineHoistedLocalScopes?: undefined;
|
|
29
|
+
editAndContinueStateMachineStateMap?: undefined;
|
|
30
|
+
editAndContinueLocalSlotMap?: undefined;
|
|
31
|
+
editAndContinueLambdaAndClosureMap?: undefined;
|
|
32
|
+
} | {
|
|
33
|
+
kind: string;
|
|
34
|
+
defaultNamespace: string;
|
|
35
|
+
embeddedSource?: undefined;
|
|
36
|
+
sourceLink?: undefined;
|
|
37
|
+
dynamicLocalVariables?: undefined;
|
|
38
|
+
compilationOptions?: undefined;
|
|
39
|
+
compilationMetadataReferences?: undefined;
|
|
40
|
+
typeDefinitionDocuments?: undefined;
|
|
41
|
+
asyncMethodSteppingInformation?: undefined;
|
|
42
|
+
stateMachineHoistedLocalScopes?: undefined;
|
|
43
|
+
editAndContinueStateMachineStateMap?: undefined;
|
|
44
|
+
editAndContinueLocalSlotMap?: undefined;
|
|
45
|
+
editAndContinueLambdaAndClosureMap?: undefined;
|
|
46
|
+
} | {
|
|
47
|
+
kind: string;
|
|
48
|
+
dynamicLocalVariables: any;
|
|
49
|
+
embeddedSource?: undefined;
|
|
50
|
+
sourceLink?: undefined;
|
|
51
|
+
defaultNamespace?: undefined;
|
|
52
|
+
compilationOptions?: undefined;
|
|
53
|
+
compilationMetadataReferences?: undefined;
|
|
54
|
+
typeDefinitionDocuments?: undefined;
|
|
55
|
+
asyncMethodSteppingInformation?: undefined;
|
|
56
|
+
stateMachineHoistedLocalScopes?: undefined;
|
|
57
|
+
editAndContinueStateMachineStateMap?: undefined;
|
|
58
|
+
editAndContinueLocalSlotMap?: undefined;
|
|
59
|
+
editAndContinueLambdaAndClosureMap?: undefined;
|
|
60
|
+
} | {
|
|
61
|
+
kind: string;
|
|
62
|
+
compilationOptions: {
|
|
63
|
+
name: string;
|
|
64
|
+
value: string;
|
|
65
|
+
}[];
|
|
66
|
+
embeddedSource?: undefined;
|
|
67
|
+
sourceLink?: undefined;
|
|
68
|
+
defaultNamespace?: undefined;
|
|
69
|
+
dynamicLocalVariables?: undefined;
|
|
70
|
+
compilationMetadataReferences?: undefined;
|
|
71
|
+
typeDefinitionDocuments?: undefined;
|
|
72
|
+
asyncMethodSteppingInformation?: undefined;
|
|
73
|
+
stateMachineHoistedLocalScopes?: undefined;
|
|
74
|
+
editAndContinueStateMachineStateMap?: undefined;
|
|
75
|
+
editAndContinueLocalSlotMap?: undefined;
|
|
76
|
+
editAndContinueLambdaAndClosureMap?: undefined;
|
|
77
|
+
} | {
|
|
78
|
+
kind: string;
|
|
79
|
+
compilationMetadataReferences: {
|
|
80
|
+
fileName: string;
|
|
81
|
+
aliases: string;
|
|
82
|
+
flags: any;
|
|
83
|
+
timeStamp: number;
|
|
84
|
+
fileSize: number;
|
|
85
|
+
mvid: any;
|
|
86
|
+
}[];
|
|
87
|
+
embeddedSource?: undefined;
|
|
88
|
+
sourceLink?: undefined;
|
|
89
|
+
defaultNamespace?: undefined;
|
|
90
|
+
dynamicLocalVariables?: undefined;
|
|
91
|
+
compilationOptions?: undefined;
|
|
92
|
+
typeDefinitionDocuments?: undefined;
|
|
93
|
+
asyncMethodSteppingInformation?: undefined;
|
|
94
|
+
stateMachineHoistedLocalScopes?: undefined;
|
|
95
|
+
editAndContinueStateMachineStateMap?: undefined;
|
|
96
|
+
editAndContinueLocalSlotMap?: undefined;
|
|
97
|
+
editAndContinueLambdaAndClosureMap?: undefined;
|
|
98
|
+
} | {
|
|
99
|
+
kind: string;
|
|
100
|
+
typeDefinitionDocuments: any[];
|
|
101
|
+
embeddedSource?: undefined;
|
|
102
|
+
sourceLink?: undefined;
|
|
103
|
+
defaultNamespace?: undefined;
|
|
104
|
+
dynamicLocalVariables?: undefined;
|
|
105
|
+
compilationOptions?: undefined;
|
|
106
|
+
compilationMetadataReferences?: undefined;
|
|
107
|
+
asyncMethodSteppingInformation?: undefined;
|
|
108
|
+
stateMachineHoistedLocalScopes?: undefined;
|
|
109
|
+
editAndContinueStateMachineStateMap?: undefined;
|
|
110
|
+
editAndContinueLocalSlotMap?: undefined;
|
|
111
|
+
editAndContinueLambdaAndClosureMap?: undefined;
|
|
112
|
+
} | {
|
|
113
|
+
kind: string;
|
|
114
|
+
asyncMethodSteppingInformation: {
|
|
115
|
+
catchHandlerOffset: number;
|
|
116
|
+
steps: {
|
|
117
|
+
yieldOffset: number;
|
|
118
|
+
resumeOffset: number;
|
|
119
|
+
methodRid: any;
|
|
120
|
+
}[];
|
|
121
|
+
};
|
|
122
|
+
embeddedSource?: undefined;
|
|
123
|
+
sourceLink?: undefined;
|
|
124
|
+
defaultNamespace?: undefined;
|
|
125
|
+
dynamicLocalVariables?: undefined;
|
|
126
|
+
compilationOptions?: undefined;
|
|
127
|
+
compilationMetadataReferences?: undefined;
|
|
128
|
+
typeDefinitionDocuments?: undefined;
|
|
129
|
+
stateMachineHoistedLocalScopes?: undefined;
|
|
130
|
+
editAndContinueStateMachineStateMap?: undefined;
|
|
131
|
+
editAndContinueLocalSlotMap?: undefined;
|
|
132
|
+
editAndContinueLambdaAndClosureMap?: undefined;
|
|
133
|
+
} | {
|
|
134
|
+
kind: string;
|
|
135
|
+
stateMachineHoistedLocalScopes: {
|
|
136
|
+
startOffset: number;
|
|
137
|
+
length: number;
|
|
138
|
+
}[];
|
|
139
|
+
embeddedSource?: undefined;
|
|
140
|
+
sourceLink?: undefined;
|
|
141
|
+
defaultNamespace?: undefined;
|
|
142
|
+
dynamicLocalVariables?: undefined;
|
|
143
|
+
compilationOptions?: undefined;
|
|
144
|
+
compilationMetadataReferences?: undefined;
|
|
145
|
+
typeDefinitionDocuments?: undefined;
|
|
146
|
+
asyncMethodSteppingInformation?: undefined;
|
|
147
|
+
editAndContinueStateMachineStateMap?: undefined;
|
|
148
|
+
editAndContinueLocalSlotMap?: undefined;
|
|
149
|
+
editAndContinueLambdaAndClosureMap?: undefined;
|
|
150
|
+
} | {
|
|
151
|
+
kind: string;
|
|
152
|
+
editAndContinueStateMachineStateMap: {
|
|
153
|
+
stateNumber: number;
|
|
154
|
+
syntaxOffset: any;
|
|
155
|
+
}[];
|
|
156
|
+
embeddedSource?: undefined;
|
|
157
|
+
sourceLink?: undefined;
|
|
158
|
+
defaultNamespace?: undefined;
|
|
159
|
+
dynamicLocalVariables?: undefined;
|
|
160
|
+
compilationOptions?: undefined;
|
|
161
|
+
compilationMetadataReferences?: undefined;
|
|
162
|
+
typeDefinitionDocuments?: undefined;
|
|
163
|
+
asyncMethodSteppingInformation?: undefined;
|
|
164
|
+
stateMachineHoistedLocalScopes?: undefined;
|
|
165
|
+
editAndContinueLocalSlotMap?: undefined;
|
|
166
|
+
editAndContinueLambdaAndClosureMap?: undefined;
|
|
167
|
+
} | {
|
|
168
|
+
kind: string;
|
|
169
|
+
editAndContinueLocalSlotMap: {
|
|
170
|
+
syntaxOffsetBaseline: number;
|
|
171
|
+
slots: {
|
|
172
|
+
kind: number;
|
|
173
|
+
syntaxOffset: any;
|
|
174
|
+
ordinal: any;
|
|
175
|
+
}[];
|
|
176
|
+
};
|
|
177
|
+
embeddedSource?: undefined;
|
|
178
|
+
sourceLink?: undefined;
|
|
179
|
+
defaultNamespace?: undefined;
|
|
180
|
+
dynamicLocalVariables?: undefined;
|
|
181
|
+
compilationOptions?: undefined;
|
|
182
|
+
compilationMetadataReferences?: undefined;
|
|
183
|
+
typeDefinitionDocuments?: undefined;
|
|
184
|
+
asyncMethodSteppingInformation?: undefined;
|
|
185
|
+
stateMachineHoistedLocalScopes?: undefined;
|
|
186
|
+
editAndContinueStateMachineStateMap?: undefined;
|
|
187
|
+
editAndContinueLambdaAndClosureMap?: undefined;
|
|
188
|
+
} | {
|
|
189
|
+
kind: string;
|
|
190
|
+
editAndContinueLambdaAndClosureMap: {
|
|
191
|
+
methodOrdinal: any;
|
|
192
|
+
syntaxOffsetBaseline: any;
|
|
193
|
+
closures: any[];
|
|
194
|
+
lambdas: {
|
|
195
|
+
syntaxOffset: any;
|
|
196
|
+
closureOrdinal: any;
|
|
197
|
+
}[];
|
|
198
|
+
};
|
|
199
|
+
embeddedSource?: undefined;
|
|
200
|
+
sourceLink?: undefined;
|
|
201
|
+
defaultNamespace?: undefined;
|
|
202
|
+
dynamicLocalVariables?: undefined;
|
|
203
|
+
compilationOptions?: undefined;
|
|
204
|
+
compilationMetadataReferences?: undefined;
|
|
205
|
+
typeDefinitionDocuments?: undefined;
|
|
206
|
+
asyncMethodSteppingInformation?: undefined;
|
|
207
|
+
stateMachineHoistedLocalScopes?: undefined;
|
|
208
|
+
editAndContinueStateMachineStateMap?: undefined;
|
|
209
|
+
editAndContinueLocalSlotMap?: undefined;
|
|
210
|
+
} | {
|
|
211
|
+
kind: string;
|
|
212
|
+
embeddedSource?: undefined;
|
|
213
|
+
sourceLink?: undefined;
|
|
214
|
+
defaultNamespace?: undefined;
|
|
215
|
+
dynamicLocalVariables?: undefined;
|
|
216
|
+
compilationOptions?: undefined;
|
|
217
|
+
compilationMetadataReferences?: undefined;
|
|
218
|
+
typeDefinitionDocuments?: undefined;
|
|
219
|
+
asyncMethodSteppingInformation?: undefined;
|
|
220
|
+
stateMachineHoistedLocalScopes?: undefined;
|
|
221
|
+
editAndContinueStateMachineStateMap?: undefined;
|
|
222
|
+
editAndContinueLocalSlotMap?: undefined;
|
|
223
|
+
editAndContinueLambdaAndClosureMap?: undefined;
|
|
224
|
+
};
|
|
225
|
+
export function decodePortablePdbDocumentName(blob: any, heaps: any): string;
|
|
226
|
+
export function encodePortablePdbDocumentName(separator: any, partBlobIndices: any): Uint8Array<ArrayBuffer>;
|
|
227
|
+
export function appendPortablePdbDocumentName(blobHeap: any, name: any, separator: any): {
|
|
228
|
+
heap: Uint8Array<any>;
|
|
229
|
+
nameBlobIndex: any;
|
|
230
|
+
nameBlob: Uint8Array<ArrayBuffer>;
|
|
231
|
+
};
|
|
232
|
+
export function decodePortablePdbSequencePoints(blob: any, { documentRid, documentCount, localSignatureCount }: {
|
|
233
|
+
documentRid: any;
|
|
234
|
+
documentCount: any;
|
|
235
|
+
localSignatureCount: any;
|
|
236
|
+
}): {
|
|
237
|
+
localSignatureRid: any;
|
|
238
|
+
points: {
|
|
239
|
+
offset: any;
|
|
240
|
+
documentRid: any;
|
|
241
|
+
hidden: boolean;
|
|
242
|
+
startLine: number;
|
|
243
|
+
startColumn: number;
|
|
244
|
+
endLine: number;
|
|
245
|
+
endColumn: number;
|
|
246
|
+
}[];
|
|
247
|
+
};
|
|
248
|
+
export function encodePortablePdbSequencePoints(sequencePoints: any, { documentRid, documentCount, localSignatureCount }?: {}): Uint8Array<ArrayBuffer>;
|
|
249
|
+
export function parsePortablePdbTables(tables: any, heaps: any, typeSystemCounts: any): {
|
|
250
|
+
documents: any[];
|
|
251
|
+
methodDebugInformation: any;
|
|
252
|
+
stateMachineMethods: any;
|
|
253
|
+
customDebugInformation: any;
|
|
254
|
+
};
|
|
255
|
+
export function serializeEmbeddedPortablePdb(pdb: any): Uint8Array<ArrayBuffer>;
|
|
256
|
+
export function refreshEmbeddedPortablePdbId(pdb: any): {
|
|
257
|
+
bytes: Uint8Array<ArrayBuffer>;
|
|
258
|
+
id: any;
|
|
259
|
+
hashes: Map<any, any>;
|
|
260
|
+
};
|
|
261
|
+
export function replaceEmbeddedPortablePdbDocumentName(pdb: any, documentRid: any, name: any, separator: any): Uint8Array<ArrayBuffer>;
|
|
262
|
+
export function replaceEmbeddedPortablePdbDocumentMetadata(pdb: any, documentRid: any, options: any): Uint8Array<ArrayBuffer>;
|
|
263
|
+
export function addEmbeddedPortablePdbDocument(pdb: any, name: any, options: any): Uint8Array<ArrayBuffer>;
|
|
264
|
+
export function insertEmbeddedPortablePdbDocument(pdb: any, options?: {}): Uint8Array<ArrayBuffer>;
|
|
265
|
+
export function addEmbeddedPortablePdbTypeDefinitionDocuments(pdb: any, typeRid: any, documentRids: any): Uint8Array<ArrayBuffer>;
|
|
266
|
+
export function replaceEmbeddedPortablePdbTypeDefinitionDocuments(pdb: any, typeRid: any, documentRids: any): Uint8Array<ArrayBuffer>;
|
|
267
|
+
export function removeEmbeddedPortablePdbDocument(pdb: any, documentRid: any): Uint8Array<ArrayBuffer>;
|
|
268
|
+
export function replaceEmbeddedPortablePdbSequencePoints(pdb: any, methodRid: any, sequencePoints: any): Uint8Array<ArrayBuffer>;
|
|
269
|
+
export function replaceEmbeddedPortablePdbMethodDocument(pdb: any, methodRid: any, documentRid: any): Uint8Array<ArrayBuffer>;
|
|
270
|
+
export function replaceEmbeddedPortablePdbCustomDebugInformation(pdb: any, customDebugInformationRid: any, value: any): Uint8Array<ArrayBuffer>;
|
|
271
|
+
export function replaceEmbeddedPortablePdbLocalScope(pdb: any, localScopeRid: any, options: any): Uint8Array<ArrayBuffer>;
|
|
272
|
+
export function replaceEmbeddedPortablePdbLocalVariable(pdb: any, localVariableRid: any, options: any): Uint8Array<ArrayBuffer>;
|
|
273
|
+
export function replaceEmbeddedPortablePdbLocalConstant(pdb: any, localConstantRid: any, options: any): Uint8Array<ArrayBuffer>;
|
|
274
|
+
export function replaceEmbeddedPortablePdbImportScope(pdb: any, importScopeRid: any, options: any): Uint8Array<ArrayBuffer>;
|
|
275
|
+
export function replaceEmbeddedPortablePdbMethodOffsets(pdb: any, methodRid: any, { sequencePoints, localSignatureRid, scopes, stateMachineHoistedLocalScopes, asyncMethodSteppingInformation }?: {
|
|
276
|
+
sequencePoints?: any;
|
|
277
|
+
localSignatureRid?: number;
|
|
278
|
+
scopes?: any[];
|
|
279
|
+
stateMachineHoistedLocalScopes?: any[];
|
|
280
|
+
asyncMethodSteppingInformation?: any[];
|
|
281
|
+
}): Uint8Array<ArrayBuffer>;
|
|
282
|
+
export function insertEmbeddedPortablePdbMethod(pdb: any, methodRid: any, oldCounts: any, newCounts: any): Uint8Array<ArrayBuffer>;
|
|
283
|
+
export function remapEmbeddedPortablePdbLocalSignatures(pdb: any, signatureRid: any, oldCounts: any, newCounts: any, operation: any): Uint8Array<ArrayBuffer>;
|
|
284
|
+
export function remapEmbeddedPortablePdbTypeDefinitions(pdb: any, typeRid: any, oldCounts: any, newCounts: any, operation: any): Uint8Array<ArrayBuffer>;
|
|
285
|
+
export function removeEmbeddedPortablePdbMethod(pdb: any, methodRid: any, oldCounts: any, newCounts: any): Uint8Array<ArrayBuffer>;
|
|
286
|
+
export function replaceEmbeddedPortablePdbSource(pdb: any, documentRid: any, source: any, { compress }?: {
|
|
287
|
+
compress?: boolean;
|
|
288
|
+
}): Uint8Array<ArrayBuffer>;
|
|
289
|
+
export function addEmbeddedPortablePdbSource(pdb: any, documentRid: any, source: any, { compress }?: {
|
|
290
|
+
compress?: boolean;
|
|
291
|
+
}): Uint8Array<ArrayBuffer>;
|
|
292
|
+
export function removeEmbeddedPortablePdbSource(pdb: any, documentRid: any): Uint8Array<ArrayBuffer>;
|
|
293
|
+
export function removeEmbeddedPortablePdbCustomDebugInformation(pdb: any, recordRid: any): Uint8Array<ArrayBuffer>;
|
|
294
|
+
export function addEmbeddedPortablePdbSourceLink(pdb: any, sourceLink: any): Uint8Array<ArrayBuffer>;
|
|
295
|
+
export function replaceEmbeddedPortablePdbSourceLink(pdb: any, sourceLink: any): Uint8Array<ArrayBuffer>;
|
|
296
|
+
export function removeEmbeddedPortablePdbSourceLink(pdb: any): Uint8Array<ArrayBuffer>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function parseManifestResources(bytes: any, directory: any, rows: any, heaps: any, rvaToOffset: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function serializeMetadataRoot(root: any, streams: any): Uint8Array<ArrayBuffer>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export function parseSignature(input: any, { counts }?: {}): any;
|
|
2
|
+
export function parseTypeSignature(input: any, { counts }?: {}): any;
|
|
3
|
+
export function encodeSignature(signature: any): Uint8Array<ArrayBuffer>;
|
|
4
|
+
export function encodeTypeSignature(signature: any): Uint8Array<ArrayBuffer>;
|
|
5
|
+
export function remapTypeReferences(signature: any, remapRid: any, tableId?: number): any;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export function parseMetadataRoot(input: any, offset: any, size: any): {
|
|
2
|
+
offset: any;
|
|
3
|
+
size: any;
|
|
4
|
+
majorVersion: number;
|
|
5
|
+
minorVersion: number;
|
|
6
|
+
version: string;
|
|
7
|
+
versionLength: number;
|
|
8
|
+
versionBytes: Uint8Array<any>;
|
|
9
|
+
flags: number;
|
|
10
|
+
streams: Map<any, any>;
|
|
11
|
+
};
|
|
12
|
+
export class MetadataHeaps {
|
|
13
|
+
constructor(streams: any);
|
|
14
|
+
strings: any;
|
|
15
|
+
userStrings: any;
|
|
16
|
+
guids: any;
|
|
17
|
+
blobs: any;
|
|
18
|
+
userStringDataEnd: any;
|
|
19
|
+
blobEntryOffsets: Set<number>;
|
|
20
|
+
userStringEntryOffsets: Set<number>;
|
|
21
|
+
getString(index: any): string;
|
|
22
|
+
getBlob(index: any): Uint8Array<ArrayBuffer>;
|
|
23
|
+
getGuid(index: any): any;
|
|
24
|
+
getUserString(tokenOrOffset: any): string;
|
|
25
|
+
#private;
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function getStrongNameHashName(algorithm: any): string;
|
|
2
|
+
export function importStrongNamePrivateKey(input: any): any;
|
|
3
|
+
export function encodeStrongNamePublicKey(keyInput: any, hashAlgorithm: any): any;
|
|
4
|
+
export function decodeStrongNamePublicKey(bytes: any): {
|
|
5
|
+
publicKey: any;
|
|
6
|
+
hashAlgorithm: number;
|
|
7
|
+
signatureSize: number;
|
|
8
|
+
};
|
|
9
|
+
export function assertStrongNamePEProfile(pe: any): 96 | 112;
|
|
10
|
+
export function signStrongNameImage(bytes: any, pe: any, cli: any, privateKey: any, hashAlgorithm: any): Uint8Array<ArrayBuffer>;
|
|
11
|
+
export function verifyStrongNameImage(bytes: any, pe: any, cli: any, publicKeyBytes: any, hashAlgorithm: any): any;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export function decodeCodedIndex(value: any, kind: any): {
|
|
2
|
+
table: any;
|
|
3
|
+
tableName: string;
|
|
4
|
+
rid: number;
|
|
5
|
+
};
|
|
6
|
+
export function encodeCodedIndex(table: any, rid: any, kind: any): any;
|
|
7
|
+
export function codedIndexWidth(kind: any, counts: any): 2 | 4;
|
|
8
|
+
export function tableIndexWidth(rowCount: any): 2 | 4;
|
|
9
|
+
export function parseTablesStream(stream: any, externalCounts?: any): {
|
|
10
|
+
majorVersion: number;
|
|
11
|
+
minorVersion: number;
|
|
12
|
+
reserved: number;
|
|
13
|
+
reservedByte: number;
|
|
14
|
+
heapSizes: number;
|
|
15
|
+
valid: bigint;
|
|
16
|
+
sorted: bigint;
|
|
17
|
+
counts: any[];
|
|
18
|
+
rows: Map<any, any>;
|
|
19
|
+
tableDataOffset: number;
|
|
20
|
+
row(idOrName: any, rid: any): any;
|
|
21
|
+
get(idOrName: any): any;
|
|
22
|
+
};
|
|
23
|
+
export function metadataTableId(nameOrId: any): any;
|
|
24
|
+
export const metadataTableNames: string[];
|
|
25
|
+
export const metadataTableSchemas: (string | number)[][][];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function serializeTablesStream(tables: any, heapStreams: any): Uint8Array<ArrayBuffer>;
|
|
2
|
+
export function appendCompressedUInt(value: any): Uint8Array<ArrayBuffer>;
|
|
3
|
+
export function appendCompressedInt(value: any): Uint8Array<ArrayBuffer>;
|
|
4
|
+
export function appendStringHeap(heap: any, value: any): {
|
|
5
|
+
heap: Uint8Array<any>;
|
|
6
|
+
index: any;
|
|
7
|
+
};
|
|
8
|
+
export function appendBlobHeap(heap: any, value: any): {
|
|
9
|
+
heap: Uint8Array<any>;
|
|
10
|
+
index: any;
|
|
11
|
+
};
|
|
12
|
+
export function appendUserStringHeap(heap: any, value: any): {
|
|
13
|
+
heap: Uint8Array<any>;
|
|
14
|
+
index: any;
|
|
15
|
+
};
|
|
16
|
+
export function tableName(id: any): string;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
export function parseEmbeddedPortablePdbData(bytes: any, offset: any, size: any): {
|
|
2
|
+
id: Uint8Array<ArrayBuffer>;
|
|
3
|
+
entryPointToken: number;
|
|
4
|
+
referencedTypeSystemTables: bigint;
|
|
5
|
+
rowCounts: Map<any, any>;
|
|
6
|
+
documents: any[];
|
|
7
|
+
methodDebugInformation: any;
|
|
8
|
+
stateMachineMethods: any;
|
|
9
|
+
customDebugInformation: any;
|
|
10
|
+
uncompressedSize: number;
|
|
11
|
+
bytes: Uint8Array<ArrayBuffer>;
|
|
12
|
+
metadataRoot: {
|
|
13
|
+
offset: any;
|
|
14
|
+
size: any;
|
|
15
|
+
majorVersion: number;
|
|
16
|
+
minorVersion: number;
|
|
17
|
+
version: string;
|
|
18
|
+
versionLength: number;
|
|
19
|
+
versionBytes: Uint8Array<any>;
|
|
20
|
+
flags: number;
|
|
21
|
+
streams: Map<any, any>;
|
|
22
|
+
};
|
|
23
|
+
tables: {
|
|
24
|
+
majorVersion: number;
|
|
25
|
+
minorVersion: number;
|
|
26
|
+
reserved: number;
|
|
27
|
+
reservedByte: number;
|
|
28
|
+
heapSizes: number;
|
|
29
|
+
valid: bigint;
|
|
30
|
+
sorted: bigint;
|
|
31
|
+
counts: any[];
|
|
32
|
+
rows: Map<any, any>;
|
|
33
|
+
tableDataOffset: number;
|
|
34
|
+
row(idOrName: any, rid: any): any;
|
|
35
|
+
get(idOrName: any): any;
|
|
36
|
+
};
|
|
37
|
+
heaps: MetadataHeaps;
|
|
38
|
+
};
|
|
39
|
+
export function parsePE(input: any): {
|
|
40
|
+
bytes: Uint8Array<any>;
|
|
41
|
+
peOffset: number;
|
|
42
|
+
machine: number;
|
|
43
|
+
sectionCount: number;
|
|
44
|
+
symbolTablePointer: number;
|
|
45
|
+
symbolCount: number;
|
|
46
|
+
characteristics: number;
|
|
47
|
+
optionalHeaderOffset: number;
|
|
48
|
+
optionalHeaderSize: number;
|
|
49
|
+
optionalHeaderMagic: number;
|
|
50
|
+
sectionOffset: number;
|
|
51
|
+
sizeOfCode: number;
|
|
52
|
+
sizeOfInitializedData: number;
|
|
53
|
+
sectionAlignment: number;
|
|
54
|
+
fileAlignment: number;
|
|
55
|
+
sizeOfImage: number;
|
|
56
|
+
sizeOfHeaders: number;
|
|
57
|
+
checksumOffset: number;
|
|
58
|
+
directories: {
|
|
59
|
+
rva: number;
|
|
60
|
+
size: number;
|
|
61
|
+
}[];
|
|
62
|
+
debugDirectoryEntries: {
|
|
63
|
+
characteristics: number;
|
|
64
|
+
timeDateStamp: number;
|
|
65
|
+
majorVersion: number;
|
|
66
|
+
minorVersion: number;
|
|
67
|
+
type: number;
|
|
68
|
+
sizeOfData: number;
|
|
69
|
+
addressOfRawData: number;
|
|
70
|
+
pointerToRawData: number;
|
|
71
|
+
codeView: {
|
|
72
|
+
format: string;
|
|
73
|
+
signature: string;
|
|
74
|
+
} | {
|
|
75
|
+
path: string;
|
|
76
|
+
pathOffset: number;
|
|
77
|
+
pathByteLength: any;
|
|
78
|
+
guid: string;
|
|
79
|
+
age: number;
|
|
80
|
+
format: string;
|
|
81
|
+
signature?: undefined;
|
|
82
|
+
} | {
|
|
83
|
+
path: string;
|
|
84
|
+
pathOffset: number;
|
|
85
|
+
pathByteLength: any;
|
|
86
|
+
offset: number;
|
|
87
|
+
timeDateStamp: number;
|
|
88
|
+
age: number;
|
|
89
|
+
format: string;
|
|
90
|
+
signature?: undefined;
|
|
91
|
+
};
|
|
92
|
+
embeddedPortablePdb: {
|
|
93
|
+
id: Uint8Array<ArrayBuffer>;
|
|
94
|
+
entryPointToken: number;
|
|
95
|
+
referencedTypeSystemTables: bigint;
|
|
96
|
+
rowCounts: Map<any, any>;
|
|
97
|
+
documents: any[];
|
|
98
|
+
methodDebugInformation: any;
|
|
99
|
+
stateMachineMethods: any;
|
|
100
|
+
customDebugInformation: any;
|
|
101
|
+
uncompressedSize: number;
|
|
102
|
+
bytes: Uint8Array<ArrayBuffer>;
|
|
103
|
+
metadataRoot: {
|
|
104
|
+
offset: any;
|
|
105
|
+
size: any;
|
|
106
|
+
majorVersion: number;
|
|
107
|
+
minorVersion: number;
|
|
108
|
+
version: string;
|
|
109
|
+
versionLength: number;
|
|
110
|
+
versionBytes: Uint8Array<any>;
|
|
111
|
+
flags: number;
|
|
112
|
+
streams: Map<any, any>;
|
|
113
|
+
};
|
|
114
|
+
tables: {
|
|
115
|
+
majorVersion: number;
|
|
116
|
+
minorVersion: number;
|
|
117
|
+
reserved: number;
|
|
118
|
+
reservedByte: number;
|
|
119
|
+
heapSizes: number;
|
|
120
|
+
valid: bigint;
|
|
121
|
+
sorted: bigint;
|
|
122
|
+
counts: any[];
|
|
123
|
+
rows: Map<any, any>;
|
|
124
|
+
tableDataOffset: number;
|
|
125
|
+
row(idOrName: any, rid: any): any;
|
|
126
|
+
get(idOrName: any): any;
|
|
127
|
+
};
|
|
128
|
+
heaps: MetadataHeaps;
|
|
129
|
+
};
|
|
130
|
+
}[];
|
|
131
|
+
sections: {
|
|
132
|
+
name: string;
|
|
133
|
+
virtualSize: number;
|
|
134
|
+
virtualAddress: number;
|
|
135
|
+
rawSize: number;
|
|
136
|
+
rawPointer: number;
|
|
137
|
+
}[];
|
|
138
|
+
rvaToOffset: (rva: any, size?: number) => any;
|
|
139
|
+
};
|
|
140
|
+
export function parseCliHeader(pe: any): {
|
|
141
|
+
offset: any;
|
|
142
|
+
headerSize: number;
|
|
143
|
+
majorRuntimeVersion: number;
|
|
144
|
+
minorRuntimeVersion: number;
|
|
145
|
+
metadataRva: number;
|
|
146
|
+
metadataSize: number;
|
|
147
|
+
flags: number;
|
|
148
|
+
entryPointToken: number;
|
|
149
|
+
resources: {
|
|
150
|
+
rva: number;
|
|
151
|
+
size: number;
|
|
152
|
+
};
|
|
153
|
+
strongNameSignature: {
|
|
154
|
+
rva: number;
|
|
155
|
+
size: number;
|
|
156
|
+
};
|
|
157
|
+
strongNameFlagOffset: any;
|
|
158
|
+
strongNameDirectoryOffset: any;
|
|
159
|
+
};
|
|
160
|
+
import { MetadataHeaps } from "../metadata/streams.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function resolveTypes(metadata: any, heaps: any): {
|
|
2
|
+
rid: any;
|
|
3
|
+
flags: any;
|
|
4
|
+
name: any;
|
|
5
|
+
namespace: any;
|
|
6
|
+
extends: any;
|
|
7
|
+
fieldRids: any;
|
|
8
|
+
methodRids: any;
|
|
9
|
+
eventRids: any[];
|
|
10
|
+
propertyRids: any[];
|
|
11
|
+
}[];
|
|
12
|
+
export function resolveMethodParameters(metadata: any): any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function getNextSectionVirtualAddress(pe: any): number;
|
|
2
|
+
export function appendPeSection(input: any, pe: any, cli: any, payload: any, metadataOffset: any, metadataSize: any, resourcesDirectory?: any, preserveStrongName?: boolean, debugDirectoryPayload?: any): {
|
|
3
|
+
bytes: Uint8Array<ArrayBuffer>;
|
|
4
|
+
virtualAddress: number;
|
|
5
|
+
rawPointer: number;
|
|
6
|
+
rawSize: number;
|
|
7
|
+
headerExpansion: number;
|
|
8
|
+
cliOffset: any;
|
|
9
|
+
};
|