pwn 0.5.521 → 0.5.523

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: cce0727310028c78f7686c7b1712da893ffbfdbc6427af0f00b80345d2bc7383
4
- data.tar.gz: 2f4927896da9f71369209fd9472c5fc124b020ee5388bbccad3142e2cf8c3915
3
+ metadata.gz: ab21d035f6c1ef47c893dad5234480994c06df8fb79b3015e4cc2f6d58fde0d0
4
+ data.tar.gz: f0dacbafdfa4713284efcef186e4c8ac84d3c0e165261099dc0a37eb6fcefb6c
5
5
  SHA512:
6
- metadata.gz: 7194aee01a1df8c5af6101c4c67f38b9221583f93cc25d9f126fdc10a61148279a5aa167eb9b2f147cd0dcc034f6a9dbece57c343b84931eb0a660f924db9e67
7
- data.tar.gz: e623d208ca8c06bcf38ff4c60c0f6e101019fb7d84395ccd9188d744bef4bb6da8d26df1d92495adf0e1fbff97af54a48b1bbba75dc938be8d877d6edf8a3dad
6
+ metadata.gz: 596f8c1b30760fe582f31306331507b6a7327942c6811ab7473395677982041d740d27f8ddadeca127fb1ff2add0df27b2de18d403e5b9d842b63ed9657e0d17
7
+ data.tar.gz: 8a0341fa6245a4ec9c7abec0cef74de1f2f0b5357d0cd6d6527f205403d2152119d5bbad1e08915e56855d71b6b4645e29db60228669b7959d5400bab2a94342
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.521]:001 >>> PWN.help
40
+ pwn[v0.5.523]: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.521]:001 >>> PWN.help
55
+ pwn[v0.5.523]: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.521]:001 >>> PWN.help
65
+ pwn[v0.5.523]: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
@@ -5,7 +5,7 @@ require 'pwn'
5
5
 
6
6
  opts = PWN::Env[:driver_opts]
7
7
  PWN::Driver::Parser.new do |options|
8
- options.on('-aPROFILE', '--assume-profile=PROFILE', '<Required if "--target-freq" is Nil - Profile to assume for common radio protocols. Use "--list-profiles" to display supported protocols (Defaults to nil)') do |p|
8
+ options.on('-aPROFILE', '--assume-profile=PROFILE', '<Required if "--target-freq" is Nil - Profile to assume for common radio protocols. Use "--list-scan-profiles" to display supported protocols (Defaults to nil)') do |p|
9
9
  opts[:profile] = p
10
10
  end
11
11
 
@@ -37,10 +37,6 @@ PWN::Driver::Parser.new do |options|
37
37
  opts[:bandwidth] = b
38
38
  end
39
39
 
40
- options.on('-OLAP', '--overlap-protection', '<Optional - Enable Overlap Protection to prevent false positives when scanning (Defaults to false)>') do |o|
41
- opts[:overlap_protection] = o
42
- end
43
-
44
40
  options.on('-DMODE', '--demodulator-mode=MODE', '<Optional - Set Demodulator Mode OFF | RAW | AM | FM | WFM | WFM_ST | WFM_ST_OIRT | LSB | USB | CW | CWL | CWU (Defaults to WFM_ST)>') do |d|
45
41
  opts[:demodulator_mode] = d
46
42
  end
@@ -53,10 +49,6 @@ PWN::Driver::Parser.new do |options|
53
49
  opts[:strength_lock] = s
54
50
  end
55
51
 
56
- options.on('-LFLOAT', '--lock-freq-duration=FLOAT', '<Optional - Duration to lock onto Freqency when Strength < --strength-lock value (Defaults to 0.04)>') do |l|
57
- opts[:lock_freq_duration] = l
58
- end
59
-
60
52
  options.on('-QFLOAT', '--squelch=FLOAT', '<Optional - Squelch Threshold -150.0 to 0 (Defaults to --strength-lock - 3)>') do |q|
61
53
  opts[:squelch] = q
62
54
  end
@@ -77,9 +69,13 @@ PWN::Driver::Parser.new do |options|
77
69
  opts[:scan_log] = l
78
70
  end
79
71
 
80
- options.on('-LOC', '--location', '<Optional - Location string to include in AI analysis (e.g. "New York, NY", 90210, GPS coords, etc.)>') do |l|
72
+ options.on('-wLOC', '--location=LOC', '<Optional - Location string to include in AI analysis (e.g. "New York, NY", 90210, GPS coords, etc.)>') do |l|
81
73
  opts[:location] = l
82
74
  end
