pwn 0.4.472 → 0.4.475
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/pwn_shodan_search +25 -23
- data/lib/pwn/version.rb +1 -1
- 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: 73e46f9f5d11b3a1678cc2b01ff31932ab1086a6bb950f4401c5b60f4379a018
|
4
|
+
data.tar.gz: a4a54c020973d8b83e8692193ad5e3fcc3f0500dc8cf5967d10eaddcbfdc221a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65c2271c0947f84645a6d25f981aa40cb5243bc56387fd9694925911c281745d51e264de03638003d745335a80a4e73212ad4e448115915b71a2c6a707cf63e5
|
7
|
+
data.tar.gz: 33fda34f85dc4e1155d527452f6d7dec225ce85cd81018ece1fb7a7496236cde8bcacfe32ea1c1f6ade513c3aef0df9569be146621049be6fb3c50ef0230e078
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.1.2@pwn
|
|
37
37
|
$ rvm list gemsets
|
38
38
|
$ gem install --verbose pwn
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.4.
|
40
|
+
pwn[v0.4.475]: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.1.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.475]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
data/bin/pwn_shodan_search
CHANGED
@@ -12,7 +12,7 @@ OptionParser.new do |options|
|
|
12
12
|
#{$PROGRAM_NAME} [opts]
|
13
13
|
"
|
14
14
|
|
15
|
-
options.on('-
|
15
|
+
options.on('-cYAML', '--config-yaml=YAML', '<Required - YAML config containing api_key from Shodan.io>') do |y|
|
16
16
|
opts[:yaml] = y
|
17
17
|
end
|
18
18
|
|
@@ -45,33 +45,35 @@ begin
|
|
45
45
|
|
46
46
|
timestamp = Time.now.strftime('%Y-%m-%d.%H:%M:%S')
|
47
47
|
query_results_file = opts[:output_results_file]
|
48
|
-
query_results_file ||= "/tmp/shodan-results-#{timestamp}
|
49
|
-
query_results_dir = File.dirname(query_results_file)
|
48
|
+
query_results_file ||= "/tmp/shodan-results-#{timestamp}"
|
50
49
|
|
51
|
-
raw_query_results_file = "#{
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
puts " >>> Matches: #{search_results[:total]}"
|
64
|
-
r.puts search_results.to_json
|
50
|
+
raw_query_results_file = "#{query_results_file}-RAW.json"
|
51
|
+
raw_results_arr = []
|
52
|
+
File.open(query_results_file, 'w') do |f|
|
53
|
+
queries.each do |query_line|
|
54
|
+
query = query_line.chomp
|
55
|
+
print "QUERY: '#{query}'"
|
56
|
+
f.puts("QUERY: '#{query}'")
|
57
|
+
search_results = PWN::Plugins::Shodan.search(
|
58
|
+
api_key: api_key,
|
59
|
+
query: query
|
60
|
+
)
|
61
|
+
puts " >>> Matches: #{search_results[:total]}"
|
65
62
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
63
|
+
raw_results = {}
|
64
|
+
raw_results[:query] = query
|
65
|
+
raw_results[:results] = search_results
|
66
|
+
raw_results_arr.push(raw_results.to_json)
|
67
|
+
|
68
|
+
search_results[:matches].select do |m|
|
69
|
+
f.puts "ORG: #{m[:org]} | PUBIP: #{m[:ip_str]} #{'*' * 36}"
|
70
|
+
f.puts "Product: #{m[:product]}"
|
71
|
+
f.puts "TCP Port: #{m[:port]}"
|
72
|
+
f.puts "Data: #{m[:data]}\n\n\n"
|
72
73
|
end
|
73
74
|
end
|
74
75
|
end
|
76
|
+
File.write(raw_query_results_file, raw_results_arr)
|
75
77
|
rescue SystemExit, Interrupt
|
76
78
|
puts "\nGoodbye."
|
77
79
|
end
|
data/lib/pwn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.475
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|