origami 1.2.5 → 1.2.6

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.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/bin/gui/config.rb +0 -4
  3. data/bin/gui/imgview.rb +2 -2
  4. data/bin/gui/menu.rb +11 -3
  5. data/bin/gui/treeview.rb +9 -3
  6. data/bin/pdfexplode +220 -0
  7. data/bin/pdfextract +3 -0
  8. data/lib/origami/acroform.rb +2 -2
  9. data/lib/origami/actions.rb +62 -35
  10. data/lib/origami/annotations.rb +3 -2
  11. data/lib/origami/array.rb +27 -4
  12. data/lib/origami/boolean.rb +2 -2
  13. data/lib/origami/catalog.rb +45 -45
  14. data/lib/origami/dictionary.rb +87 -14
  15. data/lib/origami/encryption.rb +46 -24
  16. data/lib/origami/file.rb +1 -2
  17. data/lib/origami/filters/ccitt.rb +118 -66
  18. data/lib/origami/filters/flate.rb +5 -1
  19. data/lib/origami/filters.rb +84 -2
  20. data/lib/origami/font.rb +71 -71
  21. data/lib/origami/graphics/patterns.rb +2 -1
  22. data/lib/origami/graphics/xobject.rb +123 -1
  23. data/lib/origami/javascript.rb +2 -1
  24. data/lib/origami/name.rb +2 -2
  25. data/lib/origami/null.rb +2 -2
  26. data/lib/origami/numeric.rb +11 -3
  27. data/lib/origami/object.rb +37 -16
  28. data/lib/origami/page.rb +135 -71
  29. data/lib/origami/parser.rb +11 -4
  30. data/lib/origami/parsers/pdf/linear.rb +1 -0
  31. data/lib/origami/parsers/pdf.rb +10 -0
  32. data/lib/origami/pdf.rb +10 -70
  33. data/lib/origami/reference.rb +4 -5
  34. data/lib/origami/signature.rb +22 -8
  35. data/lib/origami/stream.rb +41 -20
  36. data/lib/origami/string.rb +15 -6
  37. data/lib/origami/trailer.rb +9 -5
  38. data/lib/origami.rb +19 -0
  39. data/samples/actions/loop/loopgoto.rb +1 -1
  40. data/samples/actions/loop/loopnamed.rb +2 -2
  41. data/samples/actions/named/named.rb +1 -1
  42. data/samples/actions/samba/smbrelay.rb +1 -1
  43. data/samples/actions/triggerevents/trigger.rb +13 -13
  44. data/samples/actions/webbug/webbug-browser.rb +1 -1
  45. data/samples/actions/webbug/webbug-js.rb +1 -1
  46. data/samples/actions/webbug/webbug-reader.rb +1 -1
  47. data/samples/attachments/attach.rb +2 -2
  48. data/samples/exploits/cve-2008-2992-utilprintf.rb +1 -1
  49. data/samples/exploits/cve-2009-0927-geticon.rb +1 -1
  50. data/samples/exploits/exploit_customdictopen.rb +2 -2
  51. data/samples/exploits/getannots.rb +1 -1
  52. data/samples/javascript/js.rb +2 -2
  53. data/test/ts_pdf.rb +23 -23
  54. metadata +71 -86
data/test/ts_pdf.rb CHANGED
@@ -23,28 +23,28 @@ rescue LoadError
23
23
  end
24
24
  include Origami
25
25
 
26
- class TS_PdfTests
27
- def self.suite
28
- suite = Test::Unit::TestSuite.new "PDF test suite"
29
- suite << TC_PdfParse.suite
30
- suite << TC_PdfNew.suite
31
- suite << TC_Streams.suite
32
- suite << TC_Pages.suite
33
- suite << TC_PdfEncrypt.suite
34
- suite << TC_PdfSig.suite
35
- suite << TC_PdfAttach.suite
36
- suite << TC_Actions.suite
37
- suite << TC_Annotations.suite
38
- suite
39
- end
40
- end
26
+ #class TS_PdfTests
27
+ # def self.suite
28
+ # suite = Test::Unit::TestSuite.new "PDF test suite"
29
+ # suite << TC_PdfParse.suite
30
+ # suite << TC_PdfNew.suite
31
+ # suite << TC_Streams.suite
32
+ # suite << TC_Pages.suite
33
+ # suite << TC_PdfEncrypt.suite
34
+ # suite << TC_PdfSig.suite
35
+ # suite << TC_PdfAttach.suite
36
+ # suite << TC_Actions.suite
37
+ # suite << TC_Annotations.suite
38
+ # suite
39
+ # end
40
+ #end
41
41
 
