origami 1.0.4 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -403,7 +403,7 @@ module Origami
403
403
  def pdf
404
404
  if self.is_indirect? then @pdf
405
405
  else
406
- @parent.pdf
406
+ @parent.pdf if @parent
407
407
  end
408
408
  end
409
409
 
@@ -88,6 +88,7 @@ module Origami
88
88
  def each_named_page(&b)
89
89
  each_name(Names::Root::PAGES, &b)
90
90
  end
91
+
91
92
  end
92
93
 
93
94
  module ResourcesHolder
@@ -377,6 +378,17 @@ module Origami
377
378
  set_indirect(true)
378
379
  end
379
380
 
381
+ def render(engine) #:nodoc:
382
+ contents = self.Contents
383
+ return unless contents.is_a? Stream
384
+
385
+ unless contents.is_a? ContentStream
386
+ contents = ContentStream.new(contents.data)
387
+ end
388
+
389
+ contents.render(engine)
390
+ end
391
+
380
392
  def pre_build
381
393
  self.Resources = Resources.new.pre_build unless self.has_key?(:Resources)
382
394
 
File without changes
@@ -57,8 +57,8 @@ require 'origami/xfa'
57
57
 
58
58
  module Origami
59
59
 
60
- VERSION = "1.0.4"
61
- REVISION = "$Revision$" #:nodoc:
60
+ VERSION = "1.1.1"
61
+ REVISION = "$Revision: rev 117/, 2011/09/14 15:24:40 darko $" #:nodoc:
62
62
 
63
63
  #
64
64
  # Global options for Origami.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origami
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
- - 0
9
- - 4
10
- version: 1.0.4
8
+ - 1
9
+ - 1
10
+ version: 1.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Guillaume Delugr\xC3\xA9"
@@ -15,12 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-27 00:00:00 +02:00
18
+ date: 2011-09-22 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
22
22
  description: |
23
- Origami is a PDF-compliant parser. It is not a PDF rendering library, it aims at providing a scripting tool to generate and analyze malicious PDF files.
23
+ Origami is a PDF-compliant parser. This is not a PDF rendering library, it aims at providing a scripting tool to generate and analyze malicious PDF files.
24
24
  As well, it can be used to create on-the-fly customized PDFs, or to inject (evil) code into already existing documents.
25
25
 
26
26
  email: guillaume at security-labs dot org
@@ -43,112 +43,114 @@ extra_rdoc_files: []
43
43
  files:
44
44
  - README
45
45
  - COPYING.LESSER
46
- - VERSION
47
46
  - origami.rb
47
+ - origami/graphics/colors.rb
48
+ - origami/graphics/instruction.rb
49
+ - origami/graphics/path.rb
50
+ - origami/graphics/patterns.rb
51
+ - origami/graphics/render.rb
52
+ - origami/graphics/state.rb
53
+ - origami/graphics/text.rb
54
+ - origami/graphics/xobject.rb
55
+ - origami/3d.rb
56
+ - origami/acroform.rb
57
+ - origami/actions.rb
48
58
  - origami/adobe/fdf.rb
49
59
  - origami/adobe/ppklite.rb
60
+ - origami/annotations.rb
61
+ - origami/array.rb
50
62
  - origami/boolean.rb
51
- - origami/signature.rb
52
- - origami/export.rb
53
- - origami/parser.rb
54
63
  - origami/catalog.rb
55
- - origami/header.rb
64
+ - origami/destinations.rb
65
+ - origami/dictionary.rb
66
+ - origami/docmdp.rb
67
+ - origami/export.rb
56
68
  - origami/file.rb
69
+ - origami/filters/ascii.rb
70
+ - origami/filters/ccitt.rb
71
+ - origami/filters/crypt.rb
72
+ - origami/filters/dct.rb
73
+ - origami/filters/flate.rb
74
+ - origami/filters/jbig2.rb
75
+ - origami/filters/jpx.rb
76
+ - origami/filters/lzw.rb
77
+ - origami/filters/predictors.rb
78
+ - origami/filters/runlength.rb
79
+ - origami/filters.rb
80
+ - origami/font.rb
81
+ - origami/functions.rb
82
+ - origami/graphics.rb
83
+ - origami/header.rb
84
+ - origami/javascript.rb
57
85
  - origami/linearization.rb
58
- - origami/object.rb
59
- - origami/3d.rb
60
- - origami/actions.rb
61
- - origami/xreftable.rb
86
+ - origami/metadata.rb
62
87
  - origami/name.rb
63
- - origami/graphics.rb
64
- - origami/xfa.rb
65
- - origami/graphics/xobject.rb
66
- - origami/graphics/text.rb
67
- - origami/graphics/patterns.rb
68
- - origami/graphics/state.rb
69
- - origami/graphics/colors.rb
70
- - origami/graphics/path.rb
71
- - origami/graphics/instruction.rb
72
- - origami/destinations.rb
88
+ - origami/null.rb
73
89
  - origami/numeric.rb
