-
Notifications
You must be signed in to change notification settings - Fork 4
/
print-props.js
38 lines (25 loc) · 1.12 KB
/
print-props.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const {Command, flags} = require('@oclif/command');
class PrintPropertiesCommand extends Command {
async run() {
const {flags} = this.parse(PrintPropertiesCommand);
this.log(`COMING SOON!`);
}
}
PrintPropertiesCommand.description = `Print Ticket's properties from a bootstrapped file
Sometimes it is useful to find out all the Ticket's properties a bootstrapped file has.
Some examples are: document, navigator, _ticket, performance, etc.
Most of these properties are constructed from individual characters derived from 8-bit unsigned ints.
In a nutshell, this command sole purpose is to extract all the strings constructed in this manner and display their location(the function where it is created).
Note:You must pass in a bootstrapped JS file, not the ticket.wasm file as this command exclusively traverses the JS AST to
find these properties.
Example: Printing out Ticket's properties
$ ticket print-props ticket.wasm.js
`;
PrintPropertiesCommand.args = [
{
name : 'bootstrapped_file',
required : true,
description : 'Bootstrapped ticket.wasm.js file'
},
];
module.exports = PrintPropertiesCommand;