We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 29a5194 + 24a6e4c commit 5c65c58Copy full SHA for 5c65c58
lib/rex/post/meterpreter/client_core.rb
@@ -320,9 +320,10 @@ def machine_id(timeout=nil)
320
321
# Normalise the format of the incoming machine id so that it's consistent
322
# regardless of case and leading/trailing spaces. This means that the
323
- # individual meterpreters don't have to care
324
- mid.downcase!.strip! if mid
325
- 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
326
+ Rex::Text.md5(mid.to_s.downcase.strip)
327
end
328
329
def transport_remove(opts={})
0 commit comments