August 2003 Archives

Busybox 1.0 的 httpd

| | Comments (2)

強到沒力! 用 busybox 1.0 , 基本系統全部搞定
http 還有 cgi 功能
基本用法: httpd -h /documentroot -c /etc/httpd.conf

/*
* httpd implementation for busybox
*
* Copyright (C) 2002,2003 Glenn Engel
* Copyright (C) 2003 Vladimir Oleynik
*
* simplify patch stolen from libbb without using strdup
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*****************************************************************************
*
* Typical usage:
* for non root user
* httpd -p 8080 -h $HOME/public_html
* or for daemon start from rc script with uid=0:
* httpd -u www
* This is equivalent if www user have uid=80 to
* httpd -p 80 -u 80 -h /www -c /etc/httpd.conf -r "Web Server Authentication"
*
*
* When a url contains "cgi-bin" it is assumed to be a cgi script. The
* server changes directory to the location of the script and executes it
* after setting QUERY_STRING and other environment variables. If url args
* are included in the url or as a post, the args are placed into decoded
* environment variables. e.g. /cgi-bin/setup?foo=Hello%20World will set
* the $CGI_foo environment variable to "Hello World" while
* CONFIG_FEATURE_HTTPD_SET_CGI_VARS_TO_ENV enabled.
*
* The server can also be invoked as a url arg decoder and html text encoder
* as follows:
* foo=`httpd -d $foo` # decode "Hello%20World" as "Hello World"
* bar=`httpd -e ""` # encode as "<Hello World>"
* Note that url encoding for arguments is not the same as html encoding for
* presenation. -d decodes a url-encoded argument while -e encodes in html
* for page display.
*
* httpd.conf has the following format:
*
* A:172.20. # Allow any address that begins with 172.20
* A:10.10. # Allow any address that begins with 10.10.
* A:10.20 # Allow any address that previous set and 10.200-209.X.X
* A:127.0.0.1 # Allow local loopback connections
* D:* # Deny from other IP connections
* /cgi-bin:foo:bar # Require user foo, pwd bar on urls starting with /cgi-bin/
* /adm:admin:setup # Require user admin, pwd setup on urls starting with /adm/
* /adm:toor:PaSsWd # or user toor, pwd PaSsWd on urls starting with /adm/
* .au:audio/basic # additional mime type for audio.au files
*
* A/D may be as a/d or allow/deny - first char case unsensitive
* Deny IP rules take precedence over allow rules.
*
*
* The Deny/Allow IP logic:
*
* - Default is to allow all. No addresses are denied unless
* denied with a D: rule.
* - Order of Deny/Allow rules is significant
* - Deny rules take precedence over allow rules.
* - If a deny all rule (D:*) is used it acts as a catch-all for unmatched
* addresses.
* - Specification of Allow all (A:*) is a no-op
*
* Example:
* 1. Allow only specified addresses
* A:172.20. # Allow any address that begins with 172.20
* A:10.10. # Allow any address that begins with 10.10.
* A:10.10 # Allow any address that previous set and 10.100-109.X.X
* A:127.0.0.1 # Allow local loopback connections
* D:* # Deny from other IP connections
*
* 2. Only deny specified addresses
* D:1.2.3. # deny from 1.2.3.0 - 1.2.3.255
* D:2.3.4. # deny from 2.3.4.0 - 2.3.4.255
* A:* # (optional line added for clarity)
*
* If a sub directory contains a config file it is parsed and merged with
* any existing settings as if it was appended to the original configuration
* except that all previous IP config rules are discarded.
*
* subdir paths are relative to the containing subdir and thus cannot
* affect the parent rules.
*
* Note that since the sub dir is parsed in the forked thread servicing the
* subdir http request, any merge is discarded when the process exits. As a
* result, the subdir settings only have a lifetime of a single request.
*
*
* If -c is not set, an attempt will be made to open the default
* root configuration file. If -c is set and the file is not found, the
* server exits with an error.
*
*/

FreeBSD 4.9

| | Comments (0)

