rendered paste body<?php
class mac_gen {
public $hex;
public function __construct() {
$this->hex = str_split('ABCDEF0123456789');
shuffle($this->hex);
$this->hex = array_flip($this->hex);
}
public function main() {
return '00' . ':' . implode(array_rand($this->hex, 2)) . ':' . implode(array_rand($this->hex, 2)) . ':' . implode(array_rand($this->hex, 2)) . ':' . implode(array_rand($this->hex, 2)) . ':' . implode(array_rand($this->hex, 2));
}
}
$mac = new mac_gen;
while(true) {
usleep(0);
echo $mac->main() . "\n";
}
?>