pwn 0.5.527 → 0.5.528

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: 41dad766173e9f532698600df5ad215b77c1536b28d7913ac1ad83650d8f15a3
4
- data.tar.gz: a620829d63e8fc41d707fb55e6cdc6aef3ca1aa0bab571014631dfb883639c6b
3
+ metadata.gz: 3f9e283f727f87c39043fb14afcdaca284c0b79e2833798db1aa331e59c188d3
4
+ data.tar.gz: 9d24d1a38cec55d2440d562d5a8299a5a811406aa89bf26a1129b4c481a79d71
5
5
  SHA512:
6
- metadata.gz: 86c1c7bd2fad5b04e0170d53de9a820be1276cd1e038a7ae2b224b192e5e421075ef890a3eb35280ca624d28237cb1749a869d9d31ac439eb1fd3159b25ec953
7
- data.tar.gz: c9a934741503e2b271d289a19950dc203167c0a12ed3f66507fe88dcf0da4843a324fd9035d037375a854ec751808c4690aab03ead1dc342ce2aac419b5d3c2f
6
+ metadata.gz: 206cd91c521032bf8c9a0a195d634d087bfc7419e6882b1b3a4adf6d7303c90ce91d7cafd5de7092c58112fd82546cd51cb1ccae6ada35d0bc4791b5740e60a1
7
+ data.tar.gz: e2eb59900f7397ad5a422263e1aca4fc4f99ed0a6d91209f46536e8b21b0accdf56f9091e6ccae5f62a23711e8c2fcdeccb401bdd6c2dd6042f71f9acd14bf33
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.527]:001 >>> PWN.help
40
+ pwn[v0.5.528]: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.527]:001 >>> PWN.help
55
+ pwn[v0.5.528]: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.527]:001 >>> PWN.help
65
+ pwn[v0.5.528]: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
@@ -65,6 +65,10 @@ PWN::Driver::Parser.new do |options|
65
65
  opts[:baseband_gain] = b
66
66
  end
67
67
 
68
+ options.on('-k', '--keep-looping', '<Optional - Keep looping over the scan range indefinitely until CTRL+C is caught (Defaults to false)>') do |k|
69
+ opts[:keep_looping] = k
70
+ end
71
+
68
72
  options.on('-LFILE', '--scan-log=FILE', '<Optional - Path to log scan results to (Defaults to /tmp/pwn_sdr_gqrx_scan_<start_freq>-<target_freq>_<timestamp>.json)>') do |l|
69
73
  opts[:scan_log] = l
70
74
  end
@@ -72,10 +76,6 @@ PWN::Driver::Parser.new do |options|
72
76
  options.on('-wLOC', '--location=LOC', '<Optional - Location string to include in AI analysis (e.g. "New York, NY", 90210, GPS coords, etc.)>') do |l|
73
77
  opts[:location] = l
74
78
  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
79
79
  end.parse!
80
80
 
81
81
  begin
@@ -132,10 +132,10 @@ begin
132
132
  baseband_gain = opts[:baseband_gain]
133
133
  baseband_gain = baseband_gain.to_f unless baseband_gain.nil?
134
134
 
135
+ keep_looping = opts[:keep_looping]
135
136
  scan_log = opts[:scan_log]
136
137
  decoder = opts[:decoder]
137
138
  location = opts[:location]
138
- keep_looping = opts[:keep_looping]
139
139
 
140
140
  # Merge opts again to ensure we override profile values with CLI values
141
141
  PWN::SDR::GQRX.scan_range(
@@ -151,10 +151,10 @@ begin
151
151
  rf_gain: rf_gain,
152
152
  intermediate_gain: intermediate_gain,
153
153
  baseband_gain: baseband_gain,
154
+ keep_looping: keep_looping,
154
155
  scan_log: scan_log,
155
156
  decoder: decoder,
156
- location: location,
157
- keep_looping: keep_looping
157
+ location: location
158
158
  )
159
159
  puts 'Scan Complete.'
160
160
  rescue StandardError => e
data/lib/pwn/sdr/gqrx.rb CHANGED
@@ -651,9 +651,9 @@ module PWN
651
651
  # rf_gain: 'optional - RF gain (defaults to 0.0)',
