Skip to content

Commit 16de745

Browse files
committed
Minor code cleanups/corrections.
1 parent f4a720a commit 16de745

File tree

8 files changed

+8
-39
lines changed

8 files changed

+8
-39
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,4 @@ and their argument syntax. These methods will become available as command line
128128
within the hardware bridge.
129129

130130
For a simple example of a custom method see auxiliary/server/local_hwbridge for a more complete
131-
list on how to define custom methods see the [API Reference](http://api.hwbridge.reference.rapid7.com)
131+
list on how to define custom methods see the [API Reference](http://opengarages.org/hwbridge).

lib/msf/base/sessions/hwbridge.rb

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -174,32 +174,6 @@ def shell_init
174174
return true
175175
end
176176

177-
# #
178-
# # Read from the command shell.
179-
# #
180-
# def shell_read(length = nil)
181-
# if length.nil?
182-
# rv = rstream.get
183-
# else
184-
# rv = rstream.read(length)
185-
# end
186-
# return rv
187-
# end
188-
#
189-
# #
190-
# # Writes to the command shell.
191-
# #
192-
# def shell_write(buf)
193-
# rstream.write(buf)
194-
# end
195-
#
196-
# #
197-
# # Closes the shell.
198-
# #
199-
# def shell_close()
200-
# rstream.close
201-
# end
202-
203177
attr_accessor :console # :nodoc:
204178
attr_accessor :alive # :nodoc:
205179
private

lib/msf/core/post/hardware/automotive/uds.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ def get_engine_coolant_temp(bus, srcId, dstId)
206206
return {} if packets == nil
207207
return packets if packets.has_key? "error"
208208
return packets if not packets.has_key? "Packets"
209-
celcious = packets["Packets"][0]["DATA"][3].hex - 40
210-
fahrenheit = celcious * 9/5 + 32
211-
packets["TEMP_C"] = celcious
209+
celsius = packets["Packets"][0]["DATA"][3].hex - 40
210+
fahrenheit = celsius * 9/5 + 32
211+
packets["TEMP_C"] = celsius
212212
packets["TEMP_F"] = fahrenheit
213213
packets
214214
end

lib/rex/post/hwbridge/client.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def get_custom_methods
8181
# if a matching extension alias exists for the supplied symbol.
8282
#
8383
def method_missing(symbol, *args)
84-
#$stdout.puts("method_missing: #{symbol}")
8584
self.ext_aliases.aliases[symbol.to_s]
8685
end
8786

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Console::CommandDispatcher::Automotive
1919
def commands
2020
all = {
2121
'supported_buses' => 'Get supported buses',
22-
'busconfig' => 'Get buad configs',
22+
'busconfig' => 'Get baud configs',
2323
'connect' => 'Get HW supported methods for a bus',
2424
'cansend' => 'Send a CAN packet'
2525
}
@@ -32,9 +32,6 @@ def commands
3232
}
3333

3434
# Ensure any requirements of the command are met
35-
# all.delete_if do |cmd, _desc|
36-
# reqs[cmd].any? { |req| !client.commands.include?(req) }
37-
# end
3835
all
3936
end
4037

modules/auxiliary/client/hwbridge/connect.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def initialize(info={})
3838
'SessionTypes' => [ 'hwbridge' ],
3939
'References' =>
4040
[
41-
[ 'URL', 'http://api.hwbridge.reference.rapid7.com' ] # TODO
41+
[ 'URL', 'http://opengarages.org/hwbridge' ] # TODO
4242
],
4343
}
4444
))

modules/post/hardware/automotive/malibu_overheat.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class MetasploitModule < Msf::Post
1010

1111
def initialize(info={})
1212
super( update_info( info,
13-
'Name' => 'Sample Module to Flood Temp Guage on 2006 Malibu',
13+
'Name' => 'Sample Module to Flood Temp Gauge on 2006 Malibu',
1414
'Description' => %q{ Simple sample temp flood for the 2006 Malibu},
1515
'License' => MSF_LICENSE,
1616
'Author' => ['Craig Smith'],

tools/hardware/elm327_relay.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
####
1111
# This module requires a connected ELM327 or STN1100 is connected to
1212
# the machines serial. Sets up a basic RESTful web server to communicate
13-
# Requers MSF and the serialport gem
13+
# Requires MSF and the serialport gem
1414
####
1515

1616

@@ -150,7 +150,6 @@ def connect_to_device()
150150
exit -2
151151
end
152152
resp = send_cmd("ATZ") # Turn off ECHO
153-
#if resp =~ /ELM327/
154153
if resp =~ /ELM327/
155154
send_cmd("ATE0") # Turn off ECHO
156155
send_cmd("ATL0") # Disble linefeeds

0 commit comments

Comments
 (0)