1
mirror of https://github.com/rapid7/metasploit-payloads synced 2024-11-20 14:39:22 +01:00

Don't call gethostname if it doesn't exist

This commit is contained in:
James Lee 2015-09-09 09:14:34 -05:00
parent 6037ce1b1c
commit 866c46d310
No known key found for this signature in database
GPG Key ID: 2D6094C7CEA0A321

View File

@ -445,7 +445,12 @@ function get_hdd_label() {
function core_machine_id($req, &$pkt) {
my_print("doing core_machine_id");
if (is_callable('gethostname')) {
# introduced in 5.3
$machine_id = gethostname();
} else {
$machine_id = php_uname('n');
}
$serial = "";
if (is_windows()) {