8) { return false; } $pwd1=$pass; $esi=8; $pwd2=array(null,null,null,null,null,null,null,null); $p1=0; $p2=0; $edx=""; for($i=0;$i<8;$i++) { if(ord($pwd1[$p1]) & 1) { $edx = ord($pwd1[$p1]) << 1; $edx &= ord($pwd1[$esi]); } else { $edx = ord($pwd1[$p1]) ^ ord($pwd1[$esi]); } $pwd2[$p2] = $edx; $p2++; $esi--; $p1++; } $WOL_HASH_CHAR = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; $p1 = 0; $p2 = 0; for($i=0;$i<8;$i++) { $edx = $pwd2[$p2] & 0x3f; $p2++; $pwd1[$p1] = $WOL_HASH_CHAR[$edx]; $p1++; } return $pwd1; } ?>