origami 1.2.3 → 1.2.4

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.
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: 25
5
- prerelease: false
4
+ hash: 23
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 3
10
- version: 1.2.3
9
+ - 4
10
+ version: 1.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Guillaume Delugr\xC3\xA9"
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-20 00:00:00 +02:00
19
- default_executable:
18
+ date: 2012-05-21 00:00:00 Z
20
19
  dependencies: []
21
20
 
22
21
  description: |
@@ -44,98 +43,99 @@ extra_rdoc_files: []
44
43
  files:
45
44
  - README
46
45
  - COPYING.LESSER
46
+ - lib/origami.rb
47
47
  - lib/origami/3d.rb
48
+ - lib/origami/acroform.rb
48
49
  - lib/origami/actions.rb
49
50
  - lib/origami/annotations.rb
50
51
  - lib/origami/array.rb
51
52
  - lib/origami/boolean.rb
52
53
  - lib/origami/catalog.rb
53
54
  - lib/origami/destinations.rb
55
+ - lib/origami/dictionary.rb
54
56
  - lib/origami/export.rb
57
+ - lib/origami/extensions/fdf.rb
58
+ - lib/origami/extensions/ppklite.rb
59
+ - lib/origami/file.rb
55
60
  - lib/origami/filters.rb
56
61
  - lib/origami/filters/ascii.rb
57
62
  - lib/origami/filters/crypt.rb
58
63
  - lib/origami/filters/dct.rb
59
- - lib/origami/filters/flate.rb
64
+ - lib/origami/filters/jbig2.rb
65
+ - lib/origami/filters/jpx.rb
60
66
  - lib/origami/filters/lzw.rb
61
67
  - lib/origami/filters/predictors.rb
62
68
  - lib/origami/filters/runlength.rb
63
69
  - lib/origami/filters/ccitt.rb
64
- - lib/origami/filters/jpx.rb
65
- - lib/origami/filters/jbig2.rb
70
+ - lib/origami/filters/flate.rb
66
71
  - lib/origami/font.rb
67
72
  - lib/origami/functions.rb
68
73
  - lib/origami/graphics.rb
74
+ - lib/origami/graphics/colors.rb
69
75
  - lib/origami/graphics/instruction.rb
70
76
  - lib/origami/graphics/path.rb
71
77
  - lib/origami/graphics/patterns.rb
72
78
  - lib/origami/graphics/render.rb
73
- - lib/origami/graphics/text.rb
74
79
  - lib/origami/graphics/state.rb
75
- - lib/origami/graphics/colors.rb
80
+ - lib/origami/graphics/text.rb
76
81
  - lib/origami/graphics/xobject.rb
77
82
  - lib/origami/header.rb
83
+ - lib/origami/javascript.rb
78
84
  - lib/origami/linearization.rb
79
85
  - lib/origami/metadata.rb
86
+ - lib/origami/name.rb
80
87
  - lib/origami/null.rb
81
88
  - lib/origami/numeric.rb
82
89
  - lib/origami/obfuscation.rb
83
90
  - lib/origami/outline.rb
84
91
  - lib/origami/outputintents.rb
85
- - lib/origami/parsers/pdf/linear.rb
86
- - lib/origami/parsers/pdf.rb
92
+ - lib/origami/page.rb
93
+ - lib/origami/parser.rb
87
94
  - lib/origami/parsers/fdf.rb
95
+ - lib/origami/parsers/pdf.rb
96
+ - lib/origami/parsers/pdf/linear.rb
88
97
  - lib/origami/parsers/ppklite.rb
98
+ - lib/origami/pdf.rb
89
99
  - lib/origami/reference.rb
90
- - lib/origami/string.rb
100
+ - lib/origami/signature.rb
101
+ - lib/origami/stream.rb
91
102
  - lib/origami/trailer.rb
92
103
  - lib/origami/webcapture.rb
93
104
  - lib/origami/xfa.rb
94
- - lib/origami/docmdp.rb
95
- - lib/origami/stream.rb
96
- - lib/origami/object.rb
97
- - lib/origami/extensions/fdf.rb
98
- - lib/origami/extensions/ppklite.rb
99
- - lib/origami/parser.rb
100
- - lib/origami/javascript.rb
101
- - lib/origami/signature.rb
102
105
  - lib/origami/xreftable.rb
103
- - lib/origami/page.rb
104
- - lib/origami/acroform.rb
105
- - lib/origami/name.rb
106
+ - lib/origami/object.rb
106
107
  - lib/origami/encryption.rb