大概9月中出
http://www.freebsd.org/releases/4.9R/schedule.html

良好的備份

| | Comments (0)

想像一下, 當您的重要資料硬碟全部毀損時, 您的反應是
1. 完了, 沒備份, 畢生心血付之一炬
2. 還好有做備份, 不過是一個月前的資料
3. 還好我每天做備份, 只有損失今天的進度

3 才是良好的備份習慣

unix 下可以用 tar, cp, rsync 配合 crontab 排程做備份工作
Windows 下我推薦一套慣用的備份軟體 SecondCopy
有多樣的備份方式(支援網芳、FTP)及自動排程

備份有幾個要點
1. 要異地備份 同一台電腦需備到不同的 HD 或 MO, 同一顆 HD 不同 partition
的備份是沒有意義的, 現在硬碟不怎麼可靠
2. 使用自動排程 手動備份的話, 就是上面說的 2 狀況, 人是懶惰且健忘的
3. 只備份必要備份的資料 什麼是必要備份的資料?
因人而異, 通常是個人產生的資料, 文件, 程式碼, 而這些資料量都不會很大
相對的, 從網路上就拿得到的東西如軟體, 電影, MP3, 就是不需備份的
4. 定期將個人資料整理, 燒成光碟

目前的儲存煤體可靠度
我認為是 MO > CDR、CDRW > DVD+/-、DVD+/-RW > Compact Flash > HD

starcraft 相關工具

| | Comments (0)

http://www.scindex.com/dls_listing.php?filetype=util
抓回在這
http://ftp.pank.org/starcraft/

Linux Socket Programming

| | Comments (1)

Automatic Private IP Addressing (APIPA)

| | Comments (0)

DNS 查不到?

| | Comments (0)

要兩個 lib
/lib/libnss_dns*
/lib/libresolv*
缺一不可

busybox 1.0 pre release

| | Comments (0)
busybox1.gif
busybox 1.0 與 0.65 比起來, 真是進步很多 menuconfig 介面
整合進tinylogin,udhcp
又多了一些好用的工具如 awk, rpm, unzip, tar 的 gzip 及 bzip2 支援

壓 tar czvf a.tgz files
解 tar zxvf a.tgz -C /tmp


frame buffer

| | Comments (0)

640x480 800x600 1024x768 1280x1024 1600x1200
8 bpp 769 771 773 775 796
16 bpp 785 788 791 794 798
32 bpp 786 789 792 795 799

can not poweroff ?

| | Comments (0)

BIOS 啟用 APM, kernel 有選 APM 支援, 應該就可以 poweroff,
如果不行, 試試在 boot 參數加上 apm=power-off
用 SMP 的話, 通常就要加上面那一行
若還不行, 試試 http://acpi.sourceforge.net/
patch 一下 kernel, 使用 ACPI , 應該就可以 poweroff 了
old patches download

倒楣的兩天

| | Comments (2)

上星期六, 日都和機車擦撞

星期六
在中港路和太原路口, 我走太原路往大墩方向直行, 經過一台機車,
我以為對方要直行, 靠得很近, 所以我有左偏一點, 那台機車還是繼續靠左偏,
結果就擦到我右後門, 事後問那位小姐, 她是要左轉
(那個路口是要待轉的), 還好人沒什麼事, 人沒事最要緊
看她也很可憐, 就算了
結果: 右後門凹陷, 還好沒掉漆

星期日
在精武路要轉三民路口, 我綠燈左轉三民路, 過了福音街,
一台機車衝出來撞我尾巴, 是一位老先生, 還好也沒什麼事,
跟他說下次小心一點, 也就算了
結果: "曼吧"出現一條括痕

bootsplash

| | Comments (0)

http://www.bootsplash.org

patch -p1 < /path/to/bootsplash-3.0.7-2.4.20-vanilla.diff

kernel 勾選
Console drivers --->
Frame-buffer support --->
[*] Use splash screen instead of boot logo

