Nov 12, 2008

Windows搭建Python Apache Django Mysql环境

软件: Python、 Apache、mod_python、Mysql、MySQL-python

按上面的顺序安装就可以了

然后配置下apache,在httpd.conf中
把DocumentRoot、相应的Directory设置成web根目录
加一行:LoadModule python_module modules/mod_python.so
在把下面的东西加到最后:
<Location "/">
SetHandler python-program
PythonPath "['F:\web\django'] + sys.path"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE wap.settings
PythonDebug On
</Location>

<Location "/includes/">
SetHandler None
</Location>

<LocationMatch "\.(jpg|gif|png)$">
SetHandler None
</LocationMatch>

Oct 21, 2008

C# 读取gb2312文本文件

StreamReader objReader = new StreamReader(strFilename,System.Text.Encoding.GetEncoding("gb2312"));

如果不加第二个参数,读出来的中文是乱码

Python 自动搜索可用ip并设置

Python设置IP Address,用的是 qujinlong123@gmail.com 的,详见:用Python 干实事(一)自动修改Windows的IP、网关和DNS设置


我添加了搜索功能

# -*- coding: GB2312 -*-

# FileName: modify_ip.py
# Author  : ox0spy
# Email   : ossteerer@gmail.com
# Date    : 2008-10-21

# 程序的前两个函数是qujinlong123@gmail.com实现的,这里借用下


import _winreg
from ctypes import *

def    ModifyIpAddress(ipAddress, subnetMask, gateway, dnsServer):
    netCfgInstanceID = None
   
    hkey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, \
                           r'System\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}')
   
    keyInfo = _winreg.QueryInfoKey(hkey)
   
    # 寻找网卡对应的适配器名称 netCfgInstanceID
    for index in range(keyInfo[0]):
        hSubKeyName = _winreg.EnumKey(hkey, index)
        hSubKey = _winreg.OpenKey(hkey, hSubKeyName)
   
        try:
            hNdiInfKey = _winreg.OpenKey(hSubKey, r'Ndi\Interfaces')
            lowerRange = _winreg.QueryValueEx(hNdiInfKey, 'LowerRange')
   
            # 检查是否是以太网
            if lowerRange[0] == 'ethernet':
                driverDesc = _winreg.QueryValueEx(hSubKey, 'DriverDesc')[0]
                # print 'DriverDesc: ', driverDesc
                netCfgInstanceID = _winreg.QueryValueEx(hSubKey, 'NetCfgInstanceID')[0]
                # print 'NetCfgInstanceID: ', netCfgInstanceID
                break
   
            _winreg.CloseKey(hNdiInfKey) # 关闭 RegKey
        except WindowsError, e:
                            pass
                # print r'Message: No Ndi\Interfaces Key'
           
        # 循环结束,目前只提供修改一个网卡IP的功能
        _winreg.CloseKey(hSubKey)
   
    _winreg.CloseKey(hkey)
   
    if netCfgInstanceID == None:
        print '修改IP失败 - 没有找到网络适配器'   
        exit()
   
    # print netCfgInstanceID
   
    # 通过修改注册表设置IP
    strKeyName = 'System\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces\\' + netCfgInstanceID
   
    # print strKeyName
   
    hkey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, \
                           strKeyName, \
                           0, \
                           _winreg.KEY_WRITE)
   
    try:
        _winreg.SetValueEx(hkey, 'IPAddress', None, _winreg.REG_MULTI_SZ, ipAddress)
        _winreg.SetValueEx(hkey, 'SubnetMask', None, _winreg.REG_MULTI_SZ, subnetMask)
        _winreg.SetValueEx(hkey, 'DefaultGateway', None, _winreg.REG_MULTI_SZ, gateway)
        _winreg.SetValueEx(hkey, 'NameServer', None, _winreg.REG_SZ, ','.join(dnsServer))
    except WindowsError:
        print 'Set IP Error'
        exit()
   
    _winreg.CloseKey(hkey)
    return netCfgInstanceID
   
