MCPcopy Create free account
hub / github.com/ThatGuySam/doesitarm / parseCommand

Method parseCommand

helpers/scanner/parsers/macho-node/parser.js:171–211  ·  view source on GitHub ↗
(type, buf, file)

Source from the content-addressed store, hash-verified

169 }
170
171 parseCommand(type, buf, file) {
172 if (type === 'segment')
173 return this.parseSegmentCmd(type, buf, file);
174 else if (type === 'segment_64')
175 return this.parseSegmentCmd(type, buf, file);
176 else if (type === 'symtab')
177 return this.parseSymtab(type, buf);
178 else if (type === 'symseg')
179 return this.parseSymseg(type, buf);
180 else if (type === 'encryption_info')
181 return this.parseEncryptionInfo(type, buf);
182 else if (type === 'encryption_info_64')
183 return this.parseEncryptionInfo64(type, buf);
184 else if (type === 'rpath')
185 return this.parseRpath(type, buf);
186 else if (type === 'dysymtab')
187 return this.parseDysymtab(type, buf);
188 else if (type === 'load_dylib' || type === 'id_dylib')
189 return this.parseLoadDylib(type, buf);
190 else if (type === 'load_weak_dylib')
191 return this.parseLoadDylib(type, buf);
192 else if (type === 'load_dylinker' || type === 'id_dylinker')
193 return this.parseLoadDylinker(type, buf);
194 else if (type === 'version_min_macosx' || type === 'version_min_iphoneos')
195 return this.parseVersionMin(type, buf);
196 else if (type === 'code_signature' || type === 'segment_split_info')
197 return this.parseLinkEdit(type, buf);
198 else if (type === 'function_starts')
199 return this.parseFunctionStarts(type, buf, file);
200 else if (type === 'data_in_code')
201 return this.parseLinkEdit(type, buf);
202 else if (type === 'dylib_code_sign_drs')
203 return this.parseLinkEdit(type, buf);
204 else if (type === 'main')
205 return this.parseMain(type, buf);
206 else
207 return {
208 type: type,
209 data: buf
210 };
211 }
212
213 parseSegmentCmd (type, buf, file) {
214 var total = type === 'segment' ? 48 : 64;

Callers 1

parseCommandsMethod · 0.95

Calls 13

parseSegmentCmdMethod · 0.95
parseSymtabMethod · 0.95
parseSymsegMethod · 0.95
parseEncryptionInfoMethod · 0.95
parseEncryptionInfo64Method · 0.95
parseRpathMethod · 0.95
parseDysymtabMethod · 0.95
parseLoadDylibMethod · 0.95
parseLoadDylinkerMethod · 0.95
parseVersionMinMethod · 0.95
parseLinkEditMethod · 0.95
parseFunctionStartsMethod · 0.95

Tested by

no test coverage detected