準備 jpeg 跟 silencejpeg
先用 rewritejpeg 處理, make sure is compatible for boot logo
或是
jpegtopnm $file | ppmtojpeg > $newfile

設定檔範例 800x600 (取自 bootsplash theme)

# Pictures provided for Mandrake by me@davidsansome.com
#
# Themed with bootSplashMaker by Stefan Reinauer
# for SuSE Linux, UnitedLinux, SLES8.
#
# current version does not implement progress bar yet.

# config file version (config 版本)
version=2

# should the picture be displayed?
state=1

# fgcolor is the text forground color. (字的前景顏色)
# bgcolor is the text background (i.e. transparent) color. (字的背景顏色)
fgcolor=0
bgcolor=15

# (tx, ty) are the (x, y) coordinates of the text window in pixels.
# tw/th is the width/height of the text window in pixels.
# tx, ty 文字區塊的 x, y 座標 (pixels)
# tw, th 文字區塊的寬跟高 (pixels)
tx=20
ty=50
tw=760
th=530

# (ax, ay) are the (x, y) coordinates for playing boot/shutdown animations
ax=112
ay=30

# name of the picture file (full path recommended)
jpeg=/tmp/Flower/images/bootsplash-800x600.jpg

設定檔範例 640x480

version=3
state=1
fgcolor=7
bgcolor=0
tx=0
ty=0
tw=640
th=480
jpeg=black.jpg
silentjpeg=bbq.jpg

輸出到 initrd
splash -s -f bootsplash.cfg >> /boot/initrd
若 initrd 為 gz 格式也行
splash -s -f bootsplash.cfg >> /boot/initrd.gz

目前 bootsplash 只支援 16bit,
640x480 使用 vga=785
800x600 使用 vga=788
1024x768 使用 vga=791

kernel boot 參數

splash=silent switches the bootsplash to silent mode initially
splash=verbose switches the bootsplash to verbose mode initially. This is default, but if you override the default in the kernel patch, you can use this option to get verbose mode back.
splash=0 switches the bootsplash off

W32.Blaster.Worm

| | Comments (0)

今天有好多朋友的電腦都中毒了

http://www.cert.org/advisories/CA-2003-20.html

症狀: 一直重新開機, 或者IE 說明裡面的版本不見, 無法剪下貼上, 某些超連結沒作用.

方法一: http://securityresponse.symantec.com/avcenter/FixBlast.exe 移除工具
但是修正檔還是要抓!

方法二:

1. 開始=>執行=>輸入 shutdown -a [ENTER]把倒數計時關掉
2. 開始=>執行=>Taskmgr.exe [ENTER] 後, 看一下有沒有MSBLAST.EXE 這個程式, 有就終止掉
3. 到 http://w3.cis92.net/rpc/ 依照作業系統去抓更新程式
2000 => http://w3.cis92.net/rpc/w2k/Windows2000-KB823980-x86-CHT.exe
xp => http://w3.cis92.net/rpc/xp/WindowsXP-KB823980-x86-CHT.exe
4. 拔掉網路線
5. 用檔案總管, 到 C:\windows\system32 底下把 MSBLAST.EXE, 先按右鍵選"內容",
把唯讀取消, 並且把檔案殺掉. (W2000是在 C:\winnt\system32 目錄).
6. 開始=>執行=> regedit.exe [ENTER], 到:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrectVersion\Run
把右邊的 Windows auto update 直接砍掉
7. 執行剛剛抓下來的更新程式
8. 重新開機
9. 接上網路線

--
目前已經有 DCOM RPC 的漏洞被不肖分子所利用, 撰寫出分散式攻擊的程式,
被攻擊的電腦將常駐一個軟體, 不但開啟後門並且自動持續攻擊其他台電腦!!
Symantec 公司將其命名為 W32.Blaster.Worm
網址在:
http://securityresponse.symantec.com/avcenter/venc/data/w32.blaster.worm.html
該蠕蟲作者有計畫地將中毒的電腦於 8/15 開始,持續攻擊 windowsupdate.com 網站。
已經確定全系列的 NT-Based 系統皆受影響.
Windows 2000 從 SP0, SP1, SP2, SP3, SP4 全部受影響.
Windows XP 從 SP0, SP1 全部受影響.
Microsoft Windows NTR 4.0
Microsoft Windows NT 4.0 Terminal Services Edition
Microsoft Windows Server? 2003

