pwn 0.5.55 → 0.5.58

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: 49f3ecb6074cc73010b66fe20b083fd02ac50c7b5347a9f6844a9f23588cef47
4
- data.tar.gz: '08aa7ea01888cbf32f4a5156485f9cbc50887ad1a02ccd86652cbacaeaba4f1a'
3
+ metadata.gz: 0da642f1edb8037cac919389d67915e49d7278b22263df754a01bf7bc1bb3d64
4
+ data.tar.gz: 2b7a06914ea20e5bdc21cebe7dcadae532c12bed37980ced533b19d54278f7aa
5
5
  SHA512:
6
- metadata.gz: 7ff98cab3c8dffc7d331d1583d5b8d5624b9e0fda4631b3c67a5f93ba0b96de74a89b02d8b77f3879a2416398aa162c6c630477cb2a6b6215030aec967629c22
7
- data.tar.gz: a56bffc519b3db38601f673e34f12167294446b6792f63e21207eee4881b6641041c01d4021cfa73147c5aa650bdf329f42c17ced6778708d546a41aae4411bd
6
+ metadata.gz: a5b15e8a1f3ee7d85eb5fc90e0458526abb8c9c3788013687b39fa5fbb8e77c57fc6f26da3f0a05b2587e9179ce94ef5704a8ab89f126d3711ae7eb0ad47f7bb
7
+ data.tar.gz: 5f63dca98c0f3d4e78d1e38ac07d9ec4f7548b732afb96519731897206eb2d3ecde0ccd1c949046400509bd197682ee9a68e57447b884c4f82a46b859998c6f8
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
37
37
  $ ./install.sh
38
38
  $ ./install.sh ruby-gem
39
39
  $ pwn
40
- pwn[v0.5.55]:001 >>> PWN.help
40
+ pwn[v0.5.58]: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.3.0@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.55]:001 >>> PWN.help
55
+ pwn[v0.5.58]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
  If you're using a multi-user install of RVM do:
@@ -62,7 +62,7 @@ $ rvm use ruby-3.3.0@pwn
62
62
  $ rvmsudo gem uninstall --all --executables pwn
63
63
  $ rvmsudo gem install --verbose pwn
64
64
  $ pwn
