pwn 0.5.447 → 0.5.448

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9a181923fbe82cb42f983b6297b0f16898ab64bf5189f1a0a5f727bb507f0be
4
- data.tar.gz: ef102ca4eaf9af0c1a454f9a94dba4bcd25b8f5cf7f9e810c2f7877a84c39864
3
+ metadata.gz: 7c72e75c5db7f435844adfc184bf70aab0c85fe1c2a9e50e794c74ea6fa115e9
4
+ data.tar.gz: d5975feca9155c578de4745961abcc959b8986c225f9d10e193488d13c6b90ad
5
5
  SHA512:
6
- metadata.gz: 8fdbadc32ceaa6384430f75ceeb9c5ada8e8fea9e0be1ce2ecbc4defaeaba5d471a921333ec8d68383d6c36db275cf00e5051aed090c4d24320046cccbae7f35
7
- data.tar.gz: 03bd251fb01de1e509d6a638060fdd57e03d781ef0430e7cf077c90a6e734045460661a49a308677ee19dfebc28b93321925a605c1bc241858f2f54891b0dab9
6
+ metadata.gz: 22fca032a697591de30a5b98a4466181ac0ce4e3a6d90421f351a25019c2d5bd50888431adb04baccfcf3d97fb3483daaa3c40bb9c5fc9f67df9b2c9c87dff2f
7
+ data.tar.gz: 92b82824e9e1421e265e01553cd43a142f46ce3770dae6d1e7ffe71f456024d0c08506b5e8143bcf830567f245b353828c77857bc7a6596e9a69404ee5d833d2
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
37
37
  $ ./install.sh
38
38
  $ ./install.sh ruby-gem
39
39
  $ pwn
40
- pwn[v0.5.447]:001 >>> PWN.help
40
+ pwn[v0.5.448]:001 >>> PWN.help
41
41
  ```
42
42
 
43
43
  [![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
@@ -52,7 +52,7 @@ $ rvm use ruby-3.4.4@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.447]:001 >>> PWN.help
55
+ pwn[v0.5.448]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
  If you're using a multi-user install of RVM do:
@@ -62,7 +62,7 @@ $ rvm use ruby-3.4.4@pwn
62
62
  $ rvmsudo gem uninstall --all --executables pwn
63
63
  $ rvmsudo gem install --verbose pwn
64
64
  $ pwn
65
- pwn[v0.5.447]:001 >>> PWN.help
65
+ pwn[v0.5.448]:001 >>> PWN.help
66
66
  ```
67
67
 
68
68
  PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
@@ -187,12 +187,14 @@ module PWN
187
187
 
188
188
  # Supported Method Parameters::
189
189
  # PWN::Blockchain::BTC.get_block_details(
190
- # height: 'required - block height as an integer (0 for genesis block)'
190
+ # height: 'required - block height as an integer (0 for genesis block / Defaults to latest block)'
191
191
  # )
192
+
192
193
  public_class_method def self.get_block_details(opts = {})
193
- height = opts[:height] ||= 0
194
+ latest_block = get_latest_block[:result][:blocks]
195
+ height = opts[:height] ||= latest_block
194
196
 
195
- raise 'ERROR: height must be >= 0' if height.negative?
197
+ raise "ERROR: height must be >= 0 && <= #{latest_block}" if height.negative? || height > latest_block
196
198
 
197
199
  hash_res = btc_rpc_call(method: 'getblockhash', params: [height])
198
200
  block_hash = hash_res[:result]
@@ -254,7 +256,7 @@ module PWN
254
256
  latest_block = #{self}.get_latest_block
255
257
 
256
258
  block_details = #{self}.get_block_details(
257
- height: 'required - block height as an integer (0 for genesis block)'
259
+ height: 'required - block height as an integer (0 for genesis block / Defaults to latest block)'
258
260
  )
259
261
 
260
262
  transactions = #{self}.get_transactions(
data/lib/pwn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.5.447'
4
+ VERSION = '0.5.448'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.447
4
+ version: 0.5.448
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.