Land #11107, double negative logic cleanup
commit
aa0c206b4b
|
@ -49,7 +49,7 @@ class Console::CommandDispatcher::Automotive
|
||||||
#
|
#
|
||||||
def cmd_supported_buses
|
def cmd_supported_buses
|
||||||
buses = client.automotive.get_supported_buses
|
buses = client.automotive.get_supported_buses
|
||||||
unless !buses.empty?
|
if buses.empty?
|
||||||
print_line("none")
|
print_line("none")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
|
@ -92,12 +92,6 @@ class MetasploitModule < Msf::Auxiliary
|
||||||
return data
|
return data
|
||||||
end
|
end
|
||||||
|
|
||||||
def valid_response?(data)
|
|
||||||
return false unless !!data
|
|
||||||
return false unless data =~ /500 'yyparse error': command not understood/
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
def on_client_connect(c)
|
def on_client_connect(c)
|
||||||
if action.name == 'STOR'
|
if action.name == 'STOR'
|
||||||
contents = ""
|
contents = ""
|
||||||
|
|
|
@ -65,7 +65,7 @@ class MetasploitModule < Msf::Auxiliary
|
||||||
def get_sessions(response)
|
def get_sessions(response)
|
||||||
session_nos = response.scan(/([0-9]{2,})/)
|
session_nos = response.scan(/([0-9]{2,})/)
|
||||||
|
|
||||||
unless !session_nos.empty?
|
if session_nos.empty?
|
||||||
print_status("Could not detect any sessions")
|
print_status("Could not detect any sessions")
|
||||||
print("\n")
|
print("\n")
|
||||||
return
|
return
|
||||||
|
|
|
@ -93,7 +93,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||||
%Q|sed -e s/NETMASK=.*/NETMASK=#{@netmask_eth0}/ ifcfg-eth0 > ifcfg-eth0.bak|,
|
%Q|sed -e s/NETMASK=.*/NETMASK=#{@netmask_eth0}/ ifcfg-eth0 > ifcfg-eth0.bak|,
|
||||||
%Q|mv -f ifcfg-eth0.bak ifcfg-eth0|,
|
%Q|mv -f ifcfg-eth0.bak ifcfg-eth0|,
|
||||||
%Q|/etc/init.d/network restart|
|
%Q|/etc/init.d/network restart|
|
||||||
] unless not @netmask_eth0
|
] if @netmask_eth0
|
||||||
cmds << %Q|rm /tmp/#{@elfname}.elf| unless target.name =~ /CMD/
|
cmds << %Q|rm /tmp/#{@elfname}.elf| unless target.name =~ /CMD/
|
||||||
|
|
||||||
print_status("Restoring Network Information and Cleanup...")
|
print_status("Restoring Network Information and Cleanup...")
|
||||||
|
|
Loading…
Reference in New Issue