107
- - lib/origami/dictionary.rb
108
- - lib/origami/pdf.rb
109
- - lib/origami/file.rb
110
- - lib/origami.rb
108
+ - lib/origami/string.rb
111
109
  - bin/config/pdfcop.conf.yml
110
+ - bin/gui/COPYING
112
111
  - bin/gui/about.rb
113
- - bin/gui/config.rb
114
112
  - bin/gui/file.rb
115
- - bin/gui/hexdump.rb
116
113
  - bin/gui/imgview.rb
117
- - bin/gui/properties.rb
118
114
  - bin/gui/signing.rb
119
- - bin/gui/xrefs.rb
120
115
  - bin/gui/walker.rb
116
+ - bin/gui/xrefs.rb
117
+ - bin/gui/menu.rb
118
+ - bin/gui/gtkhex.rb
121
119
  - bin/gui/hexview.rb
122
- - bin/gui/treeview.rb
123
120
  - bin/gui/textview.rb
124
- - bin/gui/menu.rb
125
- - bin/pdfsh
126
- - bin/pdfwalker
127
- - bin/shell/console.rb
128
- - bin/shell/hexdump.rb
121
+ - bin/gui/treeview.rb
122
+ - bin/gui/config.rb
123
+ - bin/gui/properties.rb
129
124
  - bin/pdf2graph
130
125
  - bin/pdf2pdfa
131
- - bin/pdf2ruby
132
126
  - bin/pdfcocoon
133
127
  - bin/pdfcop
134
128
  - bin/pdfdecompress
135
129
  - bin/pdfdecrypt
136
- - bin/pdfencrypt
137
130
  - bin/pdfmetadata
131
+ - bin/pdfsh
132
+ - bin/shell/hexdump.rb
133
+ - bin/shell/console.rb
134
+ - bin/pdf2ruby
135
+ - bin/pdfencrypt
138
136
  - bin/pdfextract
137
+ - bin/pdfwalker
138
+ - samples/README.txt
139
139
  - samples/actions/launch/calc.rb
140
140
  - samples/actions/launch/winparams.rb
141
141
  - samples/actions/loop/loopgoto.rb
@@ -147,17 +147,16 @@ files:
147
147
  - samples/actions/webbug/webbug-browser.rb
148
148
  - samples/actions/webbug/webbug-js.rb
149
149
  - samples/actions/webbug/webbug-reader.rb
150
- - samples/attachments/attached.txt
151
150
  - samples/attachments/attach.rb
151
+ - samples/attachments/attached.txt
152
152
  - samples/crypto/crypto.rb
153
153
  - samples/digsig/signed.rb
154
154
  - samples/exploits/cve-2008-2992-utilprintf.rb
155
155
  - samples/exploits/cve-2009-0927-geticon.rb
156
156
  - samples/exploits/exploit_customdictopen.rb
157
157
  - samples/exploits/getannots.rb
158
- - samples/flash/helloworld.swf
159
158
  - samples/flash/flash.rb
160
- - samples/README.txt
159
+ - samples/flash/helloworld.swf
161
160
  - samples/javascript/attached.txt
162
161
  - samples/javascript/js.rb
163
162
  - templates/patterns.rb
@@ -165,7 +164,6 @@ files:
165
164
  - templates/xdp.rb
166
165
  - bin/shell/.irbrc
167
166
  - test/ts_pdf.rb
168
- has_rdoc: true
169
167
  homepage: http://aslr.fr/pages/Origami
170
168
  licenses: []
171
169
 
@@ -195,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
193
  requirements:
196
194
  - ruby-gtk2 if you plan to run the PDF Walker interface
197
195
  rubyforge_project:
198
- rubygems_version: 1.3.7
196
+ rubygems_version: 1.8.24
199
197
  signing_key:
200
198
  specification_version: 3
201
199
  summary: Origami aims at providing a scripting tool to generate and analyze malicious PDF files.