90
+ - origami/obfuscation.rb
91
+ - origami/object.rb
92
+ - origami/outline.rb
74
93
  - origami/page.rb
75
- - origami/annotations.rb
76
- - origami/webcapture.rb
94
+ - origami/parser.rb
77
95
  - origami/parsers/fdf.rb
78
96
  - origami/parsers/pdf/linear.rb
79
- - origami/parsers/ppklite.rb
80
97
  - origami/parsers/pdf.rb
81
- - origami/encryption.rb
82
- - origami/stream.rb
83
- - origami/outline.rb
98
+ - origami/parsers/ppklite.rb
84
99
  - origami/reference.rb
85
- - origami/metadata.rb
86
- - origami/font.rb
100
+ - origami/signature.rb
101
+ - origami/stream.rb
87
102
  - origami/string.rb
88
- - origami/null.rb
89
103
  - origami/trailer.rb
90
- - origami/filters.rb
91
- - origami/dictionary.rb
92
- - origami/functions.rb
93
- - origami/acroform.rb
94
- - origami/filters/jbig2.rb
95
- - origami/filters/predictors.rb
96
- - origami/filters/jpx.rb
97
- - origami/filters/ccitt.rb
98
- - origami/filters/lzw.rb
99
- - origami/filters/dct.rb
100
- - origami/filters/crypt.rb
101
- - origami/filters/ascii.rb
102
- - origami/filters/runlength.rb
103
- - origami/filters/flate.rb
104
- - origami/array.rb
105
- - origami/obfuscation.rb
104
+ - origami/xfa.rb
105
+ - origami/xreftable.rb
106
+ - origami/webcapture.rb
106
107
  - origami/pdf.rb
107
- - bin/pdfencrypt
108
- - bin/pdfdecompress
109
- - bin/gui/imgview.rb
110
- - bin/gui/hexdump.rb
111
- - bin/gui/walker.rb
108
+ - origami/encryption.rb
109
+ - bin/config/pdfcop.conf.yml
110
+ - bin/gui/about.rb
111
+ - bin/gui/config.rb
112
112
  - bin/gui/file.rb
113
- - bin/gui/treeview.rb
113
+ - bin/gui/hexdump.rb
114
114
  - bin/gui/hexview.rb
115
- - bin/gui/signing.rb
115
+ - bin/gui/imgview.rb
116
116
  - bin/gui/menu.rb
117
- - bin/gui/about.rb
118
117
  - bin/gui/properties.rb
119
- - bin/gui/config.rb
118
+ - bin/gui/signing.rb
120
119
  - bin/gui/textview.rb
120
+ - bin/gui/treeview.rb
121
+ - bin/gui/walker.rb
121
122
  - bin/gui/xrefs.rb
122
123
  - bin/pdf2graph
123
- - bin/pdfmetadata
124
- - bin/pdfwalker
125
- - bin/pdfextract
126
124
  - bin/pdf2ruby
127
- - bin/pdfdecrypt
128
125
  - bin/pdfcocoon
129
- - bin/config/pdfcop.conf.yml
126
+ - bin/pdfdecompress
127
+ - bin/pdfdecrypt
128
+ - bin/pdfextract
129
+ - bin/pdfmetadata
130
130
  - bin/pdfsh
131
- - bin/shell/hexdump.rb
131
+ - bin/pdfwalker
132
132
  - bin/shell/console.rb
133
+ - bin/shell/hexdump.rb
134
+ - bin/pdfencrypt
133
135
  - bin/pdfcop
134
- - tests/tc_pdfsig.rb
135
- - tests/dataset/test.dummykey
136
136
  - tests/dataset/test.dummycrt
137
- - tests/tc_streams.rb
138
- - tests/tc_pages.rb
137
+ - tests/dataset/test.dummykey
138
+ - tests/tc_actions.rb
139
139
  - tests/tc_annotations.rb
140
+ - tests/tc_pages.rb
140
141
  - tests/tc_pdfattach.rb
141
- - tests/ts_pdf.rb
142
- - tests/tc_pdfparse.rb
143
- - tests/tc_pdfnew.rb
144
142
  - tests/tc_pdfencrypt.rb
145
- - tests/tc_actions.rb
146
- - templates/xdp.rb
143
+ - tests/tc_pdfnew.rb
144
+ - tests/tc_pdfparse.rb
145
+ - tests/tc_pdfsig.rb
146
+ - tests/tc_streams.rb
147
+ - tests/ts_pdf.rb
147
148
  - templates/patterns.rb
148
149
  - templates/widgets.rb
150
+ - templates/xdp.rb
149
151
  - bin/shell/.irbrc
150
152
  has_rdoc: true
151
- homepage: http://esec-lab.sogeti.com/dotclear/index.php?pages/Origami
153
+ homepage: http://aslr.fr/pages/Origami
152
154
  licenses: []
153
155
 
154
156
  post_install_message:
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.0.0-beta3