mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
User local MachoNode
This commit is contained in:
parent
5bce0c5dc3
commit
c04da29933
1 changed files with 6 additions and 1 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import bufferApi from 'buffer'
|
||||
|
||||
import { Parser as MachoNodeParser } from './macho-node/parser.js'
|
||||
|
||||
function makeFileBuffer ( buffer ) {
|
||||
const fileBuffer = new bufferApi.Buffer.alloc( buffer.byteLength )
|
||||
|
||||
|
|
@ -9,6 +11,8 @@ function makeFileBuffer ( buffer ) {
|
|||
return fileBuffer
|
||||
}
|
||||
|
||||
const machoNodeParser = new MachoNodeParser()
|
||||
|
||||
// Tends to not support universal architecture
|
||||
// but support some MachoManiac doesn't and fails faster
|
||||
// so we run it first
|
||||
|
|
@ -61,7 +65,8 @@ export class MachoNode {
|
|||
}
|
||||
|
||||
async run () {
|
||||
const { parse } = await import( 'macho' )
|
||||
|
||||
// console.log( 'machoNodeParser', machoNodeParser )
|
||||
|
||||
const machoNodeMeta = machoNodeParser.execute( makeFileBuffer( this.machoFileInstance.buffer ) )
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue