Skip to content

Commit f4a720a

Browse files
committed
Merge branch 'hwbridge' of https://github.com/OpenGarages/metasploit-framework into hwbridge
2 parents 25f6717 + f114d36 commit f4a720a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

documentation/modules/auxiliary/client/hwbridge/connect.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ how to extend your project to integrate it with Metasploit. If you are building
2020
and you are using the [Carloop](https://carloop.io) then the spark-msf-relay library also includes an example app for carloop
2121
that you can simply flash to the device for full support.
2222

23+
2. Generic ELM327: [ebay](http://www.ebay.com/itm/like/221821719820)
24+
2325
## Bluetooth Adapter Connection
2426

2527
Bluetooth HWBridge adapters, depending on the Operating System, may take several additional steps to establish a connection and communications bus.

tools/hardware/elm327_relay.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ class ELM327Relay < Msf::Auxiliary
7070
# @return [Integer] Stop bit
7171
attr_accessor :serial_stop_bits
7272

73+
# @!attribute server_port
74+
# @return [Integer] HTTP Relay server port
75+
attr_accessor :server_port
76+
7377
def initialize(info={})
7478
# Set some defaults
7579
self.serial_port = "/dev/ttyUSB0"
@@ -81,6 +85,12 @@ def initialize(info={})
8185
exit
8286
end
8387

88+
if @opts.has_key? :server_port
89+
self.server_port = @opts[:server_port]
90+
else
91+
self.server_port = 8080
92+
end
93+
8494
super(update_info(info,
8595
'Name' => 'ELM327/STN1100 HWBridge Relay Server',
8696
'Description' => %q{
@@ -100,6 +110,7 @@ def initialize(info={})
100110
'DefaultAction' => 'WebServer',
101111
'DefaultOptions' =>
102112
{
113+
'SRVPORT' => self.server_port,
103114
'URIPATH' => "/"
104115
}))
105116
self.serial_port = @opts[:serial] if @opts.has_key? :serial
@@ -369,6 +380,11 @@ def self.get_parsed_options
369380
options[:serial] = v
370381
end
371382

383+
opt.on('-p', '--port <server_port>',
384+
"(Optional) Sets the listening HTTP server port (Default=8080)") do |v|
385+
options[:server_port] = v
386+
end
387+
372388
opt.on_tail('-h', '--help', 'Show this message') do
373389
$stdout.puts opt
374390
exit

0 commit comments

Comments
 (0)