Archive for February 2008

Protected: [歌詞] 我懷念的

This post is password protected. To view it please enter your password below:


Protected: [歌詞] 非賣品

This post is password protected. To view it please enter your password below:


Protected: [歌詞] 日不落

This post is password protected. To view it please enter your password below:


Protected: [歌詞] 只要再看你一眼

This post is password protected. To view it please enter your password below:


Protected: [歌詞] 這天

This post is password protected. To view it please enter your password below:


Protected: [歌詞] 我不配

This post is password protected. To view it please enter your password below:


Protected: [歌詞] 彩虹

This post is password protected. To view it please enter your password below:


Protected: [歌詞] 不能說的秘密

This post is password protected. To view it please enter your password below:


Protected: [歌詞] 晴天娃娃

This post is password protected. To view it please enter your password below:


Protected: [歌詞] 是你是你

This post is password protected. To view it please enter your password below:


windows 下 delete by owner 的 tool

網路上有人寫了這樣的 command line 下的 TOOLS 造福人類:

Continue reading ‘windows 下 delete by owner 的 tool’ »

CISCO 2950 switch 把它設成 2 VLAN , port monitor

Howto setup a PPTP server behind firewall

把外面 VPN connection redirect 進內網的 VPN server (PPTP) 的 iptables rules Continue reading ‘Howto setup a PPTP server behind firewall’ »

SQUID transparent proxy

 SQUID 2.6.STABLE3 的 transparent proxy 設定
Continue reading ‘SQUID transparent proxy’ »

改 fd_set

Solaris 時進入文字模式或 Windows 模式

把 Solaris 在開機後使用文字模式

/usr/dt/bin/dtconfig -d

若 想把 Solaris 在開機後使用Windows模式

/usr/dt/bin/dtconfig -e

查表法 , PHP 把 array 存進 file

好處是, 下次直接把檔讀進 array 立即可查詢, 如果資料不常改變, 查詢頻率普通時用

Continue reading ‘查表法 , PHP 把 array 存進 file’ »

用 innerHTML switch 不同 content

<div id=”ttt” style=”display:none”>
藏起來的 div
</div>
<div id=”qqq”>
這邊要換成 …..
</div>

<a href=”javascript:void show();”>ddd</a>
<script language=”javascript”>
function show() {
t=document.getElementById(‘ttt’).innerHTML;
document.getElementById(‘qqq’).innerHTML=t;
return false;
}

</script>

my encode sample

[code language=php]
// my_encode( )
$secret = '11111';

function my_encode($data) {
$data = serialize($data);
$hash = md5($GLOBALS['secret'] . $data);
return array($data, $hash);
}

// my_decode( )
function my_decode($data, $hash) {
if (!empty($data) && !empty($hash)) {
if (md5($GLOBALS['secret'] . $data) == $hash) {
return unserialize($data);
} else {
error_log("Validation Error: Data has been modified");
return false;
}
}
return false;
}

TEST: $secret = '11111';
// Load in and validate old dataif (! $data = my_decode($_GET['data'], $_GET['hash'])) {// crack attempt}// Process form (new form data is in $_GET)// Update $data$data['username'] = $_GET['username'];$data['stage']++;unset($data['password']);// Encode resultslist ($data, $hash) = pc_encode($data);// Store data and hash inside the form?> " method="get">
...
value="">
value="">

[/code]

找 setuid and setgid 的 files

 find / -type f ( -perm -4000 -o -perm -2000 ) -print