pwn 0.5.512 → 0.5.513
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/.rubocop.yml +1 -1
- data/Gemfile +1 -1
- data/README.md +3 -3
- data/bin/pwn_gqrx_scanner +13 -8
- data/lib/pwn/plugins/sock.rb +11 -1
- data/lib/pwn/sdr/frequency_allocation.rb +162 -162
- data/lib/pwn/sdr/gqrx.rb +407 -206
- data/lib/pwn/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 82756fa89b985658783dd6a2f59ec1e4c591959dd0ea349e8f68ca5e74fc8715
|
|
4
|
+
data.tar.gz: 34f2cc9edcc4eb8a35ad7d91b16fbb760d4a220a3a9d556efe682f009573abcf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9bf3f13770d43feeab86c59ab32b389a02e11727b888e7a002248dd8754769c00c1e5e2a335c316db1d1ccc1ad846fc9a39d463bde22a0e9c3f467a69e2d4e55
|
|
7
|
+
data.tar.gz: db2d0be522131762b6214e6fb3e4e79500bf4b8bfb25510785ac0eaa3eca81c0984c58d9a7a1dc9d195c1d8873b2a1cc559f0ff0a2085d9f3217341fb03042a3
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
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.513]:001 >>> PWN.help
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.4.7@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.513]: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.4.7@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.513]: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
|
@@ -45,6 +45,10 @@ PWN::Driver::Parser.new do |options|
|
|
|
45
45
|
opts[:demodulator_mode] = d
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
+
options.on('-rRDS', '--rds', '<Optional - Enable RDS Decoding when in WFM or WFM_ST Demodulator Mode (Defaults to false)>') do |r|
|
|
49
|
+
opts[:rds] = r
|
|
50
|
+
end
|
|
51
|
+
|
|
48
52
|
options.on('-PINT', '--precision=INT', '<Optional - Precision of Frequency 1-12 (Defaults to 5)>') do |p|
|
|
49
53
|
opts[:precision] = p
|
|
50
54
|
end
|
|
@@ -69,7 +73,7 @@ PWN::Driver::Parser.new do |options|
|
|
|
69
73
|
opts[:intermediate_gain] = i
|
|
70
74
|
end
|
|
71
75
|
|
|
72
|
-
options.on('-BFLOAT', '--
|
|
76
|
+
options.on('-BFLOAT', '--baseband-gain=FLOAT', '<Optional - Baseband Gain 0.0-62.0 (Defaults to 10.0)>') do |b|
|
|
73
77
|
opts[:baseband_gain] = b
|
|
74
78
|
end
|
|
75
79
|
|
|
@@ -109,11 +113,10 @@ begin
|
|
|
109
113
|
|
|
110
114
|
host = opts[:host]
|
|
111
115
|
port = opts[:port]
|
|
112
|
-
|
|
113
|
-
puts "Connecting to GQRX at #{host}:#{port}..."
|
|
114
116
|
gqrx_sock = PWN::SDR::GQRX.connect(target: host, port: port)
|
|
115
117
|
|
|
116
118
|
demodulator_mode = opts[:demodulator_mode]
|
|
119
|
+
rds = opts[:rds]
|
|
117
120
|
bandwidth = opts[:bandwidth]
|
|
118
121
|
overlap_protection = opts[:overlap_protection]
|
|
119
122
|
|
|
@@ -143,18 +146,20 @@ begin
|
|
|
143
146
|
scan_log = opts[:scan_log]
|
|
144
147
|
location = opts[:location]
|
|
145
148
|
|
|
149
|
+
# Merge opts again to ensure we override profile values with CLI values
|
|
146
150
|
PWN::SDR::GQRX.scan_range(
|
|
147
151
|
gqrx_sock: gqrx_sock,
|
|
148
152
|
start_freq: start_freq,
|
|
149
153
|
target_freq: target_freq,
|
|
150
154
|
demodulator_mode: demodulator_mode,
|
|
155
|
+
rds: rds,
|
|
151
156
|
bandwidth: bandwidth,
|
|
152
157
|
overlap_protection: overlap_protection,
|
|
158
|
+
audio_gain_db: audio_gain_db,
|
|
159
|
+
squelch: squelch,
|
|
153
160
|
precision: precision,
|
|
154
|
-
lock_freq_duration: lock_freq_duration,
|
|
155
161
|
strength_lock: strength_lock,
|
|
156
|
-
|
|
157
|
-
audio_gain_db: audio_gain_db,
|
|
162
|
+
lock_freq_duration: lock_freq_duration,
|
|
158
163
|
rf_gain: rf_gain,
|
|
159
164
|
intermediate_gain: intermediate_gain,
|
|
160
165
|
baseband_gain: baseband_gain,
|
|
@@ -165,7 +170,7 @@ begin
|
|
|
165
170
|
rescue StandardError => e
|
|
166
171
|
raise e
|
|
167
172
|
rescue Interrupt, SystemExit
|
|
168
|
-
puts "\
|
|
173
|
+
puts "\nCTRL+C detected - goodbye."
|
|
169
174
|
ensure
|
|
170
|
-
|
|
175
|
+
PWN::SDR::GQRX.disconnect(gqrx_sock: gqrx_sock) unless gqrx_sock.closed?
|
|
171
176
|
end
|
data/lib/pwn/plugins/sock.rb
CHANGED
|
@@ -229,10 +229,20 @@ module PWN
|
|
|
229
229
|
|
|
230
230
|
public_class_method def self.disconnect(opts = {})
|
|
231
231
|
sock_obj = opts[:sock_obj]
|
|
232
|
+
return unless sock_obj.respond_to?(:close)
|
|
233
|
+
|
|
234
|
+
# Shutdown both directions to terminate flows immediately
|
|
235
|
+
# sock_obj.shutdown(Socket::SHUT_RDWR)
|
|
236
|
+
|
|
237
|
+
# Set SO_LINGER=0 to force RST (skips TIME_WAIT; ideal for fuzzing)
|
|
238
|
+
# linger = [1, 0].pack('ii')
|
|
239
|
+
# sock_obj.setsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER, linger)
|
|
240
|
+
|
|
232
241
|
sock_obj.close
|
|
233
|
-
sock_obj = nil
|
|
234
242
|
rescue StandardError => e
|
|
235
243
|
raise e
|
|
244
|
+
ensure
|
|
245
|
+
sock_obj = nil
|
|
236
246
|
end
|
|
237
247
|
|
|
238
248
|
# Author(s):: 0day Inc. <support@0dayinc.com>
|