Fix an error condition with the afp server info module

Better exception handling is probably needed for the entire thing
unstable
David Maloney 2012-04-30 18:29:01 -05:00
parent 5fec29e6b7
commit 82b8042d2d
1 changed files with 6 additions and 1 deletions

View File

@ -234,7 +234,12 @@ module Exploit::Remote::AFP
network_addresses = read_array(body, network_addresses_offset, true) network_addresses = read_array(body, network_addresses_offset, true)
parsed_data[:network_addresses] = parse_network_addresses(network_addresses) parsed_data[:network_addresses] = parse_network_addresses(network_addresses)
# skiped directory names # skiped directory names
parsed_data[:utf8_server_name] = read_utf8_pascal_string(body, utf8_servername_offset) #Error catching for offset issues on this field. Need better error ahndling all through here
begin
parsed_data[:utf8_server_name] = read_utf8_pascal_string(body, utf8_servername_offset)
rescue
parsed_data[:utf8_server_name] = "N/A"
end
return parsed_data return parsed_data
end end