pwn 0.4.473 → 0.4.476
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 +24 -22
- 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: 8ef8af0c110613df805e43c7194ba3c2583c7e18b1d6c0a214f693a3d8b5d8f8
|
4
|
+
data.tar.gz: 646b090115b4f9180d26f14222d1fea8ad57b31b083e38ae71ffeaa44aa62273
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cab4b7f4c5a4e4c1b03a4f2d79ab502a9a4472589631485b3022ef59396d75b143f4c58b9e82a78f508f00cabe4108f218edc95483f67ae992f31f3965d5d4e5
|
7
|
+
data.tar.gz: 2fc157515f103b9869314c6fead5d88c5de7464e472ef2555e29d97f38558f0c2962ec4ac7166e7d8654e2be75bdbf85e08ee3d09f18e4c186c6c96959b8c51a
|
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.476]: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.476]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
data/bin/pwn_shodan_search
CHANGED
@@ -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)
|
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.to_json)
|
75
77
|
rescue SystemExit, Interrupt
|
76
78
|
puts "\nGoodbye."
|
77
79
|
end
|
data/lib/pwn/version.rb
CHANGED