pwn 0.4.467 → 0.4.470

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: 6c3c8162a975f70b29fef9ca0c1e9e3089bc625345dfd2a3183c8925bacd96cf
4
- data.tar.gz: 874976297d57b765cbe21b6c582f6a51c77bf1a1bd758376bfe33820eb6b5b0d
3
+ metadata.gz: 3ad8e01c4030cf4c3f607f364a80ace5949dac4b7062bcda6db3f11ba6d513cb
4
+ data.tar.gz: 205350cec3feb50fda19fc04722a557ad13265b292ad7452eecb57302c723937
5
5
  SHA512:
6
- metadata.gz: efaae24fa8eabb639a90c7ce675aedc5323fcf91ba2aebf24f2f84243c00b67422a92ee4aeafd7260d9ff4515069c187c01903ad3221e623dbf139874daa1831
7
- data.tar.gz: e7905ef924e48fc92d589cd3dbe1bfcab64c89ef8585edc1f239423588b1a1ec20672171ec23ddeea2adacecff66cf00017a3fd7f2a09c1c5ca0dcc901c5bb12
6
+ metadata.gz: 4af78e112eb864b091a9031f59a5aa65136983eeb89ca2e9da27b44012ca75f49ec428440e7757886fdae13d8c589d4f211903e0ebeddd1fbc036aaf1c34ba6c
7
+ data.tar.gz: f14b392ac1d3bd5eea6824bb6da94b5888b4fae3b0d60d1206feeb4d7b49a5dba68106b3d846da42e620209de36e6361f088ab7f75e44cef74983edefbed815d
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.467]:001 >>> PWN.help
40
+ pwn[v0.4.470]: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.467]:001 >>> PWN.help
55
+ pwn[v0.4.470]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -101,7 +101,7 @@ begin
101
101
  unless menu_msg.include?('ERROR')
102
102
  exec_resp = PWN::Plugins::MSR206.exec(
103
103
  msr206_obj: msr206_obj,
104
- cmd: :yellow_on
104
+ cmd: :green_flash
105
105
  )
106
106
  end
107
107
 
@@ -154,16 +154,40 @@ begin
154
154
  msr206_obj: msr206_obj,
155
155
  type: :arm_to_read
156
156
  )
157
+
157
158
  file = ''
159
+ backup_msg = ''
158
160
  loop do
161
+ if backup_msg.empty?
162
+ exec_resp = PWN::Plugins::MSR206.exec(
163
+ msr206_obj: msr206_obj,
164
+ cmd: :green_flash
165
+ )
166
+ end
167
+
159
168
  print 'Enter File Name to Save Backup: '
160
169
  file = gets.scrub.chomp.strip
161
170
  file_dir = File.dirname(file)
162
171
  break if Dir.exist?(file_dir)
163
172
 
164
- puts "\nDirectory #{file_dir} for #{file} does not exist."
173
+ backup_msg = "\n****** ERROR: Directory #{file_dir} for #{file} does not exist ******"
174
+ puts backup_msg
175
+ exec_resp = PWN::Plugins::MSR206.exec(
176
+ msr206_obj: msr206_obj,
177
+ cmd: :green_off
178
+ )
179
+ exec_resp = PWN::Plugins::MSR206.exec(
180
+ msr206_obj: msr206_obj,
181
+ cmd: :yellow_flash
182
+ )
165
183
  end
184
+
166
185
  File.write(file, "#{track_data.to_json}\n")
186
+ exec_resp = PWN::Plugins::MSR206.exec(
187
+ msr206_obj: msr206_obj,
188
+ cmd: :yellow_off
189
+ )
190
+
167
191
  puts 'complete.'
168
192
  when :W
169
193
  exec_resp = PWN::Plugins::MSR206.exec(
@@ -177,12 +201,12 @@ begin
177
201
  menu_msg = '****** ERROR: Invalid Menu Option Selected ******'
178
202
  exec_resp = PWN::Plugins::MSR206.exec(
179
203
  msr206_obj: msr206_obj,
180
- cmd: :yellow_off
204
+ cmd: :green_off
181
205
  )
182
206
 
183
207
  exec_resp = PWN::Plugins::MSR206.exec(
184
208
  msr206_obj: msr206_obj,
185
- cmd: :red_flash
209
+ cmd: :yellow_flash
186
210
  )
187
211
  end
188
212
  end
@@ -90,7 +90,7 @@ module PWN
90
90
  rest_call: "shodan/host/#{target_ip}",
91
91
  params: params
92
92
  )
