Skip to content

Commit 6a686a2

Browse files
committed
Land rapid7#8742, HWBRIDGE RFTRANSCEIVER ADD LOWBALL SUPPORT
2 parents 1fa0df6 + 3043218 commit 6a686a2

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

lib/msf/core/post/hardware/rftransceiver/rftransceiver.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,16 @@ def max_power
278278
return_success(r)
279279
end
280280

281+
#
282+
# Sets lowball. Ensure you set the frequency first before using this
283+
# @return [Boolean] success value
284+
def set_lowball
285+
return false unless is_rf?
286+
self.index ||= 0
287+
r = client.rftransceiver.set_lowball(self.index)
288+
return_success(r)
289+
end
290+
281291
#
282292
# Set power level
283293
# @param level [Integer] Power level

lib/rex/post/hwbridge/extensions/rftransceiver/rftransceiver.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ def set_number_preamble(idx, num)
186186
client.send_request("/rftransceiver/#{idx}/set_number_preamble?num=#{num}")
187187
end
188188

189+
def set_lowball(idx)
190+
client.send_request("/rftransceiver/#{idx}/set_lowball")
191+
end
192+
189193
def set_maxpower(idx)
190194
client.send_request("/rftransceiver/#{idx}/set_maxpower")
191195
end

lib/rex/post/hwbridge/ui/console/command_dispatcher/rftransceiver.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def commands
3434
'deviation' => 'sets the deviation',
3535
'sync_word' => 'sets the sync word',
3636
'preamble' => 'sets the preamble number',
37+
'lowball' => 'sets lowball',
3738
'power' => 'sets the power level',
3839
'maxpower' => 'sets max power'
3940
}
@@ -528,6 +529,20 @@ def cmd_preamble(*args)
528529
print_success(r)
529530
end
530531

532+
def cmd_lowball_help
533+
print_line("Lowball is frequency dependent. Set frequency first")
534+
end
535+
536+
def cmd_lowball(*args)
537+
self.idx ||= 0
538+
if args.length.positive?
539+
cmd_lowball_help
540+
return
541+
end
542+
r = client.rftransceiver.set_lowball(idx)
543+
print_success(r)
544+
end
545+
531546
def cmd_maxpower_help
532547
print_line("Max power is frequency dependent. Set frequency first")
533548
end

0 commit comments

Comments
 (0)