zip recognize
This commit is contained in:
@ -3,8 +3,25 @@
|
||||
detect a given file for formats or ISA
|
||||
*)
|
||||
|
||||
open Firmex
|
||||
|
||||
open Printf
|
||||
|
||||
let runner isa file =
|
||||
printf "Detect file isa=%b %s\n" isa file
|
||||
let try_unarchive (archive : Archive.t) : unit =
|
||||
printf "archive file=%s type=%s" archive.file archive.typ
|
||||
|
||||
let try_detect file =
|
||||
printf "detect file %s" file
|
||||
|
||||
let runner isa file =
|
||||
if isa then
|
||||
()
|
||||
else
|
||||
(* assume file exists *)
|
||||
(* check if file is an archive, else try analyze as a firmware
|
||||
for now, let's use binwalk result
|
||||
in the future, finding for signatures inside the file
|
||||
*)
|
||||
match Archive.from file with
|
||||
| Some archive -> try_unarchive archive
|
||||
| None -> try_detect file
|
||||
|
Reference in New Issue
Block a user