pedump 0.6.5 → 0.6.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b71d7b6eaaa698ef96a34c794ad6eb5624bba23e11ac6086196fc8a67c7b76e
4
- data.tar.gz: e921bfdcee64c7bcf2dbafc677b22668818ece349241d2d5b6440b7b9ac64672
3
+ metadata.gz: 9ba70619b5754fa0d8c35a0d9d229b78074096e11438678784f7735686101c93
4
+ data.tar.gz: 37d5785c6a3c9e411c2b3fe8359f216cea26c0084b8a1bcdf2df18f745654190
5
5
  SHA512:
6
- metadata.gz: 12435e99756a92cecea097bc2be181a7a43f975042d6e6c2f29d076a990726705b286027e08b165d35df607b0ded5276efeaeab990594e350a63fe28f6f85ec5
7
- data.tar.gz: a79037b47d4f51d108131dc4205f35748ed54465641182582231d382326bc0fd2d4dc6548ea385fafa9afe58cf63df1582512a6c252afc8712a43c780c53f6a4
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.0)
5
- public_suffix (>= 2.0.2, < 5.0)
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.9.3)
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,15 @@ 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.3)
28
- multipart-post (>= 1.2, < 3)
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.10.2)
34
+ git (1.18.0)
35
+ addressable (~> 2.8)
35
36
  rchardet (~> 1.8)
36
37
  github_api (0.19.0)
37
38
  addressable (~> 2.4)
@@ -40,8 +41,8 @@ GEM
40
41
  hashie (~> 3.5, >= 3.5.2)
41
42
  oauth2 (~> 1.0)
42
43
  hashie (3.6.0)
43
- highline (2.0.3)
44
- iostruct (0.0.4)
44
+ highline (2.1.0)
45
+ iostruct (0.0.5)
45
46
  juwelier (2.4.9)
46
47
  builder
47
48
  bundler
@@ -54,51 +55,51 @@ GEM
54
55
  rake
55
56
  rdoc
56
57
  semver2
57
- jwt (2.3.0)
58
+ jwt (2.7.1)
58
59
  kamelcase (0.0.2)
59
60
  semver2 (~> 3)
60
- mini_portile2 (2.8.0)
61
+ mini_portile2 (2.8.5)
61
62
  multi_json (1.15.0)
62
63
  multi_xml (0.6.0)
63
- multipart-post (2.1.1)
64
- nokogiri (1.13.3)
65
- mini_portile2 (~> 2.8.0)
64
+ multipart-post (2.3.0)
65
+ nokogiri (1.15.5)
66
+ mini_portile2 (~> 2.8.2)
66
67
  racc (~> 1.4)
67
- oauth2 (1.4.7)
68
- faraday (>= 0.8, < 2.0)
68
+ oauth2 (1.4.11)
69
+ faraday (>= 0.17.3, < 3.0)
69
70
  jwt (>= 1.0, < 3.0)
70
71
  multi_json (~> 1.3)
71
72
  multi_xml (~> 0.5)
72
- rack (>= 1.2, < 3)
73
- psych (4.0.3)
73
+ rack (>= 1.2, < 4)
74
+ psych (5.1.1.1)
74
75
  stringio
75
- public_suffix (4.0.6)
76
- racc (1.6.0)
77
- rack (2.2.3)
76
+ public_suffix (5.0.4)
77
+ racc (1.7.3)
78
+ rack (3.0.8)
78
79
  rainbow (3.1.1)
79
- rake (13.0.6)
80
+ rake (13.1.0)
80
81
  rchardet (1.8.0)
81
- rdoc (6.4.0)
82
+ rdoc (6.6.0)
82
83
  psych (>= 4.0.0)
83
- rspec (3.11.0)
84
- rspec-core (~> 3.11.0)
85
- rspec-expectations (~> 3.11.0)
86
- rspec-mocks (~> 3.11.0)
87
- rspec-core (3.11.0)
88
- rspec-support (~> 3.11.0)
89
- rspec-expectations (3.11.0)
84
+ rspec (3.12.0)
85
+ rspec-core (~> 3.12.0)
86
+ rspec-expectations (~> 3.12.0)
87
+ rspec-mocks (~> 3.12.0)
88
+ rspec-core (3.12.2)
89
+ rspec-support (~> 3.12.0)
90
+ rspec-expectations (3.12.3)
90
91
  diff-lcs (>= 1.2.0, < 2.0)
91
- rspec-support (~> 3.11.0)
92
+ rspec-support (~> 3.12.0)
92
93
  rspec-its (1.3.0)
93
94
  rspec-core (>= 3.0.0)
94
95
  rspec-expectations (>= 3.0.0)
95
- rspec-mocks (3.11.0)
96
+ rspec-mocks (3.12.6)
96
97
  diff-lcs (>= 1.2.0, < 2.0)
97
- rspec-support (~> 3.11.0)
98
- rspec-support (3.11.0)
98
+ rspec-support (~> 3.12.0)
99
+ rspec-support (3.12.1)
99
100
  ruby2_keywords (0.0.5)
100
101
  semver2 (3.4.2)
101
- stringio (3.0.1)
102
+ stringio (3.1.0)
102
103
  thread_safe (0.3.6)
103
104
  zhexdump (0.0.2)
104
105
 
data/README.md CHANGED
@@ -4,6 +4,7 @@ pedump [![Build Status](https://travis-ci.org/zed-0xff/pedump.png?branch=mast
4
4
  News
5
5
  ----
6
6
  ```
7
+ 2023.12.04 - workaround IO.pread() 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.5
1
+ 0.6.7
data/lib/pedump/cli.rb CHANGED
@@ -271,7 +271,7 @@ class PEdump::CLI
271
271
  f.rewind
272
272
 
273
273
  # upload with progress
274
- post_url = URI.parse(URL_BASE+'/')
274
+ post_url = URI.parse(URL_BASE+'/upload')
275
275
  # UploadIO is from multipart-post
276
276
  uio = UploadIO.new(f, "application/octet-stream", File.basename(f.path))
277
277
  ppx = ProgressProxy.new(uio)
@@ -864,7 +864,7 @@ class PEdump::CLI
864
864
  exit(1)
865
865
  end
866
866
  if entry.size != 0
867
- IO::copy_stream @pedump.io, $stdout, entry.size, @pedump.va2file(entry.va)
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
- IO::copy_stream @pedump.io, $stdout, res.size, res.file_offset
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
- IO::copy_stream @pedump.io, $stdout, section.SizeOfRawData, section.PointerToRawData
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 ruby lib
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.5"
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 = "2022-03-01"
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]
@@ -68,7 +68,7 @@ Gem::Specification.new do |s|
68
68
  ]
69
69
  s.homepage = "http://github.com/zed-0xff/pedump".freeze
70
70
  s.licenses = ["MIT".freeze]
71
- s.rubygems_version = "3.2.32".freeze
71
+ s.rubygems_version = "3.3.7".freeze
72
72
  s.summary = "dump win32 PE executable files with a pure ruby".freeze
73
73
 
74
74
  if s.respond_to? :specification_version then
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.5
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: 2022-03-01 00:00:00.000000000 Z
11
+ date: 2023-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
209
  - !ruby/object:Gem::Version
210
210
  version: '0'
211
211
  requirements: []
212
- rubygems_version: 3.2.32
212
+ rubygems_version: 3.3.7
213
213
  signing_key:
214
214
  specification_version: 4
215
215
  summary: dump win32 PE executable files with a pure ruby