pwn 0.4.474 → 0.4.475

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: 9ff179fc1eb5aa54b6c3546f5de3cc523044c53895dc2736b1207b6998068711
4
- data.tar.gz: 6c56807bd01715adb522f82cb209bb7edac4856a6b73f22fe25a09cf0e9cf7c3
3
+ metadata.gz: 73e46f9f5d11b3a1678cc2b01ff31932ab1086a6bb950f4401c5b60f4379a018
4
+ data.tar.gz: a4a54c020973d8b83e8692193ad5e3fcc3f0500dc8cf5967d10eaddcbfdc221a
5
5
  SHA512:
6
- metadata.gz: 18cb621068a698d6f43701137a298bb375df0b660a0a458a4a46e545ef9c1eaa587b574e4a8b38cb5ab51a63c98a0f9ba3e12d2781108af37c298c84673a2362
7
- data.tar.gz: f679e8a261b1e8720cd064949c5c9d0a1d2e2f013bbaa54fa28f10729ca4e4d949895cec68d0d0e143bf4fec5fd0efa0cacf69ecc2104fa990b47faa36473686
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.474]:001 >>> PWN.help
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.474]:001 >>> PWN.help
55
+ pwn[v0.4.475]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -48,32 +48,32 @@ begin
48
48
  query_results_file ||= "/tmp/shodan-results-#{timestamp}"
49
49
 
50
50
  raw_query_results_file = "#{query_results_file}-RAW.json"
51
- File.open(raw_query_results_file, 'w') do |r|
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]}"
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]}"
62
62
 
63
- raw_results = {}
64
- raw_results[:query] = query
65
- raw_results[:results] = search_results
66
- r.puts raw_results.to_json
63
+ raw_results = {}
64
+ raw_results[:query] = query
65
+ raw_results[:results] = search_results
66
+ raw_results_arr.push(raw_results.to_json)
67
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"
73
- end
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"
74
73
  end
75
74
  end
76
75
  end
76
+ File.write(raw_query_results_file, raw_results_arr)
77
77
  rescue SystemExit, Interrupt
78
78
  puts "\nGoodbye."
79
79
  end
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.4.474'
4
+ VERSION = '0.4.475'
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.4.474
4
+ version: 0.4.475
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.