42
- if ARGV.size > 0 and ARGV[0] == "gtk"
43
- require 'test/unit/ui/gtk2/testrunner'
44
- Test::Unit::UI::GTK2::TestRunner.run(TS_PdfTests)
45
- else
46
- require 'test/unit/ui/console/testrunner'
47
- Test::Unit::UI::Console::TestRunner.run(TS_PdfTests)
48
- end
42
+ #if ARGV.size > 0 and ARGV[0] == "gtk"
43
+ # require 'test/unit/ui/gtk2/testrunner'
44
+ # Test::Unit::UI::GTK2::TestRunner.run(TS_PdfTests)
45
+ #else
46
+ # require 'test/unit/ui/console/testrunner'
47
+ # Test::Unit::UI::Console::TestRunner.run(TS_PdfTests)
48
+ #end
49
49
 
50
- exit 0
50
+ #exit 0
metadata CHANGED
@@ -1,29 +1,21 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: origami
3
- version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease:
6
- segments:
7
- - 1
8
- - 2
9
- - 5
10
- version: 1.2.5
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.6
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Guillaume Delugre
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2013-01-28 00:00:00 Z
11
+ date: 2013-05-14 00:00:00.000000000 Z
19
12
  dependencies: []
20
-
21
- description: |
22
- 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.
23
- As well, it can be used to create on-the-fly customized PDFs, or to inject (evil) code into already existing documents.
24
-
13
+ description: "Origami is a PDF-compliant parser. This is not a PDF rendering library,
14
+ it aims at providing a scripting tool to generate and analyze malicious PDF files.
15
+ \nAs well, it can be used to create on-the-fly customized PDFs, or to inject (evil)
16
+ code into already existing documents.\n"
25
17
  email: guillaume at security-labs dot org
26
- executables:
18
+ executables:
27
19
  - pdfdecompress
28
20
  - pdfdecrypt
29
21
  - pdfencrypt
@@ -36,13 +28,42 @@ executables:
36
28
  - pdfsh
37
29
  - pdfwalker
38
30
  - pdf2pdfa
31
+ - pdfexplode
39
32
  extensions: []
40
-
41
33
  extra_rdoc_files: []
42
-
43
- files:
34
+ files:
44
35
  - README
45
36
  - COPYING.LESSER
37
+ - bin/config/pdfcop.conf.yml
38
+ - bin/gui/COPYING
39
+ - bin/gui/about.rb
40
+ - bin/gui/config.rb
41
+ - bin/gui/file.rb
42
+ - bin/gui/gtkhex.rb
43
+ - bin/gui/hexview.rb
44
+ - bin/gui/imgview.rb
45
+ - bin/gui/menu.rb
46
+ - bin/gui/properties.rb
47
+ - bin/gui/signing.rb
48
+ - bin/gui/textview.rb
49
+ - bin/gui/treeview.rb
50
+ - bin/gui/walker.rb
51
+ - bin/gui/xrefs.rb
52
+ - bin/pdf2graph
53
+ - bin/pdf2pdfa
54
+ - bin/pdf2ruby
55
+ - bin/pdfcocoon
56
+ - bin/pdfcop
57
+ - bin/pdfdecompress
58
+ - bin/pdfdecrypt
59
+ - bin/pdfencrypt
60
+ - bin/pdfexplode
61
+ - bin/pdfextract
62
+ - bin/pdfmetadata
63
+ - bin/pdfsh
64
+ - bin/pdfwalker
65
+ - bin/shell/console.rb
66
+ - bin/shell/hexdump.rb
46
67
  - lib/origami.rb
47
68
  - lib/origami/3d.rb
48
69
  - lib/origami/acroform.rb
@@ -83,58 +104,29 @@ files:
83
104
  - lib/origami/header.rb
84
105
  - lib/origami/javascript.rb
85
106
  - lib/origami/linearization.rb
107
+ - lib/origami/metadata.rb
108
+ - lib/origami/name.rb
86
109
  - lib/origami/null.rb
