網路日記

2009年9月29日 星期二

2 present continuous

(1)
現在正在繼續進行中的動作
I am writting a letter.
It's getting dark.

2009年9月27日 星期日

1 present simple

(1)
現在事實 狀態 動作
I am a student.
John teaches English.
I take this one.

(2)
經常性 習慣性的動作
every, always, usually,
often, sometimes, seldom
I go to church on Sundays.
I usually get up at six o'clock.
He seldom comes here.

(3)
不變真理 事實 格言
The earth is round.
The sun rises in the east.
We see with our eyes.
Where there is a will, there is a way.

(4)
Here/There 起始的感嘆句
Here/There + 人稱代名詞 + V !
Here/There + V + N !
Here you are!
There he goes!
There goes the bell!

(5)
少數動詞未來時間連用時可代替未來式
go, come, leave, arrive, begin,start, be
I (start/leave) tomorrow evening.
The plane takes off at six past five.
Tomorrow is(=will be) Sunday.

(6)
時間條件副詞子句中,代替未來式
I will let you know as soon as I hear from him.
If it is fine tomorrow, he will come.
We shall not begin the discussion until he arrives.

(7)
在口語中可代替現在完成式
find,hear,tell,forget
I hear(=have heard) that he is ill.
I forget(=have forgotten) his name.
I find(=have found) my book at last.

2009年9月20日 星期日

動詞時態

狀態
時間
simple
continuous
perfect
perfect continuous
present
1does; do
2am/is/are + doing
3has/have + done
4has/have + been doing
past
5did
6was/were + doing
7had done
8had been doing
future
9shall/will + do
10shall/will + be doing
11shall/will + have done
12shall/will + been doing
funture in the past
13should/would + do
14should/would + be doing
15should/would + have done
16should/would + been doing

2007年11月16日 星期五

一些指令的筆記

www.kame.net 2001:200:0:8002:203:47ff:fea5:3085
2001:200:0:8000::42

a.dns.tw 2001:cd8:800:0:0:0:0:8
d.dns.tw 2001:c50:ffff:1::230

hostap 004005AF0E5B
USB 0090CCD851B8
DWL-520 004005AF0E63

192.168.92.3 fe80::385c:d257:1def:87b9
192.168.92.9 fe80::2063:3752:4d94:6f7d

ntpdate time.stdtime.gov.tw

../sbin/cgatool -v -a fe80::306a:5fda:3f95:af04 -D myder

2007年11月12日 星期一

error: linux/config.h: No such file or directory

To avoid that, we simply create that config.h file now:

touch /usr/src/kernels/`uname -r`-i686/include/linux/config.h

2007年6月26日 星期二

FC6 裝 atheros 5211 driver

Installing Atheros Cards (madwifi-ng drivers)

 

 

NOTE: There are issues with the new 2.6.19 kernel, this build only works with the 2.6.18 kernel (see troubleshooting)

 

 

Download madwifi-0.9.2.1.tar.gz from http://madwifi.org/ to /root

Download madwifi-ng-r1886.patch from http://patches.aircrack-ng.org/madwifi-ng-r1886.patch  to /root

tar zxvf madwifi-0.9.21.tar.gz

cd madwifi-0.9.2.1

ln -s /usr/src/kernels/2.6.18-1.2849.fc6-i686/include/config/i2o/config.h   /usr/src/kernels/2.6.18-1.2849.fc6-i686/include/linux/config.h 

NOTE: the above 'ln -s' command is all entered on the same line!

export KERNELPATH=/usr/src/kernels/2.6.18-2849.fc6-i686

NOTE: You may have to replace the kernel version listed above (2.6.18-1.2849.fc6-i686) to your particular version if you are running a different kernel version.

patch -Np1 -i ../madwifi-ng-r1886.patch

make

make install

If prompted:

 

If you are installing new MadWifi modules, you should consider removing those

already installed, or else you may experience problems during operation.

Remove old modules?

[l]ist, [r]emove, [i]gnore or e[x]it (l,r,i,[x]) ?

choose 'r' to remove

modprobe ath_pci

Installation is now complete.

 

iwconfig should now confirm the card is installed: wifi0 and ath0 (See madwifi-ng commands)

 

Providing kismet is installed, and configured correctly (See: Kismet Installation guide)

 

Kismet should start by typing: kismet

 

