/*
* etc.passwd.inc v1.0
*
* Syntax:
* verifypasswd(string USERNAME, string PASSWORD)
*
* The function will return one of three values:
* -2 if there was a file reading error
* -1 if the password is incorrect
* 0 if the username doesn’t exist
* 1 if the password is correct
*
* Written by WarMage ( [email protected] )
*
*/
function verifypasswd ($USERNAME, $PASSWORD) {
$fd = fopen( "/etc/passwd", "r");
$contents = fread($fd, filesize( "/etc/passwd"));
fclose($fd);
if (!$contents) return -2;
$lines = split( "n", $contents);
$passwd = array();
for($count=0;$count
if ($user == $USERNAME) {
break;
}
}
if (!$user) return 0;
$cryptedpass = $pass;
$salt = substr($cryptedpass,0,2);
$Pass = crypt($PASSWORD,$salt);
if ($Pass == $cryptedpass) {
return 1;
} else {
return -1;
}
}
?>
广发证券与HashKey在香港推出代币化证券 助力城市推进加密雄心
买入区域已激活:加密货币抛售后,山寨币蓄势待发
马斯克Neuralink发布会震撼来袭:七人已植入脑机介面改变人生、下一步终结盲人,超狂路线图公开
为什么花140美元买Solana,而Kaanch只要0.64美元?(限时优惠)
随着山寨币势头回升,当前最值得关注的三大预售加密货币——其中一款已筹集超3亿美元
首席软件工程师表示,Ripple技术上并不持有380亿XRP代币