93
- services_by_ips.push(JSON.parse(response))
93
+ services_by_ips.push(JSON.parse(response, symbolize_names: true))
94
94
  rescue StandardError => e
95
95
  services_by_ips.push(error: e.message)
96
96
  next
@@ -131,7 +131,7 @@ module PWN
131
131
  rest_call: 'shodan/host/count',
132
132
  params: params
133
133
  )
134
- JSON.parse(response)
134
+ JSON.parse(response, symbolize_names: true)
135
135
  rescue StandardError => e
136
136
  raise e
137
137
  end
@@ -166,7 +166,7 @@ module PWN
166
166
  rest_call: 'shodan/host/search',
167
167
  params: params
168
168
  )
169
- JSON.parse(response)
169
+ JSON.parse(response, symbolize_names: true)
170
170
  rescue StandardError => e
171
171
  raise e
172
172
  end
@@ -191,7 +191,7 @@ module PWN
191
191
  rest_call: 'shodan/host/search/tokens',
192
192
  params: params
193
193
  )
194
- JSON.parse(response)
194
+ JSON.parse(response, symbolize_names: true)
195
195
  rescue StandardError => e
196
196
  raise e
197
197
  end
@@ -210,7 +210,7 @@ module PWN
210
210
  rest_call: 'shodan/ports',
211
211
  params: params
212
212
  )
213
- JSON.parse(response)
213
+ JSON.parse(response, symbolize_names: true)
214
214
  rescue StandardError => e
215
215
  raise e
216
216
  end
@@ -229,7 +229,7 @@ module PWN
229
229
  rest_call: 'shodan/protocols',
230
230
  params: params
231
231
  )
232
- JSON.parse(response)
232
+ JSON.parse(response, symbolize_names: true)
233
233
  rescue StandardError => e
234
234
  raise e
235
235
  end
@@ -253,7 +253,7 @@ module PWN
253
253
  params: params,
254
254
  http_body: http_body
255
255
  )
256
- JSON.parse(response)
256
+ JSON.parse(response, symbolize_names: true)
257
257
  rescue StandardError => e
258
258
  raise e
259
259
  end
@@ -279,7 +279,7 @@ module PWN
279
279
  params: params,
280
280
  http_body: http_body
281
281
  )
282
- JSON.parse(response)
282
+ JSON.parse(response, symbolize_names: true)
283
283
  rescue StandardError => e
284
284
  raise e
285
285
  end
@@ -303,7 +303,7 @@ module PWN
303
303
  rest_call: "shodan/scan/status/#{scan_id}",
304
304
  params: params
305
305
  )
306
- JSON.parse(response)
306
+ JSON.parse(response, symbolize_names: true)
307
307
  rescue StandardError => e
308
308
  raise e
309
309
  end
@@ -322,7 +322,7 @@ module PWN
322
322
  rest_call: 'shodan/services',
323
323
  params: params
324
324
  )
325
- JSON.parse(response)
325
+ JSON.parse(response, symbolize_names: true)
326
326
  rescue StandardError => e
327
327
  raise e
328
328
  end
@@ -352,7 +352,7 @@ module PWN
352
352
  rest_call: 'shodan/query',
353
353
  params: params
354
354
  )
355
- JSON.parse(response)
355
+ JSON.parse(response, symbolize_names: true)
356
356
  rescue StandardError => e
357
357
  raise e
358
358
  end
@@ -381,7 +381,7 @@ module PWN
381
381
  rest_call: 'shodan/query/tags',
382
382
  params: params
383
383
  )
384
- JSON.parse(response)
384
+ JSON.parse(response, symbolize_names: true)
385
385
  rescue StandardError => e
386
386
  raise e
387
387
  end
@@ -400,7 +400,7 @@ module PWN
400
400
  rest_call: 'account/profile',
401
401
  params: params
402
402
  )
403
- JSON.parse(response)
403
+ JSON.parse(response, symbolize_names: true)
404
404
  rescue StandardError => e
405
405
  raise e
406
406
  end
@@ -437,7 +437,7 @@ module PWN
437
437
  rest_call: 'api-info',
438
438
  params: params
439
439
  )
440
- JSON.parse(response)
440
+ JSON.parse(response, symbolize_names: true)
441
441
  rescue StandardError => e
442
442
  raise e
443
443
  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.467'
4
+ VERSION = '0.4.470'
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.467
4
+ version: 0.4.470
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.