pwn 0.5.49 → 0.5.51
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/README.md +3 -3
- data/bin/pwn_gqrx_scanner +43 -23
- data/lib/pwn/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfe0f518a0867cb7c25b3fa05d62b9497971f740288cf12cade05dfd32428063
|
4
|
+
data.tar.gz: 3a79b2526bb5b1a8d312c42b335eea3bba9ff0518e5aa05fcbf663c11276064b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf5419afa046d2259be2497bb82f994495530144f13873990c31691c869055205fe4106a9844f1c150be413afff1e7c38e0e24656b09134aca31b1acd2c63dae
|
7
|
+
data.tar.gz: 06b5f917e2e63e88eee092751b39d308d7397dff0769a8ea786e6df4d18124865d698c7dcfa518db40f529ff2d609b50c2b8afbccd6f12538e42df461a50991d
|
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.51]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.3.0@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.51]: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.3.0@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.51]: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
@@ -30,11 +30,11 @@ OptionParser.new do |options|
|
|
30
30
|
opts[:port] = p
|
31
31
|
end
|
32
32
|
|
33
|
-
options.on('-PPLACE', '--precision=PLACE', '<Optional - Precision of Frequency 1-
|
33
|
+
options.on('-PPLACE', '--precision=PLACE', '<Optional - Precision of Frequency 1-12 (Defaults to 3)>') do |p|
|
34
34
|
opts[:precision] = p
|
35
35
|
end
|
36
36
|
|
37
|
-
options.on('-SFLOAT', '--sleep-between-hops=FLOAT', '<Optional -
|
37
|
+
options.on('-SFLOAT', '--sleep-between-hops=FLOAT', '<Optional - Float to Sleep Between Hops (Defaults to 0)>') do |s|
|
38
38
|
opts[:sleep_between_hops] = s
|
39
39
|
end
|
40
40
|
end.parse!
|
@@ -67,37 +67,57 @@ def gqrx_cmd(opts = {})
|
|
67
67
|
gqrx_sock.readline.chomp if does_respond
|
68
68
|
end
|
69
69
|
|
70
|
+
def init_freq(opts = {})
|
71
|
+
gqrx_sock = opts[:gqrx_sock]
|
72
|
+
this_freq = opts[:this_freq]
|
73
|
+
sleep_between_hops = opts[:sleep_between_hops]
|
74
|
+
|
75
|
+
resp = gqrx_cmd(
|
76
|
+
gqrx_sock: gqrx_sock,
|
77
|
+
cmd: "F #{this_freq}"
|
78
|
+
)
|
79
|
+
raise "ERROR: Failed to set frequency to #{this_freq}" unless resp == 'RPRT 0'
|
80
|
+
|
81
|
+
resp = gqrx_cmd(
|
82
|
+
gqrx_sock: gqrx_sock,
|
83
|
+
cmd: 'f'
|
84
|
+
)
|
85
|
+
|
86
|
+
# Split the response from NNNNNNNNN
|
87
|
+
# to NNN.NNN.NNN
|
88
|
+
this_freq = resp.to_s.chars.insert(-4, '.').insert(-8, '.').join
|
89
|
+
puts ">>> #{this_freq}"
|
90
|
+
sleep sleep_between_hops
|
91
|
+
end
|
92
|
+
|
70
93
|
def scan_range(opts = {})
|
71
94
|
gqrx_sock = opts[:gqrx_sock]
|
72
95
|
start_freq = opts[:start_freq]
|
73
96
|
target_freq = opts[:target_freq]
|
74
97
|
precision = opts[:precision]
|
75
|
-
multiplier = 10**(precision - 1)
|
76
98
|
sleep_between_hops = opts[:sleep_between_hops]
|
77
99
|
|
100
|
+
multiplier = 10**(precision - 1)
|
78
101
|
if start_freq > target_freq
|
79
|
-
start_freq.downto(target_freq) do |
|
102
|
+
start_freq.downto(target_freq) do |this_freq|
|
80
103
|
next unless (i % multiplier).zero?
|
81
104
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
puts ">>> #{this_freq}"
|
88
|
-
sleep sleep_between_hops
|
105
|
+
init_freq(
|
106
|
+
gqrx_sock: gqrx_sock,
|
107
|
+
this_freq: this_freq,
|
108
|
+
sleep_between_hops: sleep_between_hops
|
109
|
+
)
|
89
110
|
end
|
90
111
|
else
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
start_freq += multiplier
|
112
|
+
this_freq = start_freq
|
113
|
+
while this_freq <= target_freq
|
114
|
+
init_freq(
|
115
|
+
gqrx_sock: gqrx_sock,
|
116
|
+
this_freq: this_freq,
|
117
|
+
sleep_between_hops: sleep_between_hops
|
118
|
+
)
|
119
|
+
|
120
|
+
this_freq += multiplier
|
101
121
|
end
|
102
122
|
end
|
103
123
|
end
|
@@ -131,9 +151,9 @@ begin
|
|
131
151
|
|
132
152
|
precision = opts[:precision] ||= 3
|
133
153
|
precision = precision.to_i
|
134
|
-
raise "ERROR: Invalid precision: #{precision}" unless (1..
|
154
|
+
raise "ERROR: Invalid precision: #{precision}" unless (1..12).include?(precision)
|
135
155
|
|
136
|
-
sleep_between_hops = opts[:sleep_between_hops] ||= 0
|
156
|
+
sleep_between_hops = opts[:sleep_between_hops] ||= 0
|
137
157
|
sleep_between_hops = sleep_between_hops.to_f
|
138
158
|
|
139
159
|
scan_range(
|
data/lib/pwn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.51
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|