Land #5598:handle nil or short machine_ids gracefully

bug/bundler_fix
Brent Cook 2015-06-24 19:11:08 -05:00
commit 5c65c58fdf
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
1 changed files with 4 additions and 3 deletions

View File

@ -320,9 +320,10 @@ class ClientCore < Extension
# Normalise the format of the incoming machine id so that it's consistent
# regardless of case and leading/trailing spaces. This means that the
# individual meterpreters don't have to care
mid.downcase!.strip! if mid
return Rex::Text.md5(mid)
# individual meterpreters don't have to care.
# Note that the machine ID may be blank or nil and that is OK
Rex::Text.md5(mid.to_s.downcase.strip)
end
def transport_remove(opts={})