# 调用DhcpNotifyConfigChange函数通知IP被修改
def Notify(netCfgInstanceID, ipAddress, subnetMask):
    DhcpNotifyConfigChange = windll.dhcpcsvc.DhcpNotifyConfigChange

    inet_addr = windll.Ws2_32.inet_addr

    # DhcpNotifyConfigChange 函数参数列表:
    # LPWSTR lpwszServerName,  本地机器为None
    # LPWSTR lpwszAdapterName, 网络适配器名称
    # BOOL bNewIpAddress,      True表示修改IP
    # DWORD dwIpIndex,         表示修改第几个IP, 从0开始
    # DWORD dwIpAddress,       修改后的IP地址
    # DWORD dwSubNetMask,      修改后的子码掩码
    # int nDhcpAction          对DHCP的操作, 0 - 不修改, 1 - 启用, 2 - 禁用
    DhcpNotifyConfigChange(None, \
                       netCfgInstanceID, \
                       True, \
                       0, \
                       inet_addr(ipAddress[0]), \
                       inet_addr(subnetMask[0]), \
                       0)


def Pin(ip = '192.168.1.1'):
    """ ping -n 1 ip"""
   
    import os
    if os.system("ping -n 1 %s >nul" % ip) == 0:
        return True
   
    return False   
               
def GetConfInfo(filename = 'conf.ini'):
        import re, sys
        try:
                f = open(filename, 'r')
                lines = [line.split('#')[0].strip() for line in f.readlines()]
                f.close()

                if len(lines) >= 6:
                        # ip网段
                        network = lines[0]
                        pattern = '^([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])$'
                        if not re.search(pattern, network):
                                print '网段设置错误,请修改配置文件网段信息'
                                sys.exit(2)
                        network = network.split('.')
                        network.pop()
                        network = '.'.join(network)
                        # print 'network : ', network
                        # 开始ip
                        startIp = int(lines[1])
                        if (startIp < 1 or startIp > 254):
                                print '开始ip设置错误, ip :', startIp
                                sys.exit(3)
                        # 结束ip
                        endIp = int(lines[2])
                        if endIp < 2 or startIp > 255:
                                print '结束ip设置错误'
                                sys.exit(4)
                        # 子网掩码
                        subnetMask = lines[3]
                        # 默认网关
                        gateway = lines[4]
                        if not re.search(pattern, gateway):
                                print '默认网关设置错误'
                                sys.exit(5)
                        # dns
                        dnsServ = lines[5]
                        if not re.search(pattern, dnsServ):
                                print 'dns服务器设置错误'
                                sys.exit(6)
                else:
                        print '配置文件有误,请修正后重试'
                        sys.exit(1)
                     
        except IOError, e:
                print '确定配置文件名为 : %s' % filename
                sys.exit(7)

        return [network, startIp, endIp, subnetMask, gateway, dnsServ]

Info = GetConfInfo()
if not Info:
        sys.exit()

network, startIp, endIp, subnetMask, gateway, dnsServ = Info
if startIp == endIp:
        endIp += 1
       
ipAddress = ['%s.%s' % (network, i) for i in range(startIp, endIp)]
subnetMask = [subnetMask]
gateway = [gateway]
dnsServer = [dnsServ]
url = 'http://ox0spy.blogspot.com'

MessageBox = windll.user32.MessageBoxA

for ip in ipAddress:
    ip = [ip]
    # print 'IP Address : ', ip
    netCfgInstanceID = ModifyIpAddress(ip, subnetMask, gateway, dnsServer)
    Notify(netCfgInstanceID, ip, subnetMask)
    if Pin(url):
        # print '可用Ip地址 :', ip[0]
        msg = '可用Ip地址 : %s o(∩_∩)o...' % ip[0]
        MessageBox(0, msg, 'Good luck', 0)
        break;
else:
        msg = '没有可用ip,换个网段试试 ^_^'
        MessageBox(0, msg, 'sorry', 0)

ttylinux Tips

1. ttylinux 引导程序安装
环境:vmware平台上装ttylinux
以前用vmware装完redhat等其他linux后,安装程序会自动把引导程序装好的,但ttylinux不同,它的引导程序必须自己手动 安装。
其实,非常简单
#installer mbr /dev/hdc /dev/hda
注:我只虚拟出一个硬盘,没有任何分区。
更多可以参考:http://www.minimalinux.org/ttylinux/docs/user_multi/node16.html

