pwn 0.4.907 → 0.4.908
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/README.md +2 -2
- data/bin/pwn_www_checkip +15 -10
- data/lib/pwn/plugins/ip_info.rb +1 -1
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3e63eb5c8a0f8b7b01519e0beff8d9e00b0d79b2b95d9e0c3b09bfb64e43714c
|
|
4
|
+
data.tar.gz: d04c5a1dfbbce051e64a78d1bf7231d27e76b2360b802fb1f7da24b56224fa61
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d7a34cb20ada0617c270dff08d9f0f419acb456e61b30c3b2b6da7aa8176b451578271f5268e757099df3316b32517b7b4898cc55e3035e6d07a921bd358a368
|
|
7
|
+
data.tar.gz: 5617cc8139c7906d897a72a838e8b87499765ebddcc4987e6990618c006fffc559d0b88253ea81002a6a87e7f9e8b201b77b47f3a84bca91e9626034fe4cd1bc
|
data/README.md
CHANGED
|
@@ -37,7 +37,7 @@ $ rvm use ruby-3.2.2@pwn
|
|
|
37
37
|
$ rvm list gemsets
|
|
38
38
|
$ gem install --verbose pwn
|
|
39
39
|
$ pwn
|
|
40
|
-
pwn[v0.4.
|
|
40
|
+
pwn[v0.4.908]:001 >>> PWN.help
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.2.2@pwn
|
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
|
53
53
|
$ gem install --verbose pwn
|
|
54
54
|
$ pwn
|
|
55
|
-
pwn[v0.4.
|
|
55
|
+
pwn[v0.4.908]:001 >>> PWN.help
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
|
data/bin/pwn_www_checkip
CHANGED
|
@@ -10,18 +10,22 @@ OptionParser.new do |options|
|
|
|
10
10
|
options.banner = "USAGE:
|
|
11
11
|
#{$PROGRAM_NAME} [opts]
|
|
12
12
|
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
opts[:proxy] = p
|
|
13
|
+
options.on('-tIP_HOST', '--target=IP_HOST', '<Optional - IP or Host to Check (Default - Your Public IP)>') do |t|
|
|
14
|
+
opts[:target] = t
|
|
16
15
|
end
|
|
17
16
|
|
|
18
17
|
options.on('-i', '--[no-]ipinfo', '<Optional - Return Details about Public IP Returned from CheckIP>') do |i|
|
|
19
18
|
opts[:ipinfo] = i
|
|
20
19
|
end
|
|
20
|
+
|
|
21
|
+
options.on('-pPROXY', '--proxy=PROXY', '<Optional - HTTP or Socks Proxy || tor>') do |p|
|
|
22
|
+
opts[:proxy] = p
|
|
23
|
+
end
|
|
21
24
|
end.parse!
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
target = opts[:target]
|
|
24
27
|
ipinfo = opts[:ipinfo]
|
|
28
|
+
proxy = opts[:proxy].to_s.scrub.strip.chomp unless opts[:proxy].nil?
|
|
25
29
|
|
|
26
30
|
begin
|
|
27
31
|
if proxy
|
|
@@ -34,24 +38,25 @@ begin
|
|
|
34
38
|
end
|
|
35
39
|
browser = browser_obj[:browser]::Request
|
|
36
40
|
|
|
37
|
-
if proxy
|
|
38
|
-
|
|
41
|
+
if proxy && opts[:target].nil?
|
|
42
|
+
target = browser.execute(
|
|
39
43
|
method: :get,
|
|
40
44
|
url: 'https://checkip.amazonaws.com',
|
|
41
45
|
verify_ssl: false
|
|
42
46
|
).to_s.chomp
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
elsif opts[:target].nil?
|
|
48
|
+
target = browser.execute(
|
|
45
49
|
method: :get,
|
|
46
50
|
url: 'https://checkip.amazonaws.com'
|
|
47
51
|
).to_s.chomp
|
|
48
52
|
end
|
|
49
53
|
|
|
50
|
-
puts "
|
|
54
|
+
puts "[ { \"public_ip\": \"#{target}\" } ]" if ipinfo.nil? && opts[:target].nil?
|
|
51
55
|
|
|
56
|
+
ipinfo = true if ipinfo.nil? && opts[:target]
|
|
52
57
|
if ipinfo
|
|
53
58
|
ip_info_obj = PWN::Plugins::IPInfo.get(
|
|
54
|
-
target:
|
|
59
|
+
target: target,
|
|
55
60
|
proxy: proxy
|
|
56
61
|
)
|
|
57
62
|
puts JSON.pretty_generate(ip_info_obj)
|
data/lib/pwn/plugins/ip_info.rb
CHANGED
|
@@ -107,7 +107,7 @@ module PWN
|
|
|
107
107
|
ip_resp[:cert_issuer] = cert_obj.issuer.to_s
|
|
108
108
|
ip_resp[:cert_serial] = cert_obj.serial.to_s
|
|
109
109
|
ip_resp[:crl_uris] = cert_obj.crl_uris.to_s
|
|
110
|
-
ip_resp[:extensions] = cert_obj.extensions.map
|
|
110
|
+
ip_resp[:extensions] = cert_obj.extensions.map&.to_s
|
|
111
111
|
ip_resp[:not_before] = cert_obj.not_before.to_s
|
|
112
112
|
ip_resp[:not_after] = cert_obj.not_after.to_s
|
|
113
113
|
ip_resp[:oscsp_uris] = cert_obj.ocsp_uris.to_s
|
data/lib/pwn/version.rb
CHANGED