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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e7b1030cb5ce3e024a16630a46f404f8919da6d799e385133be3be4da8286e9
4
- data.tar.gz: e19976ea7a052f608f9b17e50e76e06e070926146749bed674a30e39f91dccce
3
+ metadata.gz: 82756fa89b985658783dd6a2f59ec1e4c591959dd0ea349e8f68ca5e74fc8715
4
+ data.tar.gz: 34f2cc9edcc4eb8a35ad7d91b16fbb760d4a220a3a9d556efe682f009573abcf
5
5
  SHA512:
6
- metadata.gz: 69ce103c6b63b5691adb551adb86540373671f15455a2614d94230f7530c80f8d24b2e46503c52852208e428d015d86185b64df1cd8fcf29e18c75e7b9103287
7
- data.tar.gz: 99d2a4f9b47e9f2e3226c81539854a102b22b3956d36be70dbd75c62b5d0bd09c36563589e590d2796cec9ddef9b68736fb2649bb1d2320d666bac844f97524a
6
+ metadata.gz: 9bf3f13770d43feeab86c59ab32b389a02e11727b888e7a002248dd8754769c00c1e5e2a335c316db1d1ccc1ad846fc9a39d463bde22a0e9c3f467a69e2d4e55
7
+ data.tar.gz: db2d0be522131762b6214e6fb3e4e79500bf4b8bfb25510785ac0eaa3eca81c0984c58d9a7a1dc9d195c1d8873b2a1cc559f0ff0a2085d9f3217341fb03042a3
data/.rubocop.yml CHANGED
@@ -16,7 +16,7 @@ Metrics/ClassLength:
16
16
  Metrics/CyclomaticComplexity:
17
17
  Max: 158
18
18
  Metrics/MethodLength:
19
- Max: 652
19
+ Max: 733
20
20
  Metrics/ModuleLength:
21
21
  Max: 1563
22
22
  Metrics/PerceivedComplexity:
data/Gemfile CHANGED
@@ -73,7 +73,7 @@ gem 'pry-doc', '1.6.0'
73
73
  gem 'rake', '13.3.1'
74
74
  gem 'rb-readline', '0.5.5'
75
75
  gem 'rbvmomi2', '3.8.0'
76
- gem 'rdoc', '6.17.0'
76
+ gem 'rdoc', '7.0.1'
77
77
  gem 'rest-client', '2.1.0'
78
78
  gem 'rex', '2.0.13'
79
79
  gem 'rmagick', '6.1.4'
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.512]:001 >>> PWN.help
40
+ pwn[v0.5.513]: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.4.7@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.512]:001 >>> PWN.help
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.512]:001 >>> PWN.help
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', '--basedband-gain=FLOAT', '<Optional - Baseband Gain 0.0-62.0 (Defaults to 10.0)>') do |b|
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
- squelch: squelch,
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 "\nGoodbye."
173
+ puts "\nCTRL+C detected - goodbye."
169
174
  ensure
170
- gqrx_sock = PWN::SDR::GQRX.disconnect(gqrx_sock: gqrx_sock) unless gqrx_sock.nil?
175
+ PWN::SDR::GQRX.disconnect(gqrx_sock: gqrx_sock) unless gqrx_sock.closed?
171
176
  end
@@ -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>