Skip to content

Commit

Permalink
Add UPX extraction method
Browse files Browse the repository at this point in the history
  • Loading branch information
coderobe committed Dec 24, 2017
1 parent 00cf100 commit bb935b0
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/extract-upx.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
require "cocaine"

module VBiosFinder
class Extract
def self.upx file
begin
line = Cocaine::CommandLine.new("upx", "-d :file -o :outfile")
line.run(file: file, outfile: "upx-#{file}")
rescue Cocaine::ExitStatusError => e
puts e.message
return
end
end
end
class Test
def self.upx file
begin
line = Cocaine::CommandLine.new("upx", "-t :file")
line.run(file: file)
true
rescue Cocaine::ExitStatusError => e
false
end
end
end
end

0 comments on commit bb935b0

Please sign in to comment.