Install ANT on Linux
1.download ant src http://www.apache.org
2.copy to /opt
3.unzip the file and rename to ant
4.vim /etc/profile
add
ANT_HOME=/opt/ant
PATH=$ANT_HOME/bin:$PATH
5.source /etc/profile
6.ant -version
Install ANT on Linux
1.download ant src http://www.apache.org
2.copy to /opt
3.unzip the file and rename to ant
4.vim /etc/profile
add
ANT_HOME=/opt/ant
PATH=$ANT_HOME/bin:$PATH
5.source /etc/profile
6.ant -version
http://blogs.msdn.com/b/spatdsg/archive/2007/11/21/set-wmi-namespace-security-via-gpo-script.aspx
http://community.spiceworks.com/how_to/show/2447
Analyze SD data as below ….
When you call getSD, you will get the data as below
1, 0, 4, 129, 112, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 2, 0, 92, 0, 4, 0, 0, 0,
0, 18, 20, 0, 19, 0, 0, 0,
1, 1, 0, 0, 0, 0, 0, 5, 11, 0, 0, 0,
0, 18, 20, 0, 19, 0, 0, 0,
1, 1, 0, 0, 0, 0, 0, 5, 19, 0, 0, 0,
0, 18, 20, 0, 19, 0, 0, 0,
1, 1, 0, 0, 0, 0, 0, 5, 20, 0, 0, 0,
0, 18, 24, 0, 63, 0, 6, 0,
1, 2, 0, 0, 0, 0, 0, 5, 32, 0, 0, 0, 32, 2, 0, 0,
1, 2, 0, 0, 0, 0, 0, 5, 32, 0, 0, 0, 32, 2, 0, 0,
1, 2, 0, 0, 0, 0, 0, 5, 32, 0, 0, 0, 32, 2, 0, 0
我還是用中文解釋好了
當我們新增一個User 並設定為遠端啟用 enabled 後
SD 的資料會變成
1, 0, 4, 129, 148, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 2, 0, 128, 0, 5, 0, 0, 0,
0, 0, 36, 0, 33, 0, 0, 0,
1, 5, 0, 0, 0, 0, 0, 5, 21, 0, 0, 0, 46, 122, 181, 67, 143, 137, 56, 124, 22, 195, 198, 37, 232, 3, 0, 0,
0, 18, 20, 0, 19, 0, 0, 0,
1, 1, 0, 0, 0, 0, 0, 5, 11, 0, 0, 0,
0, 18, 20, 0, 19, 0, 0, 0,
1, 1, 0, 0, 0, 0, 0, 5, 19, 0, 0, 0,
0, 18, 20, 0, 19, 0, 0, 0,
1, 1, 0, 0, 0, 0, 0, 5, 20, 0, 0, 0,
0, 18, 24, 0, 63, 0, 6, 0,
1, 2, 0, 0, 0, 0, 0, 5, 32, 0, 0, 0, 32, 2, 0, 0,
1, 2, 0, 0, 0, 0, 0, 5, 32, 0, 0, 0, 32, 2, 0, 0,
1, 2, 0, 0, 0, 0, 0, 5, 32, 0, 0, 0, 32, 2, 0, 0
我用紅字標起來有變化的地方
這時候就要來解釋一下為什麼有這樣的變化了
112->148, 92->128 我想就是因為新的資料多了9*4個byte 所以多了36
4->5 就是有原本有四筆資料 後來變五筆
0,0,36,0 指的是新增個這一筆資料多36個byte
33,0,0,0 指的是設定的權限
1, 5, 0, 0, 0, 0, 0, 5, 21, 0, 0, 0, 46, 122, 181, 67, 143, 137, 56, 124, 22, 195, 198, 37, 232, 3, 0, 0, 這一串就是這個Account的SID,
讓我們來對照SID來看
SID = {1, 5, 0, 0, 0, 0, 0, 5, 21, 0, 0, 0, 46, 122, 181, 67, 143, 137, 56, 124, 22, 195, 198, 37, 232, 3, 0, 0};
SIDString = "S-1-5-21-1135966766-2084080015-633783062-1000";
橘色的5表示這個Account的SID的資料佔5*4個byte
紅色的5為什麼標成0,0,0,5 我就不確定了
後面的就是用顏色作對應
1135966766 / 256 =4437370 餘 46 所以第一位就填46
4437370 / 256 = 17333 餘 122 所以第二位就填122
17333 / 256 = 67 餘 181 所以第三位填181
67 / 256 = 0 餘 67 所以第四位就填67
IPv6 IP addresses
IPv6 IP addresses are 128 bits long, compared to IPv4's 32-bit addresses. This gives room for many, many, many, many more addresses.
The number of IPv4 IPs available is 232, or 4,294,967,296. For IPv6, however, the number is 2128, or 340,282,366,920,938,463,463,374,607,431,768,211,456. That's a lot of IPs!
Now that we know the number of IPv6 addresses there are, we can get to the anatomy of the IPv6 address
The anatomy of IPv6 addresses
IPv4 addresses are generally in quad-dot notation, e.g. 192.168.73.200. IPv6 addresses use colons instead of dots and are larger that IPv4 addresses.
A fully qualified IPv6 address takes the format of XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX. An example fully-qualified address is FE80:0000:0000:0000:903A:1C1A:E802:11E4.
Do you see the long string of zeros? With IPv6 addresses, you can compress zeros to shorten the IP address.
You can compress zeros like this: FE80:0:0:0:903A:1C1A:E802:11E4, or like this: FE80::903A:1C1A:E802:11E4. Take note that you can only compress one set of zeros to ::.
Like in this IP: FE80:0000:0000:0000:903A:0000:0000:11E4, there are 2 sets of zeros. You could write it like this: FE80::903A:0:0:11E4, or like this: FE80:0:0:0:903A::11E4, but not like this: FE80::903A::11E4.
IPv6 subnetting
Just knowing how an IP address looks won't help you much when working with IPv6, you also need to know subnetting. You probably know how subnetting works in IPv4, and to make IPv6 subnetting easier, you should understand CIDR.
IPv6 does away with netmasks like 255.255.255.0 and goes to complete classless subnetting.
The smallest subnet available is a /64, which contains 18.4 quintillion IP addresses.
The way a /64 IP address is broken up is the first 64 bits of the IP is the subnet prefix, and the last 64 bits is the interface ID.
The following tables show how the subnet divides the IP address.
Breakout for fully qualified IP | /64 | ||||||
Subnet prefix | Interface ID | ||||||
0000 | 1111 | 2222 | 3333 | 4444 | 5555 | 6666 | 7777 |
Breakout for fully qualified IP | /48 | ||||||
Subnet prefix | Interface ID | ||||||
0000 | 1111 | 2222 | 3333 | 4444 | 5555 | 6666 | 7777 |
Breakout for fully qualified IP | /32 | ||||||
Subnet | Interface ID | ||||||
0000 | 1111 | 2222 | 3333 | 4444 | 5555 | 6666 | 7777 |
Private IPv6 addresses
With the number of IPv6 addresses available, you might think that private IPs are no longer needed. But IPv6 has a few private IP ranges that are not globally routable.
Link-local addresses
Link-local addresses are designed to only be used on a local physical link. They are like IPv4's 169.254.0.0/16 subnet.
In IPv6, the link-local address block is FE80::/10, this means that the subnet prefixes from FE80 to FEB0 are valid for link-local addressing
Link-local addresses are generated by either by converting the network interface's MAC address into a EUI-64 ID, or by generating a random ID.
An example link-local address with a random ID is FE80::903A:1C1A:E802:11E4. This one was generated by Windows 7 with default IPv6 settings.
Site-local addresses - DEPRECATED
Site-local addresses were designed to be used at a site, but they were deprecated in 2004 by RFC3879.
The site-local address block is/was FEC0::/10, spanning from FEC0 to FEF0
Private IP addresses
These addresses are for use in a private network, like IPv4's 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 IP ranges.
The private IP subnet is FD00::/7 with the eighth bit set to 1, so it's effectively FD00::/8. The subnet ranges from FD00 to FDFF.
These addresses have a specific format that you should generally be followed. The format is listed below.
Using the example IP FDC8:BF8B:E62C:ABCD:1111:2222:3333:4444, the breakout is as follows.
Prefix | Global ID | Subnet ID | Interface ID |
FD | C8BF8BE62C | ABCD | 1111:2222:3333:4444 |
An example of simple IPv6 private addresses is our network.
We use the IPv4 subnet 192.168.4.0/23, so and example IP is 192.168.4.120.
For IPv6, we just use FD00::4:120. It's easy to remember because it's derived from the IPv4 address.
This is the breakout of the Private IP:
Prefix | Global ID | Subnet ID | Interface ID |
FD | 0000000000 | 0000 | 0000:0000:0004:0120 |
So obviously the address isn't unique, and the IPv6 task force probably doesn't endorse the use of IPs like this, but for easier IPv4-IPv6 private network conversion, I say it's OK.
It's not like the IP is going to used on the Internet anyway. :)
首先,你得確認自己安裝了winpcap(最好下載一個最新版本:官方下載,然後
(1) 如果你使用的是Linux、Ubuntu系統,請用>$ su Administrator命令切換到擁有最高權限的帳號,
然後再輸入命令:"net start npf"(如果不行自己查找類似命令)。
(2) 如果使用的是windows xp\me,請使用管理員帳號登錄,然後打開cmd,輸入命令:
"net start npf",會提示打開驅動服務成功。
(3) 如果使用的是Windows vista或者Windows 7,請找到"C:\Windows\System32"下的cmd.exe 文件,
右鍵點擊選擇"Run as administrator",然後在命令行模式下輸入命令"net start npf",
即可成功打開NPF的驅動,應該就是我前面找到過的npf.sys 文件被打開了。
最後,再重新打開Wireshark,就能正常運行了。
/proc/net/if_inet6
# test -f /proc/net/if_inet6 && echo "Running kernel is IPv6 ready"
# modprobe ipv6
# lsmod |grep -w 'ipv6' && echo "IPv6 module successfully loaded"
alias net-pf-10 ipv6 # automatically load IPv6 module on demand
alias net-pf-10 off # disable automatically load of IPv6 module on demand
# /sbin/ifconfig -? 2>& 1|grep -qw 'inet6' && echo "utility 'ifconfig' is
?IPv6-ready"
# /sbin/route -? 2>& 1|grep -qw 'inet6' && echo "utility 'route' is IPv6-ready"
# /sbin/ip 2>&1 |grep -qw 'inet6' && echo "utility 'ip' is IPv6-ready"
# ping6 < hostwithipv6address >
# ping6 < ipv6address >
# ping6 [-I < device >] < link-local-ipv6address >
# ping6 -c 1 ::1
PING ::1(::1) from ::1 : 56 data bytes
64 bytes from ::1: icmp_seq=0 hops=64 time=292 usec
--- ::1 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/mdev = 0.292/0.292/0.292/0.000 ms
# ping6 fe80::212:34ff:fe12:3456
connect: Invalid argument
# ping6 -I eth0 -c 1 fe80::2e0:18ff:fe90:9205
PING fe80::212:23ff:fe12:3456(fe80::212:23ff:fe12:3456) from
?fe80::212:34ff:fe12:3478 eth0: 56 data bytes
64 bytes from fe80::212:23ff:fe12:3456: icmp_seq=0 hops=64 time=445 usec
--- fe80::2e0:18ff:fe90:9205 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss round-trip
?min/avg/max/mdev = 0.445/0.445/0.445/0.000 ms
# ping6 -I eth0 ff02::1 PING ff02::1(ff02::1) from fe80:::2ab:cdff:feef:0123 eth0: 56 data bytes
64 bytes from ::1: icmp_seq=1 ttl=64 time=0.104 ms
64 bytes from fe80::212:34ff:fe12:3450: icmp_seq=1 ttl=64 time=0.549 ms (DUP!)
# traceroute6 www.6bone.net
traceroute to 6bone.net (3ffe:b00:c18:1::10) from 3ffe:ffff:0000:f101::2, 30
?hops max, 16 byte packets
1 localipv6gateway (3ffe:ffff:0000:f101::1) 1.354 ms 1.566 ms 0.407 ms
2 swi6T1-T0.ipv6.switch.ch (3ffe:2000:0:400::1) 90.431 ms 91.956 ms 92.377 ms
3 3ffe:2000:0:1::132 (3ffe:2000:0:1::132) 118.945 ms 107.982 ms 114.557 ms
4 3ffe:c00:8023:2b::2 (3ffe:c00:8023:2b::2) 968.468 ms 993.392 ms 973.441 ms
5 3ffe:2e00:e:c::3 (3ffe:2e00:e:c::3) 507.784 ms 505.549 ms 508.928 ms
6 www.6bone.net (3ffe:b00:c18:1::10) 1265.85 ms * 1304.74 ms
# tracepath6 www.6bone.net
1?: [LOCALHOST] pmtu 1480
1: 3ffe:401::2c0:33ff:fe02:14 150.705ms
2: 3ffe:b00:c18::5 267.864ms
3: 3ffe:b00:c18::5 asymm 2 266.145ms pmtu 1280
3: 3ffe:3900:5::2 asymm 4 346.632ms
4: 3ffe:28ff:ffff:4::3 asymm 5 365.965ms
5: 3ffe:1cff:0:ee::2 asymm 4 534.704ms
6: 3ffe:3800::1:1 asymm 4 578.126ms !N
Resume: pmtu 1280
# tcpdump -t -n -i eth0 -s 512 -vv ip6 or proto ipv6
tcpdump: listening on eth0
3ffe:ffff:100:f101:2e0:18ff:fe90:9205 > 3ffe:ffff:100:f101::1: icmp6: echo
?request (len 64, hlim 64)
3ffe:ffff:100:f101::1 > 3ffe:ffff:100:f101:2e0:18ff:fe90:9205: icmp6: echo
?reply (len 64, hlim 64)
# tcpdump -t -n -i ppp0 -s 512 -vv ip6 or proto ipv6
tcpdump: listening on ppp0
1.2.3.4 > 5.6.7.8: 2002:ffff:f5f8::1 > 3ffe:ffff:100::1: icmp6: echo request
?(len 64, hlim 64) (DF) (ttl 64, id 0, len 124)
5.6.7.8 > 1.2.3.4: 3ffe:ffff:100::1 > 2002:ffff:f5f8::1: icmp6: echo reply (len
?64, hlim 61) (ttl 23, id 29887, len 124)
1.2.3.4 > 5.6.7.8: 2002:ffff:f5f8::1 > 3ffe:ffff:100::1: icmp6: echo request
?(len 64, hlim 64) (DF) (ttl 64, id 0, len 124)
5.6.7.8 > 1.2.3.4: 3ffe:ffff:100::1 > 2002:ffff:f5f8::1: icmp6: echo reply (len
?64, hlim 61) (ttl 23, id 29919, len 124)
# host -t AAAA www.join.uni-muenster.de
www.join.uni-muenster.de. is an alias for ns.join.uni-muenster.de.
ns.join.uni-muenster.de. has AAAA address 3ffe:400:10:100:201:2ff:feb5:3806
$ telnet 3ffe:400:100::1 80
Trying 3ffe:400:100::1...
Connected to 3ffe:400:100::1.
Escape character is '^]'.
HEAD / HTTP/1.0
HTTP/1.1 200 OK
Date: Sun, 16 Dec 2001 16:07:21
GMT Server: Apache/2.0.28 (Unix)
Last-Modified: Wed, 01 Aug 2001 21:34:42 GMT
ETag: "3f02-a4d-b1b3e080"
Accept-Ranges: bytes
Content-Length: 2637
Connection: close
Content-Type: text/html; charset=ISO-8859-1
Connection closed by foreign host.
$ ssh -6 ::1
user@::1's password: ******
[user@ipv6host user]$