65
- pwn[v0.5.55]:001 >>> PWN.help
65
+ pwn[v0.5.58]:001 >>> PWN.help
66
66
  ```
67
67
 
68
68
  PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
data/bin/pwn_gqrx_scanner CHANGED
@@ -31,7 +31,7 @@ OptionParser.new do |options|
31
31
  opts[:audio_gain_db] = a
32
32
  end
33
33
 
34
- options.on('-bHZ', '--bandwidth=HZ', '<Optional - Set Bandwidth (Defaults to 200.000)>') do |b|
34
+ options.on('-bHZ', '--bandwidth=HZ', '<Optional - Set Bandwidth 0.0 - SDR Bandwidth Limit, e.g. 20.000.000 (Defaults to 270.000)>') do |b|
35
35
  opts[:bandwidth] = b
36
36
  end
37
37
 
@@ -39,19 +39,19 @@ OptionParser.new do |options|
39
39
  opts[:demodulator_mode] = d
40
40
  end
41
41
 
42
- options.on('-PINT', '--precision=INT', '<Optional - Precision of Frequency 1-12 (Defaults to 6)>') do |p|
42
+ options.on('-PINT', '--precision=INT', '<Optional - Precision of Frequency 1-12 (Defaults to 5)>') do |p|
43
43
  opts[:precision] = p
44
44
  end
45
45
 
46
- options.on('-SFLOAT', '--strength-lock=FLOAT', '<Optional - Strength to trigger lock on frequency (Defaults to -55.0)>') do |s|
46
+ options.on('-SFLOAT', '--strength-lock=FLOAT', '<Optional - Strength to trigger lock on frequency (Defaults to -45.0)>') do |s|
47
47
  opts[:strength_lock] = s
48
48
  end
49
49
 
50
- options.on('-LFLOAT', '--lock-freq-duration=FLOAT', '<Optional - Duration to lock onto Freqency when Strength < --strength-lock value (Defaults to 5.0)>') do |l|
51
- opts[:lock_on_freq_duration] = l
50
+ options.on('-LFLOAT', '--lock-freq-duration=FLOAT', '<Optional - Duration to lock onto Freqency when Strength < --strength-lock value (Defaults to 0.5)>') do |l|
51
+ opts[:lock_freq_duration] = l
52
52
  end
53
53
 
54
- options.on('-QFLOAT', '--squelch=FLOAT', '<Optional - Squelch Threshold -65.0 to 0(Defaults to -150.0)>') do |q|
54
+ options.on('-QFLOAT', '--squelch=FLOAT', '<Optional - Squelch Threshold -150.0 to 0 (Defaults to -50.0)>') do |q|
55
55
  opts[:squelch] = q
56
56
  end
57
57
 
@@ -63,7 +63,7 @@ OptionParser.new do |options|
63
63
  opts[:intermediate_gain] = i
64
64
  end
65
65
 
66
- options.on('-BFLOAT', '--basedband-gain=FLOAT', '<Optional - Baseband Gain 0.0-62.0 (Defaults to 0.0)>') do |b|
66
+ options.on('-BFLOAT', '--basedband-gain=FLOAT', '<Optional - Baseband Gain 0.0-62.0 (Defaults to 10.0)>') do |b|
67
67
  opts[:baseband_gain] = b
68
68
  end
69
69
  end.parse!
@@ -154,7 +154,8 @@ def gqrx_cmd(opts = {})
154
154
  response = []
155
155
  got_freq = false
156
156
  # Read all responses from gqrx_sock.write
157
- timeout = 0.03 if timeout.nil?
157
+ timeout = 0.001 if timeout.nil?
158
+
158
159
  begin
159
160
  response.push(gqrx_sock.readline.chomp) while gqrx_sock.wait_readable(timeout)
160
161
  raise IOError if response.empty?
@@ -189,7 +190,7 @@ def init_freq(opts = {})
189
190
  demodulator_mode = opts[:demodulator_mode]
190
191
  bandwidth = opts[:bandwidth]
191
192
  this_freq = opts[:this_freq]
192
- lock_on_freq_duration = opts[:lock_on_freq_duration]
193
+ lock_freq_duration = opts[:lock_freq_duration]
193
194
  strength_lock = opts[:strength_lock]
194
195
 
195
196
  demod_n_passband = gqrx_cmd(
@@ -247,11 +248,12 @@ def init_freq(opts = {})
247
248
  if_gain: if_gain,
248
249
  bb_gain: bb_gain,
249
250
  strength: current_strength,
250
- strength_trigger_lock_on_freq: strength_lock
251
+ strength_trigger_lock_on_freq: strength_lock,
252
+ lock_freq_duration: lock_freq_duration
251
253
  }
252
254
  puts JSON.pretty_generate(init_freq_hash)
253
255
 
254
- sleep lock_on_freq_duration if current_strength > strength_lock
256
+ sleep lock_freq_duration if current_strength > strength_lock
255
257
 
256
258
  init_freq_hash
257
259
  end
@@ -263,7 +265,7 @@ def scan_range(opts = {})
263
265
  start_freq = opts[:start_freq]
264
266
  target_freq = opts[:target_freq]
265
267
  precision = opts[:precision]
266
- lock_on_freq_duration = opts[:lock_on_freq_duration]
268
+ lock_freq_duration = opts[:lock_freq_duration]
267
269
  strength_lock = opts[:strength_lock]
268
270
 
269
271
  multiplier = 10**(precision - 1)
@@ -276,7 +278,7 @@ def scan_range(opts = {})
276
278
  demodulator_mode: demodulator_mode,
277
279
  bandwidth: bandwidth,
278
280
  this_freq: this_freq,
279
- lock_on_freq_duration: lock_on_freq_duration,
281
+ lock_freq_duration: lock_freq_duration,
280
282
  strength_lock: strength_lock
281
283
  )
282
284
  end
@@ -288,7 +290,7 @@ def scan_range(opts = {})
288
290
  demodulator_mode: demodulator_mode,
289
291
  bandwidth: bandwidth,
290
292
  this_freq: this_freq,
291
- lock_on_freq_duration: lock_on_freq_duration,
293
+ lock_freq_duration: lock_freq_duration,
292
294
  strength_lock: strength_lock
293
295
  )
294
296
 
@@ -321,7 +323,7 @@ begin
321
323
  demodulator_mode.upcase!
322
324
  raise "ERROR: Invalid demodulator mode: #{demodulator_mode}" unless %w[OFF RAW AM FM WFM WFM_ST WFM_ST_OIRT LSB USB CW CWL CWU].include?(demodulator_mode)
323
325
 
324
- bandwidth = opts[:bandwidth] ||= '200.000'
326
+ bandwidth = opts[:bandwidth] ||= '270.000'
325
327
 
326
328
  puts "Setting demodulator mode to #{demodulator_mode} and bandwidth to #{bandwidth}..."
327
329
  bandwidth = bandwidth.to_s.delete('.').to_i unless bandwidth.nil?
@@ -339,7 +341,7 @@ begin
339
341
  resp_ok: 'RPRT 0'
340
342
  )
341
343
 
342
- squelch = opts[:squelch] ||= -65.0
344
+ squelch = opts[:squelch] ||= -50.0
343
345
  squelch = squelch.to_f
344
346
  squelch_resp = gqrx_cmd(
345
347
  gqrx_sock: gqrx_sock,
@@ -347,14 +349,14 @@ begin
347
349
  resp_ok: 'RPRT 0'
348
350
  )
349
351
 
350
- precision = opts[:precision] ||= 6
352
+ precision = opts[:precision] ||= 5
351
353
  precision = precision.to_i
352
354
  raise "ERROR: Invalid precision: #{precision}" unless (1..12).include?(precision)
353
355
 
354
- lock_on_freq_duration = opts[:lock_on_freq_duration] ||= 5.0
355
- lock_on_freq_duration = lock_on_freq_duration.to_f
356
+ lock_freq_duration = opts[:lock_freq_duration] ||= 0.5
357
+ lock_freq_duration = lock_freq_duration.to_f
356
358
 
357
- strength_lock = opts[:strength_lock] ||= -55.0
359
+ strength_lock = opts[:strength_lock] ||= -45.0
358
360
  strength_lock = strength_lock.to_f
359
361
 
360
362
  rf_gain = opts[:rf_gain] ||= 16.0
@@ -373,7 +375,7 @@ begin
373
375
  resp_ok: 'RPRT 0'
374
376
  )
375
377
 
376
- baseband_gain = opts[:baseband_gain] ||= 0.0
378
+ baseband_gain = opts[:baseband_gain] ||= 10.0
377
379
  baseband_gain = baseband_gain.to_f
378
380
  squelch_resp = gqrx_cmd(
379
381
  gqrx_sock: gqrx_sock,
@@ -391,7 +393,7 @@ begin
391
393
  start_freq: start_freq,
392
394
  target_freq: target_freq,
393
395
  precision: precision,
394
- lock_on_freq_duration: lock_on_freq_duration,
396
+ lock_freq_duration: lock_freq_duration,
395
397
  strength_lock: strength_lock,
396
398
  squelch: squelch
397
399
  )
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.5.55'
4
+ VERSION = '0.5.58'
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.5.55
4
+ version: 0.5.58
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.