652
652
  # intermediate_gain: 'optional - Intermediate gain (defaults to 32.0)',
653
653
  # baseband_gain: 'optional - Baseband gain (defaults to 10.0)',
654
- # scan_log: 'optional - Path to save detected signals log (defaults to /tmp/pwn_sdr_gqrx_scan_<start_freq>-<target_freq>_<timestamp>.json)',
655
- # location: 'optional - Location string to include in AI analysis (e.g., "New York, NY", 90210, GPS coords, etc.)',
656
- # keep_looping: 'optional - Boolean to keep scanning indefinitely (defaults to false)'
654
+ # keep_looping: 'optional - Boolean to keep scanning indefinitely (defaults to false)',
655
+ # scan_log: 'optional - Path to save detected signals log (defaults to /tmp/pwn_sdr_gqrx_scan_<start_freq>-<target_freq>_<timestamp>_lN.json)',
656
+ # location: 'optional - Location string to include in AI analysis (e.g., "New York, NY", 90210, GPS coords, etc.)'
657
657
  # )
658
658
 
659
659
  public_class_method def self.scan_range(opts = {})
@@ -678,10 +678,21 @@ module PWN
678
678
  squelch = opts[:squelch] ||= (strength_lock - 3.0)
679
679
  decoder = opts[:decoder]
680
680
 
681
+ keep_looping = opts[:keep_looping] || false
682
+
681
683
  log_timestamp = Time.now.strftime('%Y-%m-%d')
682
- scan_log = opts[:scan_log] ||= "/tmp/pwn_sdr_gqrx_scan_#{PWN::SDR.hz_to_s(hz_start)}-#{PWN::SDR.hz_to_s(hz_target)}_#{log_timestamp}_l#{loop_count}.json"
684
+ scan_log = opts[:scan_log] ||= "/tmp/pwn_sdr_gqrx_scan_#{PWN::SDR.hz_to_s(hz_start)}-#{PWN::SDR.hz_to_s(hz_target)}_#{log_timestamp}.json"
685
+
686
+ if keep_looping
687
+ # inject _lN before file extension if keep_looping is true
688
+ scan_log.gsub!("_l#{loop_count}", '')
689
+ scan_log = File.join(
690
+ File.dirname(scan_log),
691
+ "#{File.basename(scan_log, '.*')}_l#{loop_count}#{File.extname(scan_log)}"
692
+ )
693
+ end
694
+
683
695
  location = opts[:location] ||= 'United States'
684
- keep_looping = opts[:keep_looping] || false
685
696
 
686
697
  step_hz = 10**(precision - 1)
687
698
  step_hz_direction = hz_start > hz_target ? -step_hz : step_hz
@@ -818,7 +829,7 @@ module PWN
818
829
  keep_alive: true
819
830
  )
820
831
  prev_freq_obj[:strength_lock] = strength_lock
821
- prev_freq_obj[:strength_db] = best_strength_db
832
+ prev_freq_obj[:strength_db] = best_strength_db.round(1)
822
833
 
823
834
  system_role_content = "Analyze signal data captured by a software-defined-radio using GQRX at the following location: #{location}. Respond with just FCC information about the transmission if available. If the frequency is unlicensed or not found in FCC records, state that clearly. Be clear and concise in your analysis."
824
835
  ai_analysis = PWN::AI::Introspection.reflect_on(
@@ -993,6 +1004,7 @@ module PWN
993
1004
  rf_gain: 'optional - RF gain (defaults to 0.0)',
994
1005
  intermediate_gain: 'optional - Intermediate gain (defaults to 32.0)',
995
1006
  baseband_gain: 'optional - Baseband gain (defaults to 10.0)',
1007
+ keep_looping: 'optional - Boolean to keep scanning indefinitely (defaults to false)',
996
1008
  scan_log: 'optional - Path to save detected signals log (defaults to /tmp/pwn_sdr_gqrx_scan_<start_freq>-<target_freq>_<timestamp>.json)',
997
1009
  location: 'optional - Location string to include in AI analysis (e.g., \"New York, NY\", 90210, GPS coords, etc.)'
998
1010
  )
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.527'
4
+ VERSION = '0.5.528'
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.527
4
+ version: 0.5.528
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.