pedump 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/pedump.rb +4 -1
- data/lib/pedump/cli.rb +6 -7
- data/pedump.gemspec +1 -1
- metadata +14 -14
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/lib/pedump.rb
CHANGED
@@ -351,7 +351,7 @@ class PEdump
|
|
351
351
|
if dos_stub_offset <= 0
|
352
352
|
logger.warn "[?] invalid DOS stub offset #{dos_stub_offset}"
|
353
353
|
nil
|
354
|
-
elsif dos_stub_offset > f.size
|
354
|
+
elsif f && dos_stub_offset > f.size
|
355
355
|
logger.warn "[?] DOS stub offset beyond EOF: #{dos_stub_offset}"
|
356
356
|
nil
|
357
357
|
elsif dos_stub_size < 0
|
@@ -360,6 +360,9 @@ class PEdump
|
|
360
360
|
elsif dos_stub_size == 0
|
361
361
|
# no DOS stub, it's ok
|
362
362
|
nil
|
363
|
+
elsif !f
|
364
|
+
# no open file, it's ok
|
365
|
+
nil
|
363
366
|
else
|
364
367
|
if dos_stub_size > 0x1000
|
365
368
|
logger.warn "[?] DOS stub size too big (#{dos_stub_size}), limiting to 0x1000"
|
data/lib/pedump/cli.rb
CHANGED
@@ -325,18 +325,17 @@ class PEdump::CLI
|
|
325
325
|
def dump_exports data
|
326
326
|
printf "# module %s\n# flags=0x%x ts=%s version=%d.%d ord_base=%d\n",
|
327
327
|
data.name.inspect,
|
328
|
-
data.Characteristics,
|
328
|
+
data.Characteristics.to_i,
|
329
329
|
Time.at(data.TimeDateStamp.to_i).strftime('"%Y-%m-%d %H:%M:%S"'),
|
330
330
|
data.MajorVersion, data.MinorVersion,
|
331
331
|
data.Base
|
332
332
|
|
333
333
|
if @options[:verbose]
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
data.AddressOfNameOrdinals, @pedump.va2file(data.AddressOfNameOrdinals)
|
334
|
+
[%w'Names', %w'EntryPoints Functions', %w'Ordinals NameOrdinals'].each do |x|
|
335
|
+
va = data["AddressOf"+x.last]
|
336
|
+
ofs = @pedump.va2file(va) || '?'
|
337
|
+
printf "# %-12s rva=0x%08x file_offset=%8s\n", x.first, va, ofs
|
338
|
+
end
|
340
339
|
end
|
341
340
|
|
342
341
|
printf "# nFuncs=%d nNames=%d\n",
|
data/pedump.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pedump
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-12-12 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multipart-post
|
16
|
-
requirement: &
|
16
|
+
requirement: &70099128727380 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.1.4
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70099128727380
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: progressbar
|
27
|
-
requirement: &
|
27
|
+
requirement: &70099128726580 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.9.2
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70099128726580
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70099128724780 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 2.3.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70099128724780
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
|
-
requirement: &
|
49
|
+
requirement: &70099128713520 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.0.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70099128713520
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: jeweler
|
60
|
-
requirement: &
|
60
|
+
requirement: &70099128712420 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.6.4
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70099128712420
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rcov
|
71
|
-
requirement: &
|
71
|
+
requirement: &70099128711520 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70099128711520
|
80
80
|
description: dump headers, sections, extract resources of win32 PE exe,dll,etc
|
81
81
|
email: zed.0xff@gmail.com
|
82
82
|
executables:
|
@@ -115,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
115
|
version: '0'
|
116
116
|
segments:
|
117
117
|
- 0
|
118
|
-
hash:
|
118
|
+
hash: 3702742729748465882
|
119
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
120
|
none: false
|
121
121
|
requirements:
|