origami 1.0.4 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +40 -49
- data/bin/gui/about.rb +1 -1
- data/bin/pdfencrypt +10 -4
- data/origami/actions.rb +0 -1
- data/origami/docmdp.rb +96 -0
- data/origami/encryption.rb +103 -14
- data/origami/graphics.rb +1 -0
- data/origami/graphics/colors.rb +23 -23
- data/origami/graphics/instruction.rb +7 -29
- data/origami/graphics/path.rb +53 -19
- data/origami/graphics/render.rb +69 -0
- data/origami/graphics/state.rb +9 -9
- data/origami/graphics/text.rb +66 -48
- data/origami/graphics/xobject.rb +65 -50
- data/origami/javascript.rb +135 -0
- data/origami/metadata.rb +24 -0
- data/origami/object.rb +1 -1
- data/origami/page.rb +12 -0
- data/origami/parsers/pdf/linear.rb +0 -0
- data/origami/pdf.rb +2 -2
- metadata +77 -75
- data/VERSION +0 -1
data/origami/object.rb
CHANGED
data/origami/page.rb
CHANGED
@@ -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
|
data/origami/pdf.rb
CHANGED
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:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
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-
|
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.
|
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/
|
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/
|
59
|
-
- origami/3d.rb
|
60
|
-
- origami/actions.rb
|
61
|
-
- origami/xreftable.rb
|
86
|
+
- origami/metadata.rb
|
62
87
|
- origami/name.rb
|
63
|
-
- origami/
|
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/
|
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/
|
82
|
-
- origami/stream.rb
|
83
|
-
- origami/outline.rb
|
98
|
+
- origami/parsers/ppklite.rb
|
84
99
|
- origami/reference.rb
|
85
|
-
- origami/
|
86
|
-
- origami/
|
100
|
+
- origami/signature.rb
|
101
|
+
- origami/stream.rb
|
87
102
|
- origami/string.rb
|
88
|
-
- origami/null.rb
|
89
103
|
- origami/trailer.rb
|
90
|
-
- origami/
|
91
|
-
- origami/
|
92
|
-
- origami/
|
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
|
-
-
|
108
|
-
- bin/
|
109
|
-
- bin/gui/
|
110
|
-
- bin/gui/
|
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/
|
113
|
+
- bin/gui/hexdump.rb
|
114
114
|
- bin/gui/hexview.rb
|
115
|
-
- bin/gui/
|
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/
|
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/
|
126
|
+
- bin/pdfdecompress
|
127
|
+
- bin/pdfdecrypt
|
128
|
+
- bin/pdfextract
|
129
|
+
- bin/pdfmetadata
|
130
130
|
- bin/pdfsh
|
131
|
-
- bin/
|
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/
|
138
|
-
- tests/
|
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/
|
146
|
-
-
|
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://
|
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
|