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:
parent
6037ce1b1c
commit
866c46d310
@ -445,7 +445,12 @@ function get_hdd_label() {
|
||||
|
||||
function core_machine_id($req, &$pkt) {
|
||||
my_print("doing core_machine_id");
|
||||
$machine_id = gethostname();
|
||||
if (is_callable('gethostname')) {
|
||||
# introduced in 5.3
|
||||
$machine_id = gethostname();
|
||||
} else {
|
||||
$machine_id = php_uname('n');
|
||||
}
|
||||
$serial = "";
|
||||
|
||||
if (is_windows()) {
|
||||
|
Loading…
Reference in New Issue
Block a user