pwn 0.5.156 → 0.5.157

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: 47f160c73c391cf48bd0a847d0031d342ef79b77575e86872153105905072141
4
- data.tar.gz: 7c71dc97fd8e8e4e99584ab8bbb97363d46a2edd6786f2bb8e4ee9bd7c0b16cb
3
+ metadata.gz: 6fa5c25714856b9ee7de2118ac2da2e6f27380bcbae0e82d448774e6ad260329
4
+ data.tar.gz: 841310123fcb027c750b7d94b67851c9b9420ea7f79b3ccfc240347280fb4a04
5
5
  SHA512:
6
- metadata.gz: 55c9643d11b525ef375396f51354e2356363567de4ca1b9e0d9ea9281ff2af58698bd819a38f1e8b0c7212b03012403257c5e4622ae16e7ee018a36e1d66c7e1
7
- data.tar.gz: c67b6fe7fbf5966d2630c4a0e99f254e58e6b09a6b15cad13a79897f9ab42c0f2efb7147547c70b4663e0f830af672d72859abc50e64e54b51ad999c4a33220b
6
+ metadata.gz: 4bfcbdcdd0b987a3f8ac1bb90b4f6a687584d1c1269931aca7027cfe542349088416452069f9882c6c2d3287f12ea88f3bbd34d3f2c3c1623ed74a7619adb0f7
7
+ data.tar.gz: 017f565735be76fb7a1f9e28bcef3be061b2700da2333df5f92162d268db9f224468672814135302f52bcdf2618efcb8a11054b4d3da7f421da8314b1fc4e4cd
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.156]:001 >>> PWN.help
40
+ pwn[v0.5.157]: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.3.1@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.156]:001 >>> PWN.help
55
+ pwn[v0.5.157]: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.3.1@pwn
62
62
  $ rvmsudo gem uninstall --all --executables pwn
63
63
  $ rvmsudo gem install --verbose pwn
64
64
  $ pwn
65
- pwn[v0.5.156]:001 >>> PWN.help
65
+ pwn[v0.5.157]: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:
@@ -79,9 +79,9 @@ module PWN
79
79
  skip_api = opts[:skip_api] ||= false
80
80
 
81
81
  ip_info_resp = []
82
- ip_resp_hash = {}
83
82
  is_ip = IPAddress.valid?(target)
84
83
  hostname = '' if is_ip
84
+ target_arr = [target] if is_ip
85
85
 
86
86
  unless is_ip
87
87
  begin
@@ -89,24 +89,27 @@ module PWN
89
89
  dns_server = opts[:dns_server]
90
90
  dns_resolver = Resolv::DNS.new(nameserver: [dns_server]) if dns_server
91
91
  dns_resolver ||= Resolv::DNS.new
92
- target = dns_resolver.getaddress(target).to_s
92
+ target_arr = dns_resolver.getaddresses(target).map(&:to_s).uniq
93
93
  rescue Resolv::ResolvError
94
- target = nil
94
+ target_arr = nil
95
95
  end
96
96
  end
97
97
 
98
- ip_resp_hash = ip_info_rest_call(ip: target, proxy: proxy) unless skip_api
99
- is_rfc1918 = check_rfc1918(ip: target)
100
- ip_resp_hash[:ip] = target
101
- ip_resp_hash[:is_rfc1918] = is_rfc1918
102
- ip_resp_hash[:hostname] = hostname
98
+ target_arr.each do |this_target|
99
+ ip_resp_hash = ip_info_rest_call(ip: this_target, proxy: proxy) unless skip_api
100
+ ip_resp_hash ||= {}
101
+ is_rfc1918 = check_rfc1918(ip: this_target)
102
+ ip_resp_hash[:ip] = this_target
103
+ ip_resp_hash[:is_rfc1918] = is_rfc1918
104
+ ip_resp_hash[:hostname] = hostname
103
105
 
104
- ip_info_resp.push(ip_resp_hash) unless target.nil?
106
+ ip_info_resp.push(ip_resp_hash) unless target_arr.nil?
107
+
108
+ next unless proxy.nil?
105
109
 
106
- if proxy.nil?
107
110
  ip_info_resp.each do |ip_resp|
108
111
  tls_port_avail = PWN::Plugins::Sock.check_port_in_use(
109
- server_ip: target,
112
+ server_ip: this_target,
110
113
  port: tls_port
111
114
  )
112
115
 
@@ -126,7 +129,7 @@ module PWN
126
129
  next unless tls_port_avail
127
130
 
128
131
  cert_obj = PWN::Plugins::Sock.get_tls_cert(
129
- target: target,
132
+ target: this_target,
130
133
  port: tls_port
131
134
  )
132
135
 
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.156'
4
+ VERSION = '0.5.157'
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.156
4
+ version: 0.5.157
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.