Module: DeltaAttack::Extractor
- Defined in:
- lib/delta_attack/extractor.rb,
lib/delta_attack/extractor/base.rb,
lib/delta_attack/extractor/word.rb,
lib/delta_attack/extractor/excel.rb,
lib/delta_attack/extractor/servlet.rb,
lib/delta_attack/extractor/power_point.rb
Defined Under Namespace
Classes: Base, Excel, PowerPoint, Servlet, Word
Constant Summary collapse
- Error =
Class.new(RuntimeError)
Class Method Summary collapse
Class Method Details
.extract(content, type) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/delta_attack/extractor.rb', line 9 def extract(content,type) extractor = case type when :word then Word when :excel then Excel when :power_point then PowerPoint else raise Error.new("not supported") end extractor.new(content.to_java_bytes).data.flatten.join("\n") end |