mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-03-24 18:16:24 +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) {
|
function core_machine_id($req, &$pkt) {
|
||||||
my_print("doing core_machine_id");
|
my_print("doing core_machine_id");
|
||||||
|
if (is_callable('gethostname')) {
|
||||||
|
# introduced in 5.3
|
||||||
$machine_id = gethostname();
|
$machine_id = gethostname();
|
||||||
|
} else {
|
||||||
|
$machine_id = php_uname('n');
|
||||||
|
}
|
||||||
$serial = "";
|
$serial = "";
|
||||||
|
|
||||||
if (is_windows()) {
|
if (is_windows()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user