75
+
76
+ options.on('-k', '--keep-looping', '<Optional - Keep looping over the scan range indefinitely until CTRL+C is caught (Defaults to false)>') do |k|
77
+ opts[:keep_looping] = k
78
+ end
83
79
  end.parse!
84
80
 
85
81
  begin
@@ -113,7 +109,6 @@ begin
113
109
 
114
110
  demodulator_mode = opts[:demodulator_mode]
115
111
  bandwidth = opts[:bandwidth]
116
- overlap_protection = opts[:overlap_protection]
117
112
 
118
113
  audio_gain_db = opts[:audio_gain_db]
119
114
  audio_gain_db = audio_gain_db.to_f unless audio_gain_db.nil?
@@ -125,7 +120,6 @@ begin
125
120
  precision = precision.to_i
126
121
  raise "ERROR: Invalid precision: #{precision}" unless (1..12).include?(precision)
127
122
 
128
- lock_freq_duration = opts[:lock_freq_duration]
129
123
  strength_lock = opts[:strength_lock]
130
124
  strength_lock = strength_lock.to_f unless strength_lock.nil?
131
125
 
@@ -141,27 +135,33 @@ begin
141
135
  scan_log = opts[:scan_log]
142
136
  decoder = opts[:decoder]
143
137
  location = opts[:location]
138
+ keep_looping = opts[:keep_looping] ||= false
144
139
 
145
140
  # Merge opts again to ensure we override profile values with CLI values
146
- PWN::SDR::GQRX.scan_range(
147
- gqrx_sock: gqrx_sock,
148
- start_freq: start_freq,
149
- target_freq: target_freq,
150
- demodulator_mode: demodulator_mode,
151
- bandwidth: bandwidth,
152
- overlap_protection: overlap_protection,
153
- audio_gain_db: audio_gain_db,
154
- squelch: squelch,
155
- precision: precision,
156
- strength_lock: strength_lock,
157
- lock_freq_duration: lock_freq_duration,
158
- rf_gain: rf_gain,
159
- intermediate_gain: intermediate_gain,
160
- baseband_gain: baseband_gain,
161
- scan_log: scan_log,
162
- decoder: decoder,
163
- location: location
164
- )
141
+ loop_count = 1
142
+ loop do
143
+ PWN::SDR::GQRX.scan_range(
144
+ gqrx_sock: gqrx_sock,
145
+ start_freq: start_freq,
146
+ target_freq: target_freq,
147
+ demodulator_mode: demodulator_mode,
148
+ bandwidth: bandwidth,
149
+ audio_gain_db: audio_gain_db,
150
+ squelch: squelch,
151
+ precision: precision,
152
+ strength_lock: strength_lock,
153
+ rf_gain: rf_gain,
154
+ intermediate_gain: intermediate_gain,
155
+ baseband_gain: baseband_gain,
156
+ scan_log: scan_log,
157
+ decoder: decoder,
158
+ location: location
159
+ )
160
+ break unless keep_looping
161
+
162
+ loop_count += 1
163
+ scan_log = "/tmp/pwn_sdr_gqrx_scan_#{PWN::SDR.hz_to_s(start_freq)}-#{PWN::SDR.hz_to_s(target_freq)}_#{Time.now.strftime('%Y-%m-%d')}-loop_#{loop_count}.json"
164
+ end
165
165
  puts 'Scan Complete.'
166
166
  rescue StandardError => e
167
167
  raise e
@@ -22,7 +22,7 @@ module PWN
22
22
  skip_rds = "\n"
23
23
  puts JSON.pretty_generate(freq_obj)
24
24
  puts "\n*** FM Radio RDS Decoder ***"
25
- puts '(Press [ENTER] to continue)...'
25
+ puts 'Press [ENTER] to continue...'
26
26
 
27
27
  # Toggle RDS off and on to reset the decoder
28
28
  PWN::SDR::GQRX.gqrx_cmd(
data/lib/pwn/sdr/gqrx.rb CHANGED
@@ -805,8 +805,11 @@ module PWN
805
805
  prev_freq_obj = init_freq(
806
806
  gqrx_sock: gqrx_sock,
807
807
  freq: best_freq,
808
- suppress_details: true,
808
+ demodulator_mode: demodulator_mode,
809
+ bandwidth: bandwidth,
810
+ squelch: squelch,
809
811
  decoder: decoder,
812
+ suppress_details: true,
810
813
  keep_alive: true
811
814
  )
812
815
  prev_freq_obj[:strength_lock] = strength_lock
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.521'
4
+ VERSION = '0.5.523'
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.521
4
+ version: 0.5.523
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.