NOTE: ensure kismet.conf is configured correctly 'source=madwifi_b,wifi0,madwifi')

 

 

To set the card into monitor mode use either:

 

airmon-ng start ath0 [channel] from the aircrack-ng suite

 

or

 

ifconfig ath0 down


wlanconfig ath0 destroy

 

wlanconfig ath0 create wlandev wifi0 wlanmode monitor from the madwifi commands

[@more@]

如何安裝 SEND 0.2 on Fedora6

SEND project : http://www.docomolabs-usa.com/lab_opensource.html

DoCoMo's SEND is implemented completely in user space, so it is portable and lends itself to experimentation. It currently runs on Linux (tested on 2.6 kernels) and FreeBSD (tested on 5.4).

[@more@]

 We have tested SEND on a number of 2.6.x kernels, on a number of
major distributions: Fedora Core 2 – 4, Ubuntu 5.10, and SUSE 10.0.
It should work on any distribution running a correctly configured
2.6.x kernel.

Your kernel must have the following enabled:
• CONFIG_NETFILTER
• CONFIG_IPV6
• CONFIG_IP6_NF_QUEUE
• CONFIG_IP6_NF_IPTABLES
• CONFIG_IP6_NF_FILTER
• CONFIG_PROC_FS

還好 Fedora 6 都有支援不需重編 kernel

Additionally, you need to ensure that the netfilter iptables user
space utilities are installed (check for the ip6tables command), and
that you have the netfilter libipq development library and headers
installed. Check your distribution's package repository, or download
the source from http://www.netfilter.org/.

SEND on Linux uses netfilter's IP queuing mechanism to capture and
reinject packets. Before sendd runs, you need to ensure that the
appropriate netfilter rules are in place. After installation, you
will find the scripts “sendd” and “snd_upd_fw” in /etc/init.d. You
should use /etc/init.d/sendd to start sendd by default. If you want
to run sendd directly from the command line, add the necessary rules
with /etc/init.d/snd_upd_fw add. When done, you can remove the rules
with /etc/init.d/snd_upd_fw del.

/etc/init.d/snd_upd_fw add

用來設定 ip6tables 的規則,讓 Neighbor Discovery 的封包先進到 Queue 裡面

1. 安裝相關的套件
2. 編輯 Makefile.config
    make
    make install
3. 設定 SEND

裝完後有三個執行檔

senddThe SEND daemon
cgatoolTool for configuring CGAs
ipexttoolTool for configuring PKIX IP certificate extensions

1. 安裝相關的套件

‧ libcrypto 0.9.7 or greater, library and development headers
‧ GNU make
‧ GCC (tested with 3.3.2 – 4.0.0)
‧ lex
‧ yacc
‧ optional: libreadline, ncurses libraries and development headers.

# yum install iptables-devel ip6tables-devel readline readline-devel ncurses ncurses-devel

2. 編輯 Makefile.config

OS=linux
prefix=/usr/local/send-0.2
DEBUG_POLICY= DEBUG #會把錯誤訊息顯示出來,不然要到 /var/log/messages 看

make 完 沒有錯的話就成功了
再來 make install 會因為 find_ip6tables.sh 無法執行而失敗

# make
# chmod +x sendd/os/find_ip6tables.sh
# make install

3. 設定 SEND

   3.1. Generate CGA parameters and a CGA

   3.2. Configure sendd. 

# ../sbin/cgatool --gen -R 1024 -k mykey.pem -p fe80:: -o myder1 -s 1
# ../sbin/cgatool -g -k mykey.pem -o myder2 -p fe80:: -s 1

params.conf

# Some (somewhat nonsensical) examples

named default {
        snd_cga_params /usr/local/send-0.2/etc/myder;
        snd_cga_priv /usr/local/send-0.2/etc/mykey.pem;
        snd_cga_sec 1;
}

address fe80::207e:78a7:edca:c81e {
        use default;
        interface eth1;
}

sendd.conf

#
# Non-optional
#

# The path of the file containing this host's CGA parameters
# configuration file
# <no default>
snd_cga_params=/usr/local/send-0.2/etc/params.conf

#
# Optional
#
snd_debugs=sendd:cert,sendd:proto

 

# modprobe ip6_queue
# ip6tables -F
# /etc/init.d/snd_upd_fw add
# ../sbin/sendd -c sendd.conf -i eth1 -f