pedump 0.6.6 → 0.6.7
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +22 -22
- data/README.md +1 -0
- data/VERSION +1 -1
- data/lib/pedump/cli.rb +28 -4
- data/pedump.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9ba70619b5754fa0d8c35a0d9d229b78074096e11438678784f7735686101c93
|
|
4
|
+
data.tar.gz: 37d5785c6a3c9e411c2b3fe8359f216cea26c0084b8a1bcdf2df18f745654190
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3bbd37ffaaf1328c13d10d1a764cd3d685e6c4364d6fb5ab4bfd787f51e135b9b284572f88828a73c8ae3fb381646e9044508c6dc9eeff6f8b5d348e8d75474
|
|
7
|
+
data.tar.gz: 9303ed13e74f33c607622a7497d7635718696e28b44dd0027d3ca353aa62474621b264609971ee80917da4b4c458903a9b227ebd9b3761a4ccf0d5fad2df00f0
|
data/Gemfile.lock
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
GEM
|
|
2
2
|
remote: https://rubygems.org/
|
|
3
3
|
specs:
|
|
4
|
-
addressable (2.8.
|
|
5
|
-
public_suffix (>= 2.0.2, <
|
|
4
|
+
addressable (2.8.5)
|
|
5
|
+
public_suffix (>= 2.0.2, < 6.0)
|
|
6
6
|
awesome_print (1.9.2)
|
|
7
7
|
builder (3.2.4)
|
|
8
8
|
descendants_tracker (0.0.4)
|
|
9
9
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
10
10
|
diff-lcs (1.5.0)
|
|
11
|
-
faraday (1.
|
|
11
|
+
faraday (1.10.3)
|
|
12
12
|
faraday-em_http (~> 1.0)
|
|
13
13
|
faraday-em_synchrony (~> 1.0)
|
|
14
14
|
faraday-excon (~> 1.1)
|
|
@@ -24,14 +24,14 @@ GEM
|
|
|
24
24
|
faraday-em_synchrony (1.0.0)
|
|
25
25
|
faraday-excon (1.1.0)
|
|
26
26
|
faraday-httpclient (1.0.1)
|
|
27
|
-
faraday-multipart (1.0.
|
|
28
|
-
multipart-post (
|
|
27
|
+
faraday-multipart (1.0.4)
|
|
28
|
+
multipart-post (~> 2)
|
|
29
29
|
faraday-net_http (1.0.1)
|
|
30
30
|
faraday-net_http_persistent (1.2.0)
|
|
31
31
|
faraday-patron (1.0.0)
|
|
32
32
|
faraday-rack (1.0.0)
|
|
33
33
|
faraday-retry (1.0.3)
|
|
34
|
-
git (1.
|
|
34
|
+
git (1.18.0)
|
|
35
35
|
addressable (~> 2.8)
|
|
36
36
|
rchardet (~> 1.8)
|
|
37
37
|
github_api (0.19.0)
|
|
@@ -41,7 +41,7 @@ GEM
|
|
|
41
41
|
hashie (~> 3.5, >= 3.5.2)
|
|
42
42
|
oauth2 (~> 1.0)
|
|
43
43
|
hashie (3.6.0)
|
|
44
|
-
highline (2.0
|
|
44
|
+
highline (2.1.0)
|
|
45
45
|
iostruct (0.0.5)
|
|
46
46
|
juwelier (2.4.9)
|
|
47
47
|
builder
|
|
@@ -55,15 +55,15 @@ GEM
|
|
|
55
55
|
rake
|
|
56
56
|
rdoc
|
|
57
57
|
semver2
|
|
58
|
-
jwt (2.
|
|
58
|
+
jwt (2.7.1)
|
|
59
59
|
kamelcase (0.0.2)
|
|
60
60
|
semver2 (~> 3)
|
|
61
|
-
mini_portile2 (2.8.
|
|
61
|
+
mini_portile2 (2.8.5)
|
|
62
62
|
multi_json (1.15.0)
|
|
63
63
|
multi_xml (0.6.0)
|
|
64
64
|
multipart-post (2.3.0)
|
|
65
|
-
nokogiri (1.
|
|
66
|
-
mini_portile2 (~> 2.8.
|
|
65
|
+
nokogiri (1.15.5)
|
|
66
|
+
mini_portile2 (~> 2.8.2)
|
|
67
67
|
racc (~> 1.4)
|
|
68
68
|
oauth2 (1.4.11)
|
|
69
69
|
faraday (>= 0.17.3, < 3.0)
|
|
@@ -71,35 +71,35 @@ GEM
|
|
|
71
71
|
multi_json (~> 1.3)
|
|
72
72
|
multi_xml (~> 0.5)
|
|
73
73
|
rack (>= 1.2, < 4)
|
|
74
|
-
psych (
|
|
74
|
+
psych (5.1.1.1)
|
|
75
75
|
stringio
|
|
76
|
-
public_suffix (
|
|
77
|
-
racc (1.
|
|
78
|
-
rack (3.0.
|
|
76
|
+
public_suffix (5.0.4)
|
|
77
|
+
racc (1.7.3)
|
|
78
|
+
rack (3.0.8)
|
|
79
79
|
rainbow (3.1.1)
|
|
80
|
-
rake (13.0
|
|
80
|
+
rake (13.1.0)
|
|
81
81
|
rchardet (1.8.0)
|
|
82
|
-
rdoc (6.
|
|
82
|
+
rdoc (6.6.0)
|
|
83
83
|
psych (>= 4.0.0)
|
|
84
84
|
rspec (3.12.0)
|
|
85
85
|
rspec-core (~> 3.12.0)
|
|
86
86
|
rspec-expectations (~> 3.12.0)
|
|
87
87
|
rspec-mocks (~> 3.12.0)
|
|
88
|
-
rspec-core (3.12.
|
|
88
|
+
rspec-core (3.12.2)
|
|
89
89
|
rspec-support (~> 3.12.0)
|
|
90
|
-
rspec-expectations (3.12.
|
|
90
|
+
rspec-expectations (3.12.3)
|
|
91
91
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
92
92
|
rspec-support (~> 3.12.0)
|
|
93
93
|
rspec-its (1.3.0)
|
|
94
94
|
rspec-core (>= 3.0.0)
|
|
95
95
|
rspec-expectations (>= 3.0.0)
|
|
96
|
-
rspec-mocks (3.12.
|
|
96
|
+
rspec-mocks (3.12.6)
|
|
97
97
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
98
98
|
rspec-support (~> 3.12.0)
|
|
99
|
-
rspec-support (3.12.
|
|
99
|
+
rspec-support (3.12.1)
|
|
100
100
|
ruby2_keywords (0.0.5)
|
|
101
101
|
semver2 (3.4.2)
|
|
102
|
-
stringio (3.0
|
|
102
|
+
stringio (3.1.0)
|
|
103
103
|
thread_safe (0.3.6)
|
|
104
104
|
zhexdump (0.0.2)
|
|
105
105
|
|
data/README.md
CHANGED
|
@@ -4,6 +4,7 @@ pedump [ not available on windows
|
|
7
8
|
2021.02.18 - updated gems; changed open-uri to URI.open; enabled SSL on https://pedump.me/
|
|
8
9
|
2020.08.09 - CLI: added resource extracting with --extract ID
|
|
9
10
|
2020.07.28 - 0.6.1; better RICH HDR parsing/output
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.6.
|
|
1
|
+
0.6.7
|
data/lib/pedump/cli.rb
CHANGED
|
@@ -864,7 +864,7 @@ class PEdump::CLI
|
|
|
864
864
|
exit(1)
|
|
865
865
|
end
|
|
866
866
|
if entry.size != 0
|
|
867
|
-
|
|
867
|
+
_copy_stream @pedump.io, $stdout, entry.size, @pedump.va2file(entry.va)
|
|
868
868
|
end
|
|
869
869
|
end
|
|
870
870
|
|
|
@@ -887,7 +887,7 @@ class PEdump::CLI
|
|
|
887
887
|
@pedump.logger.fatal "[!] resource #{id.inspect} not found"
|
|
888
888
|
exit(1)
|
|
889
889
|
end
|
|
890
|
-
|
|
890
|
+
_copy_stream @pedump.io, $stdout, res.size, res.file_offset
|
|
891
891
|
end
|
|
892
892
|
|
|
893
893
|
def extract_section id
|
|
@@ -911,7 +911,31 @@ class PEdump::CLI
|
|
|
911
911
|
@pedump.logger.fatal "[!] section #{id.inspect} not found"
|
|
912
912
|
exit(1)
|
|
913
913
|
end
|
|
914
|
-
|
|
914
|
+
_copy_stream @pedump.io, $stdout, section.SizeOfRawData, section.PointerToRawData
|
|
915
|
+
end
|
|
916
|
+
|
|
917
|
+
private
|
|
918
|
+
|
|
919
|
+
# https://github.com/zed-0xff/pedump/issues/44
|
|
920
|
+
# https://redmine.ruby-lang.org/issues/12280
|
|
921
|
+
def _copy_stream(src, dst, src_length = nil, src_offset = 0)
|
|
922
|
+
IO::copy_stream(src, dst, src_length, src_offset)
|
|
923
|
+
rescue NotImplementedError # `copy_stream': pread() not implemented (NotImplementedError)
|
|
924
|
+
src_length ||= src.size - src_offset
|
|
925
|
+
bufsize = 16384
|
|
926
|
+
buf = ("\x00".force_encoding('binary')) * bufsize
|
|
927
|
+
src.binmode
|
|
928
|
+
dst.binmode
|
|
929
|
+
saved_pos = src.tell
|
|
930
|
+
src.seek(src_offset)
|
|
931
|
+
bytes_copied = 0
|
|
932
|
+
while src_length > 0 && buf.size != 0
|
|
933
|
+
src.read([bufsize, src_length].min, buf)
|
|
934
|
+
dst.write(buf)
|
|
935
|
+
src_length -= buf.size
|
|
936
|
+
bytes_copied += buf.size
|
|
937
|
+
end
|
|
938
|
+
src.seek(saved_pos)
|
|
939
|
+
bytes_copied
|
|
915
940
|
end
|
|
916
|
-
|
|
917
941
|
end # class PEdump::CLI
|
data/pedump.gemspec
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: pedump 0.6.
|
|
5
|
+
# stub: pedump 0.6.7 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "pedump".freeze
|
|
9
|
-
s.version = "0.6.
|
|
9
|
+
s.version = "0.6.7"
|
|
10
10
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
12
12
|
s.require_paths = ["lib".freeze]
|
|
13
13
|
s.authors = ["Andrey \"Zed\" Zaikin".freeze]
|
|
14
|
-
s.date = "2023-04
|
|
14
|
+
s.date = "2023-12-04"
|
|
15
15
|
s.description = "dump headers, sections, extract resources of win32 PE exe,dll,etc".freeze
|
|
16
16
|
s.email = "zed.0xff@gmail.com".freeze
|
|
17
17
|
s.executables = ["pedump".freeze]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pedump
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrey "Zed" Zaikin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-04
|
|
11
|
+
date: 2023-12-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rainbow
|