110
+ - lib/origami/numeric.rb
87
111
  - lib/origami/obfuscation.rb
112
+ - lib/origami/object.rb
88
113
  - lib/origami/outline.rb
114
+ - lib/origami/outputintents.rb
115
+ - lib/origami/page.rb
116
+ - lib/origami/parser.rb
89
117
  - lib/origami/parsers/fdf.rb
90
118
  - lib/origami/parsers/pdf.rb
91
119
  - lib/origami/parsers/pdf/linear.rb
92
120
  - lib/origami/parsers/ppklite.rb
93
- - lib/origami/xfa.rb
94
- - lib/origami/name.rb
95
- - lib/origami/object.rb
96
- - lib/origami/outputintents.rb
97
- - lib/origami/page.rb
98
- - lib/origami/metadata.rb
99
121
  - lib/origami/pdf.rb
122
+ - lib/origami/reference.rb
100
123
  - lib/origami/signature.rb
101
124
  - lib/origami/stream.rb
102
125
  - lib/origami/string.rb
103
- - lib/origami/parser.rb
104
- - lib/origami/numeric.rb
105
- - lib/origami/reference.rb
106
126
  - lib/origami/trailer.rb
107
127
  - lib/origami/webcapture.rb
128
+ - lib/origami/xfa.rb
108
129
  - lib/origami/xreftable.rb
109
- - bin/config/pdfcop.conf.yml
110
- - bin/gui/COPYING
111
- - bin/gui/file.rb
112
- - bin/gui/gtkhex.rb
113
- - bin/gui/hexview.rb
114
- - bin/gui/textview.rb
115
- - bin/gui/treeview.rb
116
- - bin/gui/walker.rb
117
- - bin/gui/xrefs.rb
118
- - bin/gui/about.rb
119
- - bin/gui/config.rb
120
- - bin/gui/imgview.rb
121
- - bin/gui/menu.rb
122
- - bin/gui/properties.rb
123
- - bin/gui/signing.rb
124
- - bin/pdf2graph
125
- - bin/pdf2pdfa
126
- - bin/pdf2ruby
127
- - bin/pdfcocoon
128
- - bin/pdfcop
129
- - bin/pdfdecompress
130
- - bin/pdfdecrypt
131
- - bin/pdfencrypt
132
- - bin/pdfextract
133
- - bin/pdfmetadata
134
- - bin/pdfsh
135
- - bin/pdfwalker
136
- - bin/shell/console.rb
137
- - bin/shell/hexdump.rb
138
130
  - samples/README.txt
139
131
  - samples/actions/launch/calc.rb
140
132
  - samples/actions/launch/winparams.rb
@@ -165,37 +157,30 @@ files:
165
157
  - bin/shell/.irbrc
166
158
  - test/ts_pdf.rb
167
159
  homepage: http://code.google.com/p/origami-pdf
168
- licenses: []
169
-
160
+ licenses:
161
+ - LGPL-3
162
+ metadata: {}
170
163
  post_install_message:
171
164
  rdoc_options: []
172
-
173
- require_paths:
165
+ require_paths:
174
166
  - lib
175
- required_ruby_version: !ruby/object:Gem::Requirement
176
- none: false
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- hash: 3
181
- segments:
182
- - 0
183
- version: "0"
184
- required_rubygems_version: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - ">="
188
- - !ruby/object:Gem::Version
189
- hash: 3
190
- segments:
191
- - 0
192
- version: "0"
193
- requirements:
167
+ required_ruby_version: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - '>='
170
+ - !ruby/object:Gem::Version
171
+ version: '0'
172
+ required_rubygems_version: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - '>='
175
+ - !ruby/object:Gem::Version
176
+ version: '0'
177
+ requirements:
194
178
  - ruby-gtk2 if you plan to run the PDF Walker interface
195
179
  rubyforge_project:
196
- rubygems_version: 1.8.24
180
+ rubygems_version: 2.0.0
197
181
  signing_key:
198
- specification_version: 3
199
- summary: Origami aims at providing a scripting tool to generate and analyze malicious PDF files.
200
- test_files:
182
+ specification_version: 4
183
+ summary: Origami aims at providing a scripting tool to generate and analyze malicious
184
+ PDF files.
185
+ test_files:
201
186
  - test/ts_pdf.rb