pwn 0.5.58 → 0.5.59
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 +4 -4
- data/README.md +3 -3
- data/bin/pwn_bdba_scan +1 -0
- data/bin/pwn_gqrx_scanner +48 -7
- 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: d514b15a63db15db79339971fcdef2bce732a73e37838618e839aefd47ce2af9
|
4
|
+
data.tar.gz: 23d5501f5810546f3348c31f8230e0620dc23a1dd6390b18062d8c8f05bc4e91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe9e53eb796c9abfc2c15ad603600420a7ad5a7500d26a319147ae1ffb852c6f4c7594c4fed061bab235464409f8990fea1eb7c8c2e19ff9b11bd2a08314a6a5
|
7
|
+
data.tar.gz: '02409ac5271f7483f4efcf3978298804f5425ae3062aeb670262a712bb769d97c6de7125b5daee150aea923aaa32156dee280f07b59b3b97cd8b4055b966520d'
|
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.
|
40
|
+
pwn[v0.5.59]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](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
|
+
pwn[v0.5.59]: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.
|
65
|
+
pwn[v0.5.59]: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_bdba_scan
CHANGED
data/bin/pwn_gqrx_scanner
CHANGED
@@ -242,6 +242,7 @@ def init_freq(opts = {})
|
|
242
242
|
init_freq_hash = {
|
243
243
|
demod_mode_n_passband: demod_n_passband,
|
244
244
|
frequency: current_freq,
|
245
|
+
bandwidth: bandwidth,
|
245
246
|
audio_gain_db: audio_gain_db,
|
246
247
|
squelch: current_squelch,
|
247
248
|
rf_gain: rf_gain,
|
@@ -251,8 +252,8 @@ def init_freq(opts = {})
|
|
251
252
|
strength_trigger_lock_on_freq: strength_lock,
|
252
253
|
lock_freq_duration: lock_freq_duration
|
253
254
|
}
|
254
|
-
puts JSON.pretty_generate(init_freq_hash)
|
255
255
|
|
256
|
+
print '.'
|
256
257
|
sleep lock_freq_duration if current_strength > strength_lock
|
257
258
|
|
258
259
|
init_freq_hash
|
@@ -269,6 +270,19 @@ def scan_range(opts = {})
|
|
269
270
|
strength_lock = opts[:strength_lock]
|
270
271
|
|
271
272
|
multiplier = 10**(precision - 1)
|
273
|
+
prev_freq_hash = {
|
274
|
+
demod_mode_n_passband: demodulator_mode,
|
275
|
+
frequency: start_freq,
|
276
|
+
bandwidth: bandwidth,
|
277
|
+
audio_gain_db: 0.0,
|
278
|
+
squelch: 0.0,
|
279
|
+
rf_gain: 0.0,
|
280
|
+
if_gain: 0.0,
|
281
|
+
bb_gain: 0.0,
|
282
|
+
strength: 0.0,
|
283
|
+
strength_trigger_lock_on_freq: strength_lock,
|
284
|
+
lock_freq_duration: lock_freq_duration
|
285
|
+
}
|
272
286
|
if start_freq > target_freq
|
273
287
|
start_freq.downto(target_freq) do |this_freq|
|
274
288
|
next unless (i % multiplier).zero?
|
@@ -281,6 +295,19 @@ def scan_range(opts = {})
|
|
281
295
|
lock_freq_duration: lock_freq_duration,
|
282
296
|
strength_lock: strength_lock
|
283
297
|
)
|
298
|
+
|
299
|
+
current_strength = init_freq_hash[:strength]
|
300
|
+
prev_strength = prev_freq_hash[:strength]
|
301
|
+
prev_freq = prev_freq_hash[:frequency]
|
302
|
+
|
303
|
+
approaching_detection = true if current_strength > prev_strength
|
304
|
+
if approaching_detection && current_strength < prev_strength
|
305
|
+
puts "**** Found a signal at ~ #{prev_freq} Hz ****"
|
306
|
+
puts JSON.pretty_generate(prev_freq_hash)
|
307
|
+
approaching_detection = false
|
308
|
+
end
|
309
|
+
|
310
|
+
prev_freq_hash = init_freq_hash
|
284
311
|
end
|
285
312
|
else
|
286
313
|
this_freq = start_freq
|
@@ -294,6 +321,19 @@ def scan_range(opts = {})
|
|
294
321
|
strength_lock: strength_lock
|
295
322
|
)
|
296
323
|
|
324
|
+
current_strength = init_freq_hash[:strength]
|
325
|
+
prev_strength = prev_freq_hash[:strength]
|
326
|
+
prev_freq = prev_freq_hash[:frequency]
|
327
|
+
|
328
|
+
approaching_detection = true if current_strength > prev_strength
|
329
|
+
if approaching_detection && current_strength < prev_strength
|
330
|
+
puts "\n**** Discovered a signal at #{prev_freq} Hz ****"
|
331
|
+
puts JSON.pretty_generate(prev_freq_hash)
|
332
|
+
approaching_detection = false
|
333
|
+
end
|
334
|
+
|
335
|
+
prev_freq_hash = init_freq_hash
|
336
|
+
|
297
337
|
this_freq += multiplier
|
298
338
|
end
|
299
339
|
end
|
@@ -323,7 +363,7 @@ begin
|
|
323
363
|
demodulator_mode.upcase!
|
324
364
|
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)
|
325
365
|
|
326
|
-
bandwidth = opts[:bandwidth] ||= '
|
366
|
+
bandwidth = opts[:bandwidth] ||= '200.000'
|
327
367
|
|
328
368
|
puts "Setting demodulator mode to #{demodulator_mode} and bandwidth to #{bandwidth}..."
|
329
369
|
bandwidth = bandwidth.to_s.delete('.').to_i unless bandwidth.nil?
|
@@ -341,7 +381,7 @@ begin
|
|
341
381
|
resp_ok: 'RPRT 0'
|
342
382
|
)
|
343
383
|
|
344
|
-
squelch = opts[:squelch] ||= -
|
384
|
+
squelch = opts[:squelch] ||= -63.0
|
345
385
|
squelch = squelch.to_f
|
346
386
|
squelch_resp = gqrx_cmd(
|
347
387
|
gqrx_sock: gqrx_sock,
|
@@ -356,10 +396,10 @@ begin
|
|
356
396
|
lock_freq_duration = opts[:lock_freq_duration] ||= 0.5
|
357
397
|
lock_freq_duration = lock_freq_duration.to_f
|
358
398
|
|
359
|
-
strength_lock = opts[:strength_lock] ||= -
|
399
|
+
strength_lock = opts[:strength_lock] ||= -60.0
|
360
400
|
strength_lock = strength_lock.to_f
|
361
401
|
|
362
|
-
rf_gain = opts[:rf_gain] ||=
|
402
|
+
rf_gain = opts[:rf_gain] ||= 0.0
|
363
403
|
rf_gain = rf_gain.to_f
|
364
404
|
squelch_resp = gqrx_cmd(
|
365
405
|
gqrx_sock: gqrx_sock,
|
@@ -367,7 +407,7 @@ begin
|
|
367
407
|
resp_ok: 'RPRT 0'
|
368
408
|
)
|
369
409
|
|
370
|
-
intermediate_gain = opts[:intermediate_gain] ||=
|
410
|
+
intermediate_gain = opts[:intermediate_gain] ||= 32.0
|
371
411
|
intermediate_gain = intermediate_gain.to_f
|
372
412
|
squelch_resp = gqrx_cmd(
|
373
413
|
gqrx_sock: gqrx_sock,
|
@@ -385,11 +425,12 @@ begin
|
|
385
425
|
|
386
426
|
s_freq_pretty = start_freq.to_s.chars.insert(-4, '.').insert(-8, '.').join
|
387
427
|
t_freq_pretty = target_freq.to_s.chars.insert(-4, '.').insert(-8, '.').join
|
388
|
-
puts "*** Scanning from #{s_freq_pretty} to #{t_freq_pretty}"
|
428
|
+
puts "*** Scanning from #{s_freq_pretty} to #{t_freq_pretty}\n\n\n"
|
389
429
|
|
390
430
|
scan_range(
|
391
431
|
gqrx_sock: gqrx_sock,
|
392
432
|
demodulator_mode: demodulator_mode,
|
433
|
+
bandwidth: bandwidth,
|
393
434
|
start_freq: start_freq,
|
394
435
|
target_freq: target_freq,
|
395
436
|
precision: precision,
|
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.5.
|
4
|
+
version: 0.5.59
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|