Skip to content

Commit 9619139

Browse files
committed
pwn_gqrx_scanner Driver - implement sleep between scan hops
1 parent 09ecfdd commit 9619139

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ cd /opt/pwn
3737
$ ./install.sh
3838
$ ./install.sh ruby-gem
3939
$ pwn
40-
pwn[v0.5.49]:001 >>> PWN.help
40+
pwn[v0.5.50]:001 >>> PWN.help
4141
```
4242

4343
[![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.3.0@pwn
5252
$ gem uninstall --all --executables pwn
5353
$ gem install --verbose pwn
5454
$ pwn
55-
pwn[v0.5.49]:001 >>> PWN.help
55+
pwn[v0.5.50]:001 >>> PWN.help
5656
```
5757

5858
If you're using a multi-user install of RVM do:
@@ -62,7 +62,7 @@ $ rvm use ruby-3.3.0@pwn
6262
$ rvmsudo gem uninstall --all --executables pwn
6363
$ rvmsudo gem install --verbose pwn
6464
$ pwn
65-
pwn[v0.5.49]:001 >>> PWN.help
65+
pwn[v0.5.50]:001 >>> PWN.help
6666
```
6767

6868
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:

bin/pwn_gqrx_scanner

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ OptionParser.new do |options|
3333
options.on('-PPLACE', '--precision=PLACE', '<Optional - Precision of Frequency 1-9 (Defaults to 3)>') do |p|
3434
opts[:precision] = p
3535
end
36+
37+
options.on('-SFLOAT', '--sleep-between-hops=FLOAT', '<Optional - Float to Sleep Between Hops (Defaults to 0)>') do |s|
38+
opts[:sleep_between_hops] = s
39+
end
3640
end.parse!
3741

3842
if opts.empty?
@@ -69,6 +73,7 @@ def scan_range(opts = {})
6973
target_freq = opts[:target_freq]
7074
precision = opts[:precision]
7175
multiplier = 10**(precision - 1)
76+
sleep_between_hops = opts[:sleep_between_hops]
7277

7378
if start_freq > target_freq
7479
start_freq.downto(target_freq) do |i|
@@ -80,6 +85,7 @@ def scan_range(opts = {})
8085
# Split the response from NNNNNNNNN to NNN.NNN.NNN
8186
this_freq = resp.to_s.chars.insert(-4, '.').insert(-8, '.').join
8287
puts ">>> #{this_freq}"
88+
sleep sleep_between_hops
8389
end
8490
else
8591
while start_freq <= target_freq
@@ -89,6 +95,8 @@ def scan_range(opts = {})
8995
# Split the response from NNNNNNNNN to NNN.NNN.NNN
9096
this_freq = resp.to_s.chars.insert(-4, '.').insert(-8, '.').join
9197
puts ">>> #{this_freq}"
98+
sleep sleep_between_hops
99+
92100
start_freq += multiplier
93101
end
94102
end
@@ -125,11 +133,15 @@ begin
125133
precision = precision.to_i
126134
raise "ERROR: Invalid precision: #{precision}" unless (1..9).include?(precision)
127135

136+
sleep_between_hops = opts[:sleep_between_hops] ||= 0
137+
sleep_between_hops = sleep_between_hops.to_f
138+
128139
scan_range(
129140
gqrx_sock: gqrx_sock,
130141
start_freq: start_freq,
131142
target_freq: target_freq,
132-
precision: precision
143+
precision: precision,
144+
sleep_between_hops: sleep_between_hops
133145
)
134146
rescue SystemExit, Interrupt
135147
puts "\nGoodbye."

lib/pwn/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module PWN
4-
VERSION = '0.5.49'
4+
VERSION = '0.5.50'
55
end

0 commit comments

Comments
 (0)