Skip to content

Commit 6bc9021

Browse files
committed
Add UEFI module extraction method
1 parent bb935b0 commit 6bc9021

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/extract-uefi.rb

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
require "cocaine"
2+
3+
module VBiosFinder
4+
class Extract
5+
def self.uefi file
6+
begin
7+
line = Cocaine::CommandLine.new("UEFIDump", ":file")
8+
puts line.run(file: file)
9+
rescue Cocaine::ExitStatusError => e
10+
# TODO: fix Test::uefi before uncommenting this
11+
# puts e.message
12+
return
13+
end
14+
end
15+
end
16+
class Test
17+
def self.uefi file
18+
begin
19+
line = Cocaine::CommandLine.new("UEFIDump", ":file")
20+
puts line.run(file: file)
21+
true
22+
rescue Cocaine::ExitStatusError => e
23+
false
24+
end
25+
end
26+
end
27+
end

0 commit comments

Comments
 (0)