Land #11107, double negative logic cleanup

GSoC/Meterpreter_Web_Console
William Vu 2018-12-11 20:29:53 -06:00
commit aa0c206b4b
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
4 changed files with 3 additions and 9 deletions

View File

@ -49,7 +49,7 @@ class Console::CommandDispatcher::Automotive
#
def cmd_supported_buses
buses = client.automotive.get_supported_buses
unless !buses.empty?
if buses.empty?
print_line("none")
return
end

View File

@ -92,12 +92,6 @@ class MetasploitModule < Msf::Auxiliary
return data
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)
if action.name == 'STOR'
contents = ""

View File

@ -65,7 +65,7 @@ class MetasploitModule < Msf::Auxiliary
def get_sessions(response)
session_nos = response.scan(/([0-9]{2,})/)
unless !session_nos.empty?
if session_nos.empty?
print_status("Could not detect any sessions")
print("\n")
return

View File

@ -93,7 +93,7 @@ class MetasploitModule < Msf::Exploit::Remote
%Q|sed -e s/NETMASK=.*/NETMASK=#{@netmask_eth0}/ ifcfg-eth0 > ifcfg-eth0.bak|,
%Q|mv -f ifcfg-eth0.bak ifcfg-eth0|,
%Q|/etc/init.d/network restart|
] unless not @netmask_eth0
] if @netmask_eth0
cmds << %Q|rm /tmp/#{@elfname}.elf| unless target.name =~ /CMD/
print_status("Restoring Network Information and Cleanup...")