!! 怎樣確定自己的電腦已經中毒 ?

* 如果你的電腦動不動就跟你說要重新開機 (60 秒)

* 或是:

[開始]->執行->Taskmgr.exe [ENTER] 後, 看一下有沒有 MSBLAST.EXE 這個
程式正在運作, 如果有, 也表示你已經中毒!

!! 中毒解毒程序: (確定這樣的解法沒有問題)
0 . 開始->執行->CMD.EXE [ENTER] (開啟Command line 視窗)
若系統跟你說要重新開機了, 請輸入shutdown -a [enter] 取消重新開機指令.
1 . 刪除 MSBLAST.EXE 這個 Process (直接在上面按右鍵, 選結束處理程序即可)
2 . 到微軟官方網站抓 DCOM RPC 的漏洞 Patch, 先存到硬碟去.
微軟官方網站:
http://www.microsoft.com/technet/security/bulletin/MS03-026.asp
3 . 拔掉網路線
4 . 用檔案總管, 到 Windows\System32 這個目錄下面找到 MSBLAST.EXE,
按右鍵選內容將唯讀取消掉, 然後把這個程式幹掉.
5 . 開始->執行->regedit.exe , 並且到:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run 下面
將右邊的 "windows auto update" 這個鍵值直接砍掉, 砍掉後關閉登陸編輯程式.
6 . 執行你剛剛所抓下來的 Patch
7 . 重新開機
8 . 接上網路線, 大功告成.
ps. 別忘了,若您的電腦沒有中毒,也請盡快灌 Patch :)

--
作者: chunhan (Hook Club INC.) 看板: nctu.talk
標題: [解除病毒] 重要!! 請大家盡快裝 Patch !! (新版)
時間: Tue Aug 12 09:09:34 2003

目前已經有 DCOM RPC 的漏洞被不肖分子所利用, 撰寫出分散式攻擊的程式,
被攻擊的電腦將常駐一個軟體, 不但開啟後門並且自動持續攻擊其他台電腦!!
目前 Symantec 公司已經將其命名為 W32.Blaster.Worm,美國的網站資料已經
更新,但台灣的網站還沒有。
網址在:
http://securityresponse.symantec.com/avcenter/venc/data/w32.blaster.worm.html

該蠕蟲作者有計畫地將中毒的電腦於 8/15 開始,持續攻擊 windowsupdate.com 網站。
已經確定全系列的 NT-Based 系統皆受影響.
Windows 2000 從 SP0, SP1, SP2, SP3, SP4 全部受影響.
Windows XP 從 SP0, SP1 全部受影響.
Microsoft Windows NTR 4.0
Microsoft Windows NT 4.0 Terminal Services Edition
Microsoft Windows Server? 2003
=========================================
!! 怎樣確定自己的電腦已經中毒 ?
* 如果你的電腦動不動就跟你說要重新開機 (60 秒)
* 或是:
[開始]->執行->Taskmgr.exe [ENTER] 後, 看一下有沒有 MSBLAST.EXE 這個
程式正在運作, 如果有, 也表示你已經中毒!
!! 中毒解毒程序: (確定這樣的解法沒有問題)
0 . 開始->執行->CMD.EXE [ENTER] (開啟Command line 視窗)
若系統跟你說要重新開機了, 請輸入shutdown -a [enter] 取消重新開機指令.
1 . 刪除 MSBLAST.EXE 這個 Process (直接在上面按右鍵, 選結束處理程序即可)
2 . 到微軟官方網站抓 DCOM RPC 的漏洞 Patch, 先存到硬碟去.
微軟官方網站:
http://www.microsoft.com/technet/security/bulletin/MS03-026.asp
我已經 Mirror 一份到 http://w3.cis92.net/rpc/ 下面.
(在交大裡面, 只有 W2K 和 XP)
w2k 裡面的 CHT 表示中文版本, EN 表示英文版本
xp 也是一樣的.
3 . 拔掉網路線
4 . 用檔案總管, 到 Windows\System32 這個目錄下面找到 MSBLAST.EXE,
按右鍵選內容將唯讀取消掉, 然後把這個程式幹掉.
5 . 開始->執行->regedit.exe , 並且到:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run 下面
將右邊的 "windows auto update" 這個鍵值直接砍掉, 砍掉後關閉登陸編輯程式.
6 . 執行你剛剛所抓下來的 Patch
7 . 重新開機
8 . 接上網路線, 大功告成.

