guake , 一個 quake like 的 terminal, 只能說好用而已. 不過 9.04 apt soure 裡的版本(0.3.x), 設定 hotkey 有問題, 無法正常辨識 keyboard. 所以從 getdeb.net 下載安裝.wget http://old.getdeb.net/download/4288/0
sudo dpkg -i guake_0.4.0-1~getdeb1_i386.deb
| [+/-] |
guake in ubuntu 9.04 |
| [+/-] |
pps totem in ubuntu 9.04
poster:
MarlboroMoo on
20:15
/
Comments: (0)
|
在 ubuntu 9.04 裡收看 ppstream 的節目, 使用 pps totem, 一個對岸同胞寫的 totem plugin.
- 加入 ppa 的 source list.
sudo echo '### pps totem
deb http://ppa.launchpad.net/portis25/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/portis25/ppa/ubuntu karmic main' >> /etc/apt/sources.list - 安裝.
sudo apt-get update
sudo apt-get install totem-pps - 啟動 totem 做以下設定: 選擇 "編輯(E) -> 外掛程式...", 勾選 "PPStream browser", 並按下 "設定(O)", 勾選 "Show Posters".
- 回到 totem 主畫面, 按下 F9, 右上方的下拉式選單選擇 "PPStream", 開始收看吧 ;D
| [+/-] |
create cd/dvd iso in ubuntu 9.04 |
建立 iso 最簡單的方式單然是用 dd 啦, 不然用 cat 也可以! dd if=/dev/cdrom of=/tmp/whatever.iso
cat /dev/cdrom > /tmp/whatever.iso
不過今天看到有人說這些方法都不好, 因為沒有辦法即時驗證 or 修復檔案, 原文如下:
Many like to use 'dd' for creating CD/DVD iso images. This is bad. Very那就按照以下步驟使用 readom 吧:
bad. The reason this is, is 'dd' doesn't have any built-in error
checking. So, you don't know if you got all the bits or not. As such, it
is not the right tool for the job. Instead, 'reaom' (read optical media)
from the wodim package is what you should be using. It has built-in
error checking. Similarly, if you want to burn your newly creating ISO,
stay away from 'dd', and use:
wodim -v -eject /path/to/image.iso
- 取得 readom, 位於 wodim 套件裡.
sudo apt-get install wodim - 確定 cd/dvd rom 的 device 沒有被 mount 起來.
umount /media/cdromX - 建立 iso.
readom dev=/dev/cdrom f=/tmp/whatever.iso
ref: this, this & this.
| [+/-] |
emesene in ubuntu 9.04 |
emesene 是在 ubuntu 裡可以取代 msn 的好 IM, 不過在 1.5 版之前有一個令人無法忍受的 bug, 在捲動聯絡人清單的時候很卡, 有時還會 hang 住 or 造成 cpu 的 loading, 不過 offical site 上面並沒有提供 9.04 的 deb 檔, 如果不想自己編譯 tarball, 就按照以下方法更新到 B.J. Stobiecki 維護的1.5 Weekly SVN build 吧.
- 新增 apt source list.
sudo echo '### emesene 1.5 from B.J. Stobiecki
deb http://ppa.launchpad.net/bjfs/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/bjfs/ppa/ubuntu jaunty main' >> /etc/apt/sources.list - 安裝.
sudo apt-get update
sudo apt-get install emesene - finish.
ref: this.
| [+/-] |
ssh tunnel with proxychains in ubuntu 9.04
poster:
MarlboroMoo on
19:49
tag:
proxy,
ssh tunnel,
ubuntu
/
Comments: (0)
|
如果想要讓所有的應用程式都使用 proxy or ssh tunnel, 可以透過使用 proxychains 來達成, 目前支援 HTTP, SOCKS4 and SOCKS5 的 proxy servers(HTTP proxy server 在某些應用程式, 例如 curl 中會出現 "access denied" 的 error, 用 SOCKS4 & SOCKS5 則一切正常).
安裝並使用 proxychains
- 使用 apt-get install 來安裝 proxychains
sudo apt-get install proxychains - 編輯 proxychains 設定檔: /etc/proxychains.conf, 將其中的 chain 型態改為 dynamic_chain, 並於設定檔最下方加入你的 proxy server(可以有多個), 如果 proxy server 需要帳號密碼, 直接寫在 proxy server 後方, 並以空格分開.
sudo vi /etc/proxychains.conf設定檔範例如下:...
...
dynamic_chain
#strict_chain
#random_chain
...
...
http proxy.hinet.net 80
http proxy.hack.net hack iamhack # username = hack , password= iamhack - 以下列的方法啟動你的應用程式, 以 curl 為例.
proxychains firefox如果覺得每個程式要這樣啟動很麻煩, 也可以直接啟動一個 shell, 只要在這 shell 裡執行程式都可以使用 proxy.proxychains bash
- 建立 ssh tunnel.
ssh -fND 6666 root@remote_host -p 80 - 將 ssh tunnel 加入 proxychains 的 proxy list 中.
echo 'socks4 127.0.0.1 6666' >> /etc/proxychains.conf - 執行程式.
proxychains wget www.google.com.tw
ref: this, this & this.
| [+/-] |
ssh tunnel with openssh on linux box
poster:
MarlboroMoo on
19:35
tag:
linux,
ssh tunnel
/
Comments: (0)
|
在 linux 底下翻牆啦!
- reverse tunnel: 從家中主機連回公司的主機, 或是 firewall 只有 allow 單向 ssh 的狀況, 由目的主機主動建立 ssh tunnel.
#. on destination server (office host or firewall allow host)
ssh -fNR 9999:127.0.0.1:22 root@target_host -p 22
#. on target server (home host or firewall deny host)
ssh root@127.0.0.1 -p 9999 - dynamic application-level port forwarding: 被鎖 port 了, 先在牆的另外一邊搞一個ssh service port 在 80 的主機, 只要應用程式能使用 proxy 並且支援 socks 的, 將 socks server 指向 127.0.0.1:9999, 都可以用這個 ssh tunnel 翻.
ssh -fND 9999 root@remote_host -p 80 - combind 上述兩種 tunnel, 使被鎖 port 也無法上網的主機翻牆, 記得於應用程式內將 socks server 指向 127.0.0.1:8888, type 選擇 socks4.
#. on destination server (firewall allow host)
ssh -fNR 9999:127.0.0.1:22 root@target_host -p 22
#. on target server (firewall deny host)
ssh -fND 8888 root@127.0.0.1 -p 9999
| [+/-] |
decrypt Coldfusion datasource passwords
poster:
MarlboroMoo on
21:08
tag:
code,
coldfusion,
decrypt
/
Comments: (0)
|
coldfusion mx7 or mx8 中 data source(neo-query.xml)的 password, 是加密過的(base64 & des-ede3), 不過可以透過 openssl 來解密.echo 'encrypted-passowrds-string' | openssl des-ede3 -a -d \順手寫了一個小 script, 用來 parser neo-query.xml 取出 data source name, jdbc, username, password.
-K 30794A21403124723870304C4072312436794A214031726A \
-iv 30794A2140312472
ref: this.