Category Archives: Computer

Google Chrome Extension 內攔截所有的 url request…

Tweet 之前寫了一個處理 Referer header 的 extension,使用 chrome.experimental.webRequest.onBeforeSendHeaders.addListener 攔截所有的 url 然後處理 Referer header。 之前只需要在 manifest.json 裡面加上 experimental 就可以使用,但是前陣子發現失效。剛剛在「onBeforeSendHeaders listeners aren’t triggering」這個 issue 裡面找到解法:現在需要多加上 <all_urls> 這組權限。

Posted in Browser, Computer, GoogleChrome, Murmuring, Network, Programming, Software, WWW | Tagged , , , | Leave a comment

Ubuntu 11.04 最近一次 kernel 升級後沒聲音…

Tweet 桌機還在用 Ubuntu 11.04,剛剛 apt-get 升級後沒聲音了 (有注意到 kernel 有更新),後來是用「Ubuntu 11.04 – No sound at all」這篇的方法解決: rm -r ~/.pulse ~/.asound* ~/.pulse-cookie sudo rm /etc/asound.conf 重開機後就有聲音了…

Posted in Computer, Linux, Murmuring, OS, Software | Tagged , | Leave a comment

The Pirate Bay (海盜灣) 從 Torrent 檔下載換成 Magnet URI (磁力連結)

Tweet The Pirate Bay 將把 torrent 檔下載方式換成磁力連結:「The Pirate Bay Will Stop Serving Torrents」。 Magnet URI 下載 BitTorrent 檔案其實只是多了一個抓 torrent 檔的步驟:首先先從 Magnet URI 內取得 SHA1 值,然後透過 DHT 抓到 torrent 檔的 metadata,然後後面就可以照舊進行… 至於 DHT 的初次建立,除了可以透過中央式的 router.utorrent.com 取得外,也可以透過其他 torrent 檔案下載所提供的 tracker 找到節點。在取得一批節點後,透過 PEX … Continue reading

Posted in Computer, Murmuring, Network, P2P, WWW | Tagged , , , , , , | 1 Comment

儲存密碼的方式

Tweet 主要是參考「Cryptographic Right Answers」這篇給的建議: Password handling: As soon as you receive a password, hash it using scrypt or PBKDF2 and erase the plaintext password from memory. Do NOT store users’ passwords. Do NOT hash them with MD5. Use a real … Continue reading

Posted in Computer, Murmuring, Network, Security | Tagged , , , , , | 1 Comment

自己編 rTorrent 與 libTorrent…

Tweet Ubuntu 提供的 rTorrent 比較舊,11.04 上面只有 0.8.6 可以用,11.10 則是 0.8.7。目前最新的 stable 是 0.8.9,有支援 magnet uri… 找了 launchpad 上面有沒有人做,看起來是沒有 :/ 因為不想影響到系統舊版的 libTorrent 與 rTorrent,所以裝在自己的 home directory 下。 先安裝 libTorrent,用 ./configure –prefix=/home/gslin/foo 之後用 make 編完後 make install 就可以了,有缺軟體的部份會跳訊息出來,用 apt-get 補上 -dev 版本後再繼續安裝。 … Continue reading

Posted in Computer, Linux, Murmuring, Network, OS, P2P, Software | Tagged , , | Leave a comment

請更新 HP 印表機的韌體…

Tweet HP 發了安全通告「HPSBPI02728 SSRT100692 rev.2 – Certain HP Printers and HP Digital Senders, Remote Firmware Update Enabled by Default」,在安全通告內列出的印表機都有安全問題,「允許遠端安裝未經授權的印表機韌體」,攻擊者可以遠端直接安裝有木馬的韌體: A potential security vulnerability has been identified with certain HP printers and HP digital senders. The vulnerability could be exploited remotely … Continue reading

Posted in Computer, Hardware, Murmuring, Network, Security | Tagged , , , , , | Leave a comment

Akamai 買下 Cotendo…

Tweet Akaiami 的新聞稿先出來了:「December 22, 2011 – Akamai to Acquire Cotendo」,Cotendo 的只有在 Twitter 上看到官方帳號提到 Akamai 的新聞稿。 併購的金額在: Under terms of the agreement, Akamai will acquire all of the outstanding equity of Cotendo in exchange for a net cash payment of approximately … Continue reading

Posted in CDN, Computer, Murmuring, Network, WWW | Tagged , , | Leave a comment

把 Google Plus 的數字 icon 藏起來…

Tweet 那個紅色的數字 icon 還蠻妨礙工作的,到 userscripts.org 上翻一翻,果然有人有寫過了 (雖然是沒幾天前):「Go Away! Google Plus」。 PS:隨便丟字進去測試的時候,發現 “test” 第五名是 tw.yahoo.com,這是怎麼了…?

Posted in Browser, Computer, Firefox, GoogleChrome, Murmuring, Network, Social, Software | Tagged , , , , , | Leave a comment

gitolite 的 hook…

Tweet 弄了整個週末的 gitolite,總算是把 hook 搞定。 簡單的說,修改完 ~/.gitolite/hooks/common/ 裡的 hook script 後,需要下 gl-setup 指令,這個指令會把現在所有的 git repository 內的 hook script 再 symbolic link 一次。 另外,gitolite 的環境變數可能會影響 git 本身執行 (我是在 git pull -v 更新某個目錄下的 git repository 時失敗),這時可以用 /usr/bin/env -i /usr/local/bin/git 確保 git 執行時不會被環境變數影響… … Continue reading

Posted in Computer, Murmuring, Network, Software | Tagged , , , | Leave a comment

如果要自己寫 TOTP 的幾個要看的東西…

Tweet 整理下來: HOTP: An HMAC-Based One-Time Password Algorithm TOTP: Time-Based One-Time Password Algorithm KeyUriFormat – google-authenticator – The format of URIs containing encoded keys – Two-step verification – Google Project Hosting 有玩過 HMAC 的人,讀這些文件應該不難… TOTP 在預設的情況下,其實就是 HMAC-SHA-1 後取後面 32bits,然後轉成數字取 100000 … Continue reading

Posted in Computer, Murmuring, Network, Programming, Security, Software | Tagged , , , , , , , | Leave a comment