--
From: info@ms1.hinet.net
To: pank@ms12.hinet.net
Subject: HiNet緊急安全事件通報(請用戶立即參考本文解決方式,做好防護措施)

危險病毒通告--WORM_MSBLAST.A

摘要:

一隻名為WORM_MSBLASR.A的新型駭客病毒,正透過微軟 Windows 系統的漏洞,
橫掃攻擊全球各地電腦用戶。此次WORM_MSBLASR.A傳染途徑和年初爆發的「 SQL警戒病
毒」
相似,受病毒感染的電腦會利用 Windows系統漏洞採取阻斷服務攻擊 135連接埠中RPC
(remote Procedure Call ) Buffer Overrun的弱點,造成電腦無法正常作業或當機停
擺及網路壅塞
,同時再透過69與4444連結埠去攻擊感染更多的電腦。目前已知在美洲、南美洲、歐洲
與台灣均有
災情陸續傳出,並且造成某些伺服器停擺及企業Intranet網路壅塞無法使用。

影響系統:

Microsoft Windows 2000
Microsoft Windows XP
Microsoft Windows 2003

決解方法:

此病毒是利用Microsoft MS03-026漏洞進行感染、散播。請盡速下載安裝修補程式
(參閱http://www.microsoft.com/taiwan/security/bulletins/MS03-026.asp)。
如果您的電腦受到此蠕蟲感染,可以依下列方式解決。

停止惡意程式 :

1.這個步驟可以終止在記意體中執行的惡意程式.
2.開啟Windows程序管理員(Task Manager),請按鍵盤
CTRL+SHIFT+ESC, 然後點選處理程序(process)標籤.
3.在所有的程序中,找出下列程序名稱:
MSBLAST.EXE  
4.點選此惡意程序,並按下下方的終止程序按鈕.
5.請關閉程序管理員,在開啟一次程序管理員 ,檢查程序是否確實被停止.
6.關閉程序管理員.

移除登入檔的自動啟動程序 :
1.這個步驟從登入檔(registry)中移除自動啟動蠕蟲的程式,以避免開機時自動執行惡
意程式.
2.開啟登入檔編輯程式.請點選 開始>執行, 輸入 Regedit, 然後按下 Enter鍵.
3.在左方的子視窗中, 依下列順序點選:
HKEY_LOCAL_MACHINE>Software>Microsoft>Windows>CurrentVersion>Run
4.在右方的子視窗中,點選並刪除下列的值:
Windows auto update" = MSBLAST.EXE
5.關閉登入檔編輯程式.

安裝修補程式:
請參閱http://www.microsoft.com/taiwan/security/bulletins/MS03-026.asp

參考網站:
賽門鐵克:
http://securityresponse.symantec.com/avcenter/venc/data/w32.blaster.worm.htm
l

趨勢科技:
http://www.trendmicro.com/vinfo/zh-tw/virusencyclo/default5.asp?VName=WORM_M
SBLAST.A

make device ppp

| | Comments (0)

mknod /dev/ppp c 108 0

make device loop

| | Comments (0)

for i in 0 1 2 3 4 5 6 7; do mknod /dev/loop$i b 7 $i; done

M 無線上網

| | Comments (0)

50/hr

[C:\]tracert 168.95.1.1

Tracing route to dns.hinet.net [168.95.1.1]
over a maximum of 30 hops:

1 13 ms 3 ms 3 ms 192.168.199.1
2 46 ms 40 ms 41 ms 100.1.1.9
3 47 ms 41 ms 43 ms 192.168.1.34
4 46 ms 42 ms 42 ms 10.10.0.3
5 48 ms 43 ms 42 ms 192.168.249.41
6 45 ms 43 ms 41 ms 238-254.easy-up.net.tw [211.76.238.254]
7 273 ms 204 ms 204 ms 211.78.151.41
8 57 ms 42 ms 41 ms 211.78.150.69
9 48 ms 43 ms 45 ms 211.78.149.66
10 48 ms 46 ms 43 ms tp-twix-r6.router.hinet.net [211.22.41.238]
11 49 ms 43 ms 44 ms tp-s2-c12r2.router.hinet.net [211.22.32.202]
12 48 ms 44 ms 43 ms tp-s2-c6r9.router.hinet.net [211.22.35.129]
13 51 ms 43 ms 46 ms dns.hinet.net [168.95.1.1]

Trace complete.

airo register interrupt 0 failed, rc -16

| | Comments (0)

http://www.linuxquestions.org/questions/history/48965

--
Possable sollution.

I had a similar problem.

It seems the Aironet cards is 16bit (not Cardbus) you must sellect ISA support in the kernel for the cards to be recognized.
(Under General setup)

Hope it helps.

Regards,
Pieter

--
Wow this is an old thread. I solved the problem by copying the 2.4.19 airo.c code over to the 2.4.20 source and that worked... maybe it is fixed in 2.4.21 but I haven't tried it yet.

加 CONFIG_ISA 支援真的可行!

Linux PPTP

| | Comments (0)

http://www.microsoft.com/ntserver/ProductInfo/faqs/PPTPfaq.asp

http://pptpclient.sourceforge.net/

[root@linux peers]# cat test
# tunnel test, written by pptp-php-gtk $Revision: 1.16 $

# name of tunnel, used to select lines in secrets files
remotename test

# name of tunnel, used to name /var/run pid file
linkname test

# name of tunnel, passed to ip-up scripts
ipparam test

# data stream for pppd to use
pty "pptp 192.168.1.231 --nolaunchpppd"

# domain and username, used to select lines in secrets files
name administrator

# do not require the server to authenticate to our client
noauth

# adopt defaults from the pptp-linux package
file /etc/ppp/options.pptp

# end of tunnel file

[root@linux peers]# /usr/sbin/pppd call test logfd 1 updetach
Using interface ppp0
Connect: ppp0 <--> /dev/pts/1
Looking for secret in /etc/ppp/pap-secrets for client administrator server test
Got client administrator
Got server linux.i
Got client administrator
Got server test
Got secret test
Got auth_addr *
Got client *
Looking for secret in /etc/ppp/chap-secrets for client administrator server test
Got client administrator
Got server *
Got secret *
Got client administrator
Got server linux.i
Got client administrator
Got server test
Got secret test
Got auth_addr *
Got client *
Looking for secret in /etc/ppp/chap-secrets for client administrator server test
Got client administrator
Got server *
Got secret *
Got client administrator
Got server linux.i
Got client administrator
Got server test
Got secret test
Got auth_addr *
Got client *
Remote message: S=0253CC197C534CD8EBB1EFB3F66824AEEA977EAA
local IP address 10.103.19.203
remote IP address 10.103.19.201
primary DNS address 168.95.1.1
secondary DNS address 168.95.192.1

xcin 更新預設輸入法

| | Comments (0)

edit /etc/chinese/xcin/xcinrc

(define zh_TW
'((DEFAULT_IM "cj")

(define zh_TW.Big5
'((DEFAULT_IM "cj")

March 2008

Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          

About this Archive

This page is an archive of entries from August 2003 listed from newest to oldest.

July 2003 is the previous archive.

September 2003 is the next archive.

Find recent content on the main index or look in the archives to find all content.