2. ttylinux 联网
///这完全是我的机器配置,不同isp提供的很多东西都是不一样的
 
I、设置ip addr、netmask、BROADCAST (我用的是静态ip)
#cp /etc/network.d/sample  /etc/network.d/interface.eth0
#vi /etc/network.d/interface.eth0
内容如下:
# network interface configuration file sample
# change settings and rename to interface.devname, i.e. interface.eth0
# network device name
INTERFACE="eth0"
# set to "yes" to use DHCP instead of the settings below
DHCP="no"
# interface settings
# IP address
IPADDRESS="192.168.18.18"
# netmask
NETMASK="255.255.255.0"
# gate way
#GATEWAY=192.168.18.1
# broadcast address
BROADCAST="192.168.18.255"
 
II、添加默认网关
#route add default gw 192.168.18.1
 
III、设置DNS 
#vi etc/resolv.conf
内容如下:
nameserver      219.146.0.130
nameserver      61.233.154.33
search localdomain
 
IV、编辑/etc/hosts,便于和我的win 2003、redhat互联
 
V、ttylinux不支持ftp,不过文件传输可以使用scp,tftp
  
     scp命令格式:
     scp local_files username@hostname:path/to/file
     scp username@hostname:path/to/file local_file
     例如:
     scp ./*.html jhou@www.nctu.edu.tw:www/portfolio/2005/
     就是将本地目前所在目录中的所有 .html 文件拷贝到 athena 的个人网页空间的 portfolio/2005/ 次目录中。
     tftp命令格式:
     tftp -i ip put/get files
     注:put 上传;get 下载
          files就是你要传输的文件

Jul 8, 2008

Windows CE开发入门

from  ox0spy.blogspot.com
by     ossteerer@gmail.com
// 声明下:俺是初学者,有问题的地方还请高手斧正

网上有一些Windows CE开发入门的文章,但我看的头很晕,所以决定写篇自己的学习过程~

1. 简单介绍下Windows CE: (来源于百度百科)
      WindowsCE是微软公司嵌入式、移动计算平台的基础,它是一个开放的、可升级的32位嵌入式操作系统,是基于掌上型电脑类的电子设备操作系统,它 是精简的Windows 95,Windows CE的图形用户界面相当出色。
      其中CE中的C代表袖珍(Compact)、消费(Consumer)、通信能力(Connectivit)和伴侣(Companion);E代表电子 产品(Electronics)。与Windows 95/98、Windows NT不同的是,Windows CE是所有源代码全部由微软自行开发的嵌入式新型操作系统,其操作界面虽来源于Windows 95/98,但Windows CE是基于WIN32 API重新开发、新型的信息设备的平台。Windows CE具有模块化、结构化和基于Win32应用程序接口和与处理器无关等特点。Windows CE不仅继承了传统的Windows图形界面,并且在Windows CE平台上可以使用Windows 95/98上的编程工具(如Visual Basic、Visual C++等)、使用同样的函数、使用同样的界面风格,使绝大多数的应用软件只需简单的修改和移植就可以在Windows CE平台上继续使用。Windows CE并非是专为单一装置设计的,所以微软为旗下采用Windows CE作业系统的产品大致分为三条产品线,Pocket PC(掌上电脑)、Handheld PC(手持设备)及Auto PC。

2. 现在的问题就是我们怎么开始开发Windows CE应用程序——搭建开发环境
    2.1、选择开发工具
     我选择eVC4(eMbedded Visual C++ 4.0)做开发工具,因为eVC4和VC 6.0很像,容易上手,而且与vs 2005相比非常小巧。

     软件下载:
      eVC4:http://www.microsoft.com/downloa ... &displaylang=en
      eVC4 sp4:http://www.microsoft.com/downloa ... &displaylang=en
      Windows Mobile 5.0 Pocket PC SDK:http://www.microsoft.com/downloa ... &displaylang=en
     Localized Windows Mobile 5.0 Pocket PC Emulator Images:http://www.microsoft.com/downloa ... &displaylang=en

     下载完毕,按这个顺序装完这4个软件,开发环境就ok了,就可以写个Hello World测试下了.

3. 第一个测试程序
  3.1 创建工程   
      打开eVC4,File --> New ,新建一个 "WCE Application" 工程,填好Project name、Location并选择CPU类型.
我只在模拟器中运行这个程序,所以我只选择了Win32 (WCE X86)
注:不管选择哪种CPU,Win32 (WCE emulator)都是必须要选择的.

       点OK进入下一步,然后,选择"An empty project" 建一个空工程(没有任何附加代码)
       怎么样,和VC 6.0 中创建工程很像吧~

  3.2 编写程序
        File --> New, 新建个C/C++源文件(即:C/C++ source file),在File处填写该文件的文件名hello,然后在刚才建的hello.cpp文件中输入下面的代码:
// hello.cpp - A sample "Hello World " program.

#include <windows.h>

// Program entry point

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd)
{
    MessageBox(NULL, TEXT("Hello World!"), TEXT("hello"), MB_OK);

    return 0;
}


现在按 F7 编译该程序,如果没有错误,就可以按 Ctrl+F5执行程序。在模拟器中可以看到程序执行结果.如下图:
点击在新窗口查看全图 CTRL+鼠标滚轮放大或缩小

4. 总结
     本文简单的介绍了Windows CE,并教你如何搭建开发环境,最后写了一个Hello World程序。有了这些基础我们就可以开始学习Windows CE程序开发了。

    推荐一本我最近正在看的书: Programming Microsoft Windows CE .NET, Third Edition.pdf (1.09 MB)

Jun 20, 2008

Tips

1. 校内相册支持批量上传,一次最多可上传60张。该工具只支持IE,Firefox中不可用

2. Google的Picasa 相册可以批量下载,有两种方法,都需要先安装Picasa
    a. 查看网页源代码,搜索“下载相册”,然后把url  copy到地址栏 回车
    b. 用Picasa Webalbums Assistant:可以通过指定Picasa用户名或图片地址来批量下载位于Google Picasa上某一相册中的图片
        官方网址:http://picasawebalbumsassistant.googlepages.com/ [需翻墙]
        下载地址:下载地址1 | 下载地址2 | 大小:806K

        Google 真是个好东西啊,太强大了。。。

May 23, 2008

使用Ubuntu Live CD 安装 grub

   一机器光驱不好用了,而且硬盘上没有任何系统。现在要在上面安装rhel5,一共五张盘,害怕装到第n(n < 5)张时光驱罢工
   手头上有没有空闲光驱,拆机器上的太麻烦
   故,选择硬盘安装
   但总要有个程序先把系统引导起来,如wingrub、grub4dos等,没有安装windows,wingrub显然就pass了
   正好手边有张Ubuntu Live CD,就用它了。
   用Live CD将系统引导起来,进入ubuntu。
   $ sudo grub
   grub> root (hd0,0)
   grub> setup (hd0,0)

    Checking if "/boot/grub/stage1" exists... no
    Checking if "/grub/stage1" exists... no

   Error 15: File not found

   grub>quit

   $ grub --version  // 查看grub版本
     grub (GNU GRUB 0.97)

    我把另一个系统中的/boot/grub 拷贝到 hda1中,现在就可以用上面的 root,setup命令将grub安装到这个系统上了。
    然后,只需把rhel的5个iso文件和vmlinuz、initrd.img拷贝到hda1中,重启机器,开始安装rhel5


  

 

May 16, 2008

Pentest - Tools

From : Tr4c3’s blog

Packet Shaper:
Nemesis: a command line packet shaper
Packit: The Packet Toolkit - A network packet shaper.
Hping by Antirez: a command line TCP/IP packet shaper
Sing: stands for ‘Send ICMP Nasty Garbage’; sends fully customizeable ICMP packets
Scapy: a new python-based packet generator

Password Cracker/Login Hacker:
John the Ripper: a well-known password cracker for Windows and *nix Systems
Djohn: a distributed password cracker based on “John the Ripper
Cain & Abel: an advanced password recovery tool for windows systems. It sniffs the network packets an cracks authentication brute-force or with dictionary attacks.
Project RainbowCrack: Advanced instant NT password cracker
Rainbowtables: The shmoo group provides pre-generated rainbow tables for bittorrent download. The tables are generated with RainbowCrack (see above).
Windows NT password recovery tool by Peter Nordahl
THC-Dialup Login Hacker by THC. It tries to guess username and password against the modem carrier. As far as I know the only available dialup password guesser for *NIX.
Hydra by THC: a multi-protocol login hacker. Hydra is also integrated with Nessus.
Medusa: parallel network login auditor
THC imap bruter: a very fast imap password brute forcer
x25bru: a login/password bruteforcer for x25 pad
Crowbar: a generic web brute force tool (Windows only; requires .NET Framework)
MDCrack-NG: a very fast MD4/MD5/NTLMv1 hash cracker; works optionally with precomputed hash tables

Advanced Sniffers:
Wireshark (formerly known as Ethereal): an open source network protocol analyzer
Dsniff by Dug Song: a combination of very useful sniffer and man-in-the-middle attack tools
Ettercap: a multipurpose sniffer/interceptor/logger for switched LAN environments
aimsniffer: monitors AOL instant messager communication on the network
4G8: a tool ,similar to ettercap, to capture network traffic in switched environments
cdpsniffer: Cisco discovery protocol (CDP) decoding sniffer

Port Scanner / Information Gathering:
nmap: the currently most well-known port scanner. Since version 3.45 it supports version scans. Have a look at PBNJ for diffing different nmap scans.
ISECOM released their nmap wrapper NWRAP, which shows all known protocols for the discovered ports form the Open Protocol Resource Database
Nmap::Scanner: Perl output parser for nmap
Amap by THC: An advanced portscanner which determines the application behind a network port by its application handshake. Thus it detects well-known applications on non-standard ports or unknown applications on well-known ports.
vmap by THC: version mapper to determine the version (sic!) of scanned daemons
Unicornscan: a information gathering and correlation engine
DMitry (Deepmagic Information Gathering Tool): a host information gathering tool for *nix systems
Athena: a search engine query tool for passive information gathering

Security Scanner:
Nessus - In version 2 an OpenSource network scanner. Version 3 is only available in binary form and under a proprietary license.
OpenVAS: a fork of Nessus 2.2.5 (formerly known as GNessUs)
Nessj: a java based nessus (and compatibles) client (formerly known as Reason)
Paul Clip from @stake released AUSTIN, a security scanner for Palm OS 3.5+.

Webserver:
Nikto: a web server scanner with anti IDS features. Based on Rain Forest Puppies libwhisker library.
Wikto: a webserver assessment tool (Windows only; requires .NET framework)
WSDigger: a black box web pen testing tool from Foundstone (Windows based)
Metis: a java based information gathering tool for web sites

Fingerprinting:
SinFP: a fingerprinting tool which requires only an open tcp port and sends maximum 3 packets
Winfingerprint: much more than a simple fingerprinting tool.It scans for Windows shares, enumerates usernames, groups, sids and much more.
p0f 2: Michal Zalewski announced his new release of p0f 2, a passive OS fingerprinting tool. p0f 2 is a completely rewrite of the old p0f code.
xprobe2: a remote active operating system fingerprinting tool from Ofir Arkin and the xprobe2 team
Cron-OS: an active OS fingerprinting tool based on TCP timeout behavior. This project was formerly known as “RING” and is now published as a nmap addon.

Proxy Server:
Burp proxy: an interactive HTTP/S proxy server for attacking and debugging web-enabled applications
Screen-scraper: a http/https-proxy server with a scripting engine for data manipulation and searching
Paros: a man-in-the-middle proxy and application vulnerability scanner
WebScarab: a framework for analyzing web applications. One of it’s basic functionality is the usage as intercepting proxy.

War Dialers:
IWar: a classic war dialer, now also with VOIP (IAX2) support. One of a few wardialers for *nix operation systems, and the only with VOIP functionality (to my knowledge)
THC-Scan: a war dialer for DOS, Windows and DOS emulators

Malware / Exploit Collections:
packetstormsecurity.org: Huge collections of tools and exploits
ElseNot Project: The project tries to publish an exploit for each MS Security Bulltin. A script kiddie dream come true.
Offensive Computing: Another malware collection site
Securityforest: try the ExploitTree to get a collection of exploit code; have a look at the ToolTree for a huge list of pentest stuff

Databases / SQL:
sqlninja: a tool to exploit sql injection vulnerabilities in web applications with MS SQL Servers (alpha stage)
CIS Oracle Database Scoring Tool: scans Oracle 8i for compliance with the CIS Oracle Database Benchmark
SQLRecon: an active and passive scanner for MSSQL server. Works on Windows 2000, XP and 2003.
absinthe: a gui-based tool that automates the process of downloading the schema & contents of a database that is vulnerable to Blind SQL Injection (see here and here).
SQL Power Injector: a GUI based SQL injector for web pages (Windows, .Net Framework 1.1 required, Internet Explorer 5.0+ required)

Voice over IP (VOIP):
vomit (voice over misconfigured internet telephones): converts Cisco IP phone conversations into wave files
SiVuS: a VOIP vulnerability scanner - SIP protocol (beta, Windows only)
Cain & Abel: mostly a password cracker, can also record VOIP conversations (Windows only)
sipsak (SIP swis army knife): a SIP packet generator
SIPp: a SIP test tool and packet generator
Nastysip: a SIP bogus message generator
voipong: dumps G711 encoded VOIP communications to wave files. Supports: SIP, H323, Cisco Skinny Client Protocol, RTP and RTCP
Perl based tools by Thomas Skora: sip-scan, sip-kill, sip-redirectrtp, rtpproxy and ipq_rules
rtptools: a toolset for rtp recording and playing

Networkbased Tools:
yersinia: a network tool designed to take advantage of some weakeness in different network protocols (STP, CDP, DTP, DHCP, HSRP, 802.1q, VTP)
Netsed: alters content of network packets while forwarding the packets
ip6sic: a IPv6 stack integrity tester

VPN:
ike-scan: an IPSec enumeration and fingerprinting tool
ikeprobe: ike scanning tool
ipsectrace: a tool for profiling ipsec traffic in a dump file. Initial alpha release
VPNMonitor: a Java application to observer network traffic. It graphically represents network connections and highlights all VPN connections. Nice for demonstrations, if somewhat of limited use in a real pen test.
IKECrack:an IKE/IPSec cracker for pre-shared keys (in aggressive mode authentication [RFC2409])
DNSA: DNS Auditing tool by Pierre Betouin
Hunt: a session hijacking tool with curses GUI
SMAC: a Windows MAC Address Modifying Utility. Supports Windows 2000 and XP.
The WebGoat Project: a web application written in Java with intentional vulnerabilities. Supports an interactive learning environment with individual lessons.
TSCrack: a Windows Terminal Server brute forcer
Ollie Whitehouse from @stake released some new cellular phone based pentesting tools for scanning (NetScan, MobilePenTester). All tools require a Sony Ericsson P800 mobile phone. Unfortunately, @stake seems no longer to support much of their free security tools. So, use instead the alternativ download links above.
THC-FuzzyFingerprint: generates fuzzy fingerprints that look almost nearly equal to a given fingerprint/hash-sum. Very useful for MITM attacks.
BeatLM, a password finder for LM/NTLM hashes. Currently, there is no support for NTLM2 hashes. In order to get the hashes from network traffic, try ScoopLM.
THC vlogger: a linux kernel based keylogger
The Metasploit Framework: an “advanced open-source platform for developing, testing, and using exploit code”.
ATK (Attack Tool Kit): a comination of security scanner and exploit framework (Windows only)
Pirana: an exploitation framework to test the security of email content filters. See also the whitepaper
PassLoc: a tool which provides the means to locate keys within a buffer. Based on the article “Playing hide and seek with stored keys” by Adi Shamir.
Dl-Hell: identifies an executables dynamic link library (DLL) files
DHCPing: a security tool for testing dhcp security
ldapenum: a perl script for enumeration against ldap servers.
Checkpwd: a dictionary based password checker for oracle databases
NirCmd from NirSoft: a windows command line tool to manipulate the registry, initiate a dialup connection and much more
Windows Permission Identifier: a tools for auditing user permissions on a windows system
MSNPawn: a toolset for footprinting, profiling and assesment via the MSN Search. Windows-only, .NET required
snmpcheck:a tool to gather information via snmp. Works on Linux, *BSD and Windows systems.
pwdump6: extract NTLM and LanMan hashes from Windows targets


May 14, 2008

如何在网络上实时监测地震 [转]

From : http://www.bigsea.com.cn

四川7.8级地震,且5级以上余震不断。
如果您有四川的亲友,请及时联系,唯望大家平安。
长久以来,地震基本上是只能监测不能预测的。
在此介绍一些网上监测地震的方法(昨天cnBeta也是通过他们向大家提供技术情报 的):

1. IRIS 监测图
该图列出监测到的地震
http://www.iris.edu/seismon/bigmap/index.phtml

2. USGS 地震记录
该网页列出一周内的2.5级以上的地震记录
http://earthquake.usgs.gov/eqcenter/rec ... s_all.html

3. Opera Widget: EarthQuakes Map
该 Opera Widget 显示全球范围内一周内发生的地震,实时更新。(需配合 Opera 使用)
http://widgets.opera.com/widget/5178/

May 13, 2008

西夏省嵬城遗址

银川嵬城遗址所在地点   于惠农县庙台乡省嵬村,为党项族首领李德明于北宋天圣二年(1024年)所筑。遗址为正方形,边长600米,设东南两城门,墙体为黄土夯实,残墙最高 1.5米。1965年,宁夏博物馆在此挖掘出唐、宋、西夏等朝钱币、古陶瓷器及铁器,已被列为宁夏回族自治区重点文物保护单位。 关于省嵬城的建筑,史料记载不多。《明一统志》载:省嵬城在河东,河东废城也。《嘉靖宁夏新志》载:"省嵬城,河东废城也,未详其始。"《宁夏府志》 载:"嵬城遗址在省嵬山下,西南去府(今银川市)东北一百四十里,逾黄河。"吴广成《西夏书事》载:"天圣(北宋)二年(公元1024年) 春二月,德明做省嵬城于定州(西夏将银川以北为定州)。"这些记载虽简,但却载明了省嵬城遗址的所在地点。

  西夏王朝是以党项羌族为主体建立起的多民族国家政权,于1032年(宋天圣10年)建国,1227年被成吉思汗所灭,历时近200年。李元昊的 祖上拓跋思恭曾为唐朝镇压黄剿领导的农民起义军立下战功,被唐僖宗赐姓李,至他的祖父李继迁、父亲李德明都受到重用。李元昊这位军事天才不赞成父亲德明向 宋称臣。老辣的德明当时鉴于时机不成熟,对儿子说:"吾久用兵疲矣,吾族三十年衣锦绮,此宋恩也,不可负!"元昊顶撞道:"衣皮毛,事畜牧,蕃性祈便。英 雄之生,当王耳,何锦绮为?"雄心壮志可见一斑。

  元昊建国后,升兴州首府为兴庆府(今银川市),之后的年代里组织创制西夏文字。西夏文形体方正,结构复杂,笔画较多,约有6000字左右,字体 有草、篆、隶、楷等。西夏崇尚佛教,把佛教定为国教,规定每一季第一个月的朔日(初一)为"圣节"。让官民届时烧香拜佛,不惜用行政手段来推行佛教,并接 受汉文化及吐藩、回鹘文化,从而逐渐形成了自己的西夏文化体系。宋代欧阳修曾就元昊治国有方进行过评价:"威能畏其下,恩能死其人。"

  1032年西夏王李德明卒,其子元昊嗣位,首先去掉唐、宋时期所赐给的李、赵姓氏,自号嵬名氏,自标吾祖"可汗"(即天子的意思)。李德明用自 己祖先嵬名氏(党项羌的姓名)给建起的省嵬城取名。其意可谓深谋远虑,确有自称一统的想法。嵬城遗址曾出土一具秃发瓷制人 头。元昊曾于明道二年(1033)下令秃发。这件文物弥足珍贵。

地址: 在省嵬山下,西南去府(今银川市)东北一百四十里,逾黄河