@@ -1,74 +0,0 @@
1
- =begin
2
-
3
- = File
4
- hexdump.rb
5
-
6
- = Info
7
- This file is part of Origami, PDF manipulation framework for Ruby
8
- Copyright (C) 2010 Guillaume Delugr� <guillaume@security-labs.org>
9
- All right reserved.
10
-
11
- Origami is free software: you can redistribute it and/or modify
12
- it under the terms of the GNU Lesser General Public License as published by
13
- the Free Software Foundation, either version 3 of the License, or
14
- (at your option) any later version.
15
-
16
- Origami is distributed in the hope that it will be useful,
17
- but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- GNU Lesser General Public License for more details.
20
-
21
- You should have received a copy of the GNU Lesser General Public License
22
- along with Origami. If not, see <http://www.gnu.org/licenses/>.
23
-
24
- =end
25
-
26
- class String #:nodoc:
27
-
28
- def hexdump(bytesperline = 16, upcase = true, offsets = true)
29
-
30
- dump = ""
31
- counter = 0
32
-
33
- while counter < length
34
-
35
- offset = sprintf("%010u", counter)
36
-
37
- linelen = (counter < length - bytesperline) ? bytesperline : (length - counter)
38
- bytes = ""
39
- linelen.times do |i|
40
-
41
- byte = self[counter + i].ord.to_s(16)
42
- if byte.size < 2 then byte.insert(0, "0") end
43
- bytes << byte
44
- bytes << " " unless i == bytesperline - 1
45
-
46
- end
47
-
48
- ascii = self[counter, linelen].ascii_print
49
-
50
- if upcase
51
- offset.upcase!
52
- bytes.upcase!
53
- end
54
-
55
- dump << "#{offset if offsets} #{bytes.to_s.ljust(bytesperline * 3 - 1)} #{ascii}\n"
56
-
57
- counter += bytesperline
58
-
59
- end
60
-
61
- dump
62
- end
63
-
64
- def ascii_print
65
-
66
- printable = ""
67
- self.each_byte do |c|
68
- if c >= ' '[0].ord && c <= '~'[0].ord then printable << c else printable << '.' end
69
- end
70
-
71
- printable
72
- end
73
-
74
- end
@@ -1,96 +0,0 @@
1
- =begin
2
-
3
- = File
4
- docmdp.rb
5
-
6
- = Info
7
- This file is part of Origami, PDF manipulation framework for Ruby
8
- Copyright (C) 2010 Guillaume Delugr� <guillaume@security-labs.org>
9
- All right reserved.
10
-
11
- Origami is free software: you can redistribute it and/or modify
12
- it under the terms of the GNU Lesser General Public License as published by
13
- the Free Software Foundation, either version 3 of the License, or
14
- (at your option) any later version.
15
-
16
- Origami is distributed in the hope that it will be useful,
17
- but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- GNU Lesser General Public License for more details.
20
-
21
- You should have received a copy of the GNU Lesser General Public License
22
- along with Origami. If not, see <http://www.gnu.org/licenses/>.
23
-
24
- =end
25
-
26
- module Origami
27
-
28
- class Null
29
- def to_docmdp_str
30
- "\000"
31
- end
32
- end
33
-
34
- class Integer
35
- def to_docmdp_str
36
- [ 1, self.value & 0xFFFFFFFF ].pack("CN")
37
- end
38
- end
39
-
40
- class Real
41
- def to_docmdp_str
42
- [ 2, self.value.round & 0xFFFFFFFF ].pack("CN")
43
- end
44
- end
45
-
46
- class Boolean
47
- def to_docmdp_str
48
- [ 3, (self.false?) ? 0 : 1 ].pack("CN")
49
- end
50
- end
51
-
52
- class Name
53
- def to_docmdp_str
54
- [ 4, self.to_s.length, self.to_s ].pack("CNA*")
55
- end
56
- end
57
-
58
- class String
59
- def to_docmdp_str
60
- [ 5, self.to_s.length, self.to_s ].pack("CNA*")
61
- end
62
- end
63
-
64
- class Dictionary
65
- def to_docmdp_str(*fields)
66
- if fields.empty?
67
- self.each_pair { |key, value|
68
-
69
- }
70
- else
71
-
72
- end
73
- end
74
- end
75
-
76
- class Array
77
- def to_docmdp_str
78
- str = [ 7, self.length ].pack("CN")
79
-
80
- self.each do |obj|
81
- str << obj.to_docmdp_str
82
- end
83
-
84
- str
85
- end
86
- end
87
-
88
- class Stream
89
- def to_docmdp_str
90
- [ 8, self.dictionary.size ].pack("CN") +
91
- self.dictionary.to_docmdp_str(:DecodeParms, :F, :FDecodeParms, :FFilter, :Filter, :Length) +
92
- [ self.rawdata.length, self.rawdata ].pack("NA*")
93
- end
94
- end
95
-
96
- end