proxy代理   soft软件   IT 业界特快   norton 诺顿病毒库   代理列表   search FTP搜索   whois IP地理位置   blog 追求完美  
money理财   life生活   RSS聚合门户   firefox WEB浏览器   免费域名   typeset 假古文   AntiVirus 反病毒   ipcn 站点导航  

« May 2006 | Main | July 2006 »

June 30, 2006

介绍两个盘柜存储的健康检查工具 可以用来做监控 我爱网络

http://windtear.net/archives/2006/06/30/001017.html 介绍两个盘柜存储的健康检查工具 可以用来做监控 一个是 LSI Logic 的 megarc 一个是 3ware 的 tw_cli ----- 1. http://www.lsilogic.com/ ut_linux_megarc_1.11.zip # ./megarc ********************************************************************** MEGARC MegaRAID Configuration Utility(LINUX)-1.11(12-07-2004) By LSI Logic Corp.,USA ********************************************************************** [Note: For SATA-2, 4 and 6 channel controllers, please specify Ch=0 Id=0..15 for specifying physical drive(Ch=channel, Id=Target)] Type ? as command line arg for help First Parameter should be : -AllAdpInfo -ldInfo  More...

Posted by windtear at 11:58 PM

June 29, 2006

shell 编程中用 read 处理用户输入 我爱网络

http://windtear.net/archives/2006/06/29/001016.html shell 编程中用 read 处理用户输入 介绍一下 shell 编程中的 read 先看简单样例: read -p "Please enter your Username: " user read -s -p "Please enter your Password: " pass realpass=$(awk "/${user}/ {print \$2}" /etc/secrets) if [ "$pass" == "$realpass" ]; then # what you want to do i.e. change pass else echo "error" fi 再看简单帮助:(详细自己去man) read [-ers] [-u fd] [-t timeout] [-a  More...

Posted by windtear at 11:54 PM

June 28, 2006

pvpgn 搭建 Battle.net 星际战网 我爱网络

http://windtear.net/archives/2006/06/28/001015.html pvpgn 搭建 Battle.net 星际战网 http://www.pvpgn.org/ http://pvpgn.berlios.de/ http://pvpgn.berlios.de/index.php?page=files http://download.berlios.de/pvpgn/pvpgn-1.8.0rc2.tar.gz http://download.berlios.de/pvpgn/pvpgn-1.8.0rc2.tar.bz2 http://download.berlios.de/pvpgn/PvPGN-1.8.0rc2-1-Win32.zip http://download.berlios.de/pvpgn/pvpgn-1.8.0rc2_setup.exe http://download.berlios.de/pvpgn/pvpgn-support-1.0.tar.gz http://download.berlios.de/pvpgn/pvpgn-support-1.0.zip 文档: http://pvpgndocs.berlios.de/ http://developer.berlios.de/docman/?group_id=2291 Running a PvPGN Server http://developer.berlios.de/docman/display_doc.php?docid=546&group_id=2291 下载 解压 (提醒:support包的文件解压到files目录) 配置:(看里面说明 根据自己需要改就行了) conf/bnetd.conf files/bnserver.ini ladder_games = "none" 改为 ladder_games = "topvbot,oneonone" #servername = "PvPGN Realm" 可能需要设置一下 如 servername = "windtear" files/bnserver.ini 一定要修改 不然客户端的注册表会被这里面的内容冲掉 客户端配置: XP 系统下是多字符串 可以直接编辑 [HKEY_CURRENT_USER\Software\Battle.net\Configuration] "Battle.net gateways"= 如: 1001 01 IP.IP.IP.IP 8  More...

Posted by windtear at 10:30 PM

June 27, 2006

提一下 php 的 mysql_pconnect 我爱网络

http://windtear.net/archives/2006/06/27/001014.html 提一下 php 的 mysql_pconnect 帮人看一台 mysql 数据库服务器 mysqld进程很多 查了一下 php程序大量使用了 mysql_connect 纯的传统CGI方式下 由于每个请求都起一个新的php进程 所以二者没什么区别 当php以apache模块方式运行时 二者就有一些区别 不过有区别也是因为apache的功能 httpd 进程结束后放回进程池 此时mysql_pconnect连接的mysql不释放 有下一个连接请求时连接复用 就是说: 这种情况下 pconnect节省了反复连接数据库的时间 p就是persistent 在web里的术语就是长连接 keepalive 具体用与不用看自己的架构设计和实际情况 不过整体上考虑使用的话还是有不少好处的 详细可参阅 PHP 官方文档: http://cn.php.net/mysql_pconnect http://cn.php.net/manual/en/function.msql-pconnect.php http://cn.php.net/manual/en/function.msql-connect.php http://cn.php.net/manual/en/features.persistent-connections.php  More...

Posted by windtear at 2:40 AM

June 26, 2006

研究 pptpd vpn 的用户认证部分 pppd auth 我爱网络

http://windtear.net/archives/2006/06/26/001013.html 研究 pptpd vpn 的用户认证部分 pppd auth 先说 pptp vpn 身份认证协议: PAP: 不加密的密码 CHAP: 质询握手身份验证协议 MS-CHAP: Microsoft CHAP MS-CHAP v2: Microsoft CHAP 版本 2 linux 下 pptpd 调用 pppd 进行身份认证 pppd/auth.c 使用PAP认证的话,可以用系统密码 # more /etc/ppp/pap-secrets # Secrets for authentication using PAP # client server secret IP addresses windtear * @login * /* * check_passwd - Check the user name and  More...

Posted by windtear at 11:58 PM

June 23, 2006

apache apxs Dynamic Shared Object (DSO) Support 我爱网络

apache apxs Dynamic Shared Object (DSO) Support http://httpd.apache.org/docs/2.0/dso.html http://httpd.apache.org/docs/2.0/mod/mod_so.html Apache Extension Tool (apxs) Related Modules Related Directives * mod_so * LoadModule --enable-`module`=shared 1. Build and install a distributed Apache module, say mod_foo.c, into its own DSO mod_foo.so: $ ./configure --prefix=/path/to/install --enable-foo=shared $ make install 2. Build and install a third-party Apache module, say mod_foo.c, into its own DSO mod_foo.so: $  More...

Posted by windtear at 12:00 AM

June 21, 2006

搜狗输入法Beta2今日发布 紫光拼音输入法V5 我爱网络

http://windtear.net/archives/2006/06/21/001011.html 搜狗输入法Beta2今日发布 紫光拼音输入法V5 http://ime.sogou.com/dl/sogou_pinyin_b2.exe 官方主页 http://www.sogou.com/pinyin/ 官方Blog http://pinyin.blog.sohu.com/ 系统要求:Windows 2000/XP 版 本 号:Beta2 (2006/6/21发布) 升级日志 http://www.sogou.com/pinyin/changelog.html 新词热词一网打尽 利用先进的搜索引擎技术,自动分析互联网上出现的新词热词,李宇春、房奴、八荣八耻一个不漏; 世界杯球星照样一网打尽,齐达内、巴拉克、克洛斯全部都有。 最佳的互联网词频 通过分析统计中国互联网40亿中文页面,获得最佳的词频排序,特别适合互联网用户,上网聊天、 写邮件、发帖子样样顺手。 动态升级输入法和词库 我们是活的输入法!自动升级(可选)最新最热的词库和最新的输入法主程序,享受我们最好的服务。 更优的智能算法 在互联网用户常用的短句输入习惯下,搜狗智能组词算法首选词准确率(即候选的第一个词就是 要输入的词的比例)领先于其他输入法。 紫光华宇拼音输入法V5 for Windows 98/Me/2000/XP http://www.unispim.com/download/ http://www.unispim.com/filedown/file.php?f=unispim5.exe MD5校验码:9dcde7f82b286ed6471670cfef908b6b 紫光华宇拼音输入法是我公司自主开发、具有自主知识产权、对最终用户完全免费、基于汉语拼音的 中文字、词及短语输入法,自1999年问世以来,便因其使用方便、快捷、智能等特点,迅速受到各界 人士的普遍欢迎。七年来,该产品经历了2.0、2.01、2.2、2.3、3.0到如今的 V5共6个版本,每一次 版本升级都是在收集了大量的用户反馈意见后,经过不断推敲、反复斟酌而得来,倾注了开发人员大 量的心血和智慧。  More...

Posted by windtear at 11:58 PM

June 20, 2006

strcpy 和 内存越界 我爱网络

http://windtear.net/archives/2006/06/20/001010.html strcpy 和 内存越界 strcpy 和 内存越界的问题 应该算是超级经典了 发生也很容易: 前面的处理发生异常 以至于没有置空最后的内存 Q 同学英明神武的发现并解决了这个问题 记录一下 两件事: 1. 初始化置空很必要(NULL指针和数组最后一个\0) 2. 可以用 strncpy 防止难以预料的越界 strcpy, strncpy - copy a string #include <string.h> char *strcpy(char *dest, const char *src); char *strncpy(char *dest, const char *src, size_t n); const char *mempointer = NULL; char staticarray[128]; memset(staticarray, 0, sizeof(staticarray)); mempointer = ...... strcpy(staticarray, mempointer); strncpy(staticarray, mempointer,  More...

Posted by windtear at 11:43 PM

June 18, 2006

更新 ipcn 加速用的 squid 提一下 log 支持 Referer 和 User-Agent 我爱网络

更新 ipcn 加速用的 squid 提一下 log 支持 Referer 和 User-Agent 今天周日 在家把 ipcn 加速用的 squid 都升级了 基于 squid-2.5.STABLE14 本篇blog提一下 log 部分的 patch: 支持 Referer 和 User-Agent squid-2.5.STABLE14 log 这部分还得自己patch ( squid 2.6 已经把 request_t * request 加进 _AccessLogEntry struct 而且 2.6 已经支持 custom logformat ) 对 request->header 进行处理 ( accessLogCommon(AccessLogEntry * al) @ src/access_log.c ) httpHeaderHas(req_hdr,HDR_REFERER)?httpHeaderGetStr(req_hdr,HDR_REFERER):dash_str httpHeaderHas(req_hdr,HDR_USER_AGENT)?httpHeaderGetStr(req_hdr,HDR_USER_AGENT):dash_str 通过一个配置开关决定是否记录 referer 和  More...

Posted by windtear at 11:48 PM

June 17, 2006

判断 ip 格式的 php 程序代码 我爱网络

http://windtear.net/archives/2006/06/17/001008.html 判断 ip 格式的 php 程序代码 function is_ip($str) { if(!strcmp(long2ip(sprintf("%u",ip2long($ip))),$ip)) return 1; else return 0; } 或者(老版本用) function is_ip($str) { $ip = explode(".", $str); if (count($ip)<4 || count($ip)>4) return 0; foreach($ip as $ip_addr) { if ( !is_numeric($ip_addr) ) return 0; if ( $ip_addr<0 || $ip_addr>255 ) return 0; } return 1; } 如果简单的判断格式a.b.c.d而不考虑abcd的值的话: return (preg_match("/^([0-9]{1,3}\.){3}[0-9]{1,3}$/is", $str)); 不过如果需要真的ip的时候就不好玩了  More...

Posted by windtear at 11:53 PM

June 16, 2006

nagios 2.4 相关地址与安装手记 我爱网络

http://windtear.net/archives/2006/06/16/001007.html nagios 2.4 相关地址与安装手记 Nagios 2.4 05/31/2006 Nagios 1.4.1 05/15/2006 http://www.nagios.org/download/ http://prdownloads.sourceforge.net/nagios/nagios-2.4.tar.gz?download http://dag.wieers.com/packages/nagios/ Official Nagios Plugins http://sourceforge.net/project/showfiles.php?group_id=29880 http://prdownloads.sourceforge.net/nagios/nrpe-2.5.1.tar.gz?download http://prdownloads.sourceforge.net/nagios/nsca-2.6.tar.gz?download http://prdownloads.sourceforge.net/nagiosplug/nagiosmib-1.0.0.tar.gz?download http://prdownloads.sourceforge.net/nagiosplug/nagios-plugins-1.4.3.tar.gz?download http://nchc.dl.sourceforge.net/sourceforge/nagiosplug/nagiosmib-1.0.0.tar.gz http://nchc.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.3.tar.gz libjpeg-devel-6b-30.i386.rpm libpng-devel-1.2.2-25.i386.rpm gd-devel-1.8.4-12.3.1.i386.rpm zlib-devel-1.1.4-8.1.i386.rpm ./configure --prefix=/data/nagios --with-nagios-user=nagios --with-nagios-group=nagios \ --with-command-user=nagios --with-command-group=nagiocmd General Options: ------------------------- Nagios executable: nagios Nagios user/group: nagios,nagios Command user/group: nobody,nobody Embedded Perl: no Event Broker: yes Install ${prefix}: /data/nagios Lock file: ${prefix}/var/nagios.lock Init directory:  More...

Posted by windtear at 11:55 PM

June 15, 2006

RRD RPN Expressions 表达式对 UN 的处理 我爱网络

http://windtear.net/archives/2006/06/15/001006.html RRD RPN Expressions 表达式对 UN 的处理 详情参阅 doc/rpntutorial.html 本文只提一点 IF UN 为了有个感性认识 先看例子: 20,10,GT,10,20,IF eval is 20,10,GT = 1 result is 1,10,20,IF 1,10,20,IF eval is 1,10,20,IF = 10 result is 10 if 1 then 10 else 20'' 对 UN (UNKN unknown) 的处理 value,UN,0,value,IF 这个对前面提到的RRD 的加和等计算绘图有用  More...

Posted by windtear at 11:25 PM

June 14, 2006

RRDtool 1.2.13 安装手记 我爱网络

http://windtear.net/archives/2006/06/14/001005.html RRDtool 1.2.13 安装手记 前面写过 rrd: rrdtool - 很有个性的超强"数据库" http://windtear.net/archives/2004/09/27/000389.html RRD DST 与 Perl 变量 http://windtear.net/archives/2004/10/12/000473.html 20060606 下了个最新版装了一次 记录一下 http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ 自动跳转到 http://oss.oetiker.ch/rrdtool/ http://oss.oetiker.ch/rrdtool/download.en.html http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/?M=D Name Last modified Size rrdtool-1.2.13.tar.gz 04-May-2006 15:36 1.0M wget --referer=http://www.fastmirrors.org/rrdtool/ \ http://www.fastmirrors.org/rrdtool/rrdtool.tar.gz rrdtool-1.2.13 doc/rrdbuild.txt zlib libpng freetype libart_lgpl rpm -Uvh freetype-devel-2.1.4-4.0.i386.rpm rpm -ivh libart_lgpl-devel-2.3.11-2.i386.rpm 如果不 --disable-tcl 的话 rpm -ivh tcl-devel-8.3.5-92.4.i386.rpm ./configure --enable-perl-site-install make && make install  More...

Posted by windtear at 12:32 AM

June 13, 2006

mrtg 的加和等计算绘图 v.s. RRD 的加和等计算绘图 我爱网络

http://windtear.net/archives/2006/06/13/001004.html mrtg 的加和等计算绘图 v.s. RRD 的加和等计算绘图 20060530 别人问的 搜索了一下发现有人遇到 解决办法是写 Target 的时候就计算 如: Target[multiple]: a.a&c.c:comm{at}host + b.b&d.d:comm{at}host 这样就计算 a.a+b.b 和 c.c+d.d 没测试 我都是用RRD自己做加和 (DEF 和 CDEF) 示意代码如下: foreach $eachdevice (@validdevice) { $topush= 'DEF:HttpOutKb'.$count.'='.$RRDS_DIR.'/'.$eachdevice.'.rrd:HttpOutKb:AVERAGE'; push (@DEF, $topush); $sumexp .= 'HttpOutKb'.$count.','; } for (2..$sitetotalnum) { $sumexp .= '+,'; } $sumexp = substr($sumexp,0,length($sumexp)-1); $sumexp = "CDEF:HttpOutKbSum=".$sumexp.",1000,/"; or $sumexp = "CDEF:HttpOutKbSum=".$sumexp.",8,*,1000,/"; push (@DEF, $sumexp);  More...

Posted by windtear at 11:49 PM

June 10, 2006

squid 的内容替换 我爱网络

http://windtear.net/archives/2006/06/10/001003.html squid 的内容替换 上个月遇到的问题,问题的提出比较搞笑 不过据说伟大的金盾也会替换两端的数据 确实还是有意思的 原理就是把用户的请求改了给服务器 再把服务器的返回改了给用户 修改 src/client_side.c 发回用户的时候: /* * accepts chunk of a http message in buf, parses prefix, filters headers and * such, writes processed message to the client's socket */ static void clientSendMoreData(void *data, char *buf, ssize_t size) 替换 buf 就行了(buf & mb.buf) strstr 匹配上给出指针位置 然后strncpy覆盖相关内容 然后 comm_write(fd, buf, size, clientWriteBodyComplete, http, NULL); comm_write_mbuf(fd,  More...

Posted by windtear at 11:31 PM

June 9, 2006

用 mod_rewirte 解决 referer 攻击 我爱网络

http://windtear.net/archives/2006/06/09/001002.html 用 mod_rewirte 解决 referer 攻击 20060601 遇到的事 当时用tcpflow听包发现大量来自一网站的referer攻击 之所以说攻击是因为请求数实在太高了 攻击的实现方式是 frame 嵌套 然后发起大量访问 解决办法是:(这里直接打回去了) RewriteEngine on RewriteCond %{HTTP_REFERER} ^http://www.refererattacksite.com/ [NC] RewriteRule ^/ http://www.refererattacksite.com/index.php [R] 另外一种可以想到的思路是: SetEnvIf Referer "^http://www.refererattacksite.com/" illegal_ref=1 然后 Deny from env=illegal_ref 大家可以试试论证一下  More...

Posted by windtear at 11:09 PM

June 8, 2006

ODBC 数据库错误80004005 不能打开注册表关键字 我爱网络

http://windtear.net/archives/2006/06/08/001001.html ODBC 数据库错误80004005 不能打开注册表关键字 小徒弟下午问的问题 本地开发时 她用的 dsn 传到远程服务器上时(买的公网空间)直接在程序里面写 "Driver={Microsoft Access Driver (*.mdb)};DBQ=" + Server.MapPath("../notepad/db1.mdb") 然后出现了错误: Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005' [Microsoft][ODBC Microsoft Access Driver]常见错误 不能打开注册表关键字 'Temporary (volatile) Jet DSN for process 0x40b8 Thread 0x3d18 DBC 0x16e7e04 Jet'。 <%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%> <!--#include file="Connections/users_info.asp" --> <% var RS_userlogn = Server.CreateObject("ADODB.Recordset"); RS_userlogn.ActiveConnection = MM_users_info_STRING; RS_userlogn.Source = "SELECT * FROM  More...

Posted by windtear at 11:07 PM

June 7, 2006

fping - ICMP ping 的替代者 我爱网络

http://windtear.net/archives/2006/06/07/001000.html fping - ICMP ping 的替代者 http://www.fping.com/ http://www.fping.com/download/ http://www.fping.com/download/fping.tar.gz 2006-03-07 23:59:37 fping.tar.gz 60968 bytes The latest version is 2.4b2_to-ipv6 (16-Jan-2002) fping (Maintained by Thomas Dzubin) fping 的优点: 1. 可以一次ping多个主机 2. 可以从主机列表文件ping 3. 结果清晰 便于脚本处理 4. 速度快 有用的参数: -g ping 网段 -s 显示统计 -r 1 设置重试次数 Usage: fping [options] [targets...] -a show targets that are alive -A show targets by address  More...

Posted by windtear at 11:51 PM

June 6, 2006

Squid 2.6.PRE2 release 我爱网络

Squid 2.6.PRE2 release http://www.squid-cache.org/Versions/v2/2.6/squid-2.6.PRE2-RELEASENOTES.html http://www.squid-cache.org/Versions/v2/2.6/squid-2.6.PRE2.tar.gz http://www.squid-cache.org/Versions/v2/2.6/squid-2.6.PRE2.tar.bz2 $Id: release-2.6.html,v 1.11 2006/06/06 08:20:55 hno Exp $ squid-2.6.PRE1 May 29 2006 squid-2.6.PRE2 Jun 6 2006 相关文章: Squid 2.6 升级指南 新特性:(就是把证明好用的patch整合进来了) Collapsed forwarding Support for epoll under Linux Support for Etag and Vary HTTP headers Logging enhancements Authentication enhancements TPROXY totally transparent proxy support under Linux 配置上的改动; http_port 配置 transparent or vhost ... accelerated  More...

Posted by windtear at 11:31 PM

June 4, 2006

[个人打车信息] 超过19公里应该重新打表 我爱网络

http://windtear.net/archives/2006/06/04/000998.html [个人打车信息] 超过19公里应该重新打表 19公里是个临界点 (适用2元的车 1.6元的车临界点是22公里) 对比计算器: 里程: 一气贯通: 15公里重连: function calcTax() { var Mile=parseFloat(document.getElementById("Mile").value); var CalcMile=(Mile-3); var price=2; var Together=0; var Onebyeone=0; if (CalcMile0&&Mile=15&&Mile=18) {Together=parseFloat(10+12*price+(Mile-15)*price*1.5).toFixed(0);Onebyeone=parseFloat(10+12*price+10+(Mile-18)*price).toFixed(0);} document.getElementById("Together").value=Together; document.getElementById("Onebyeone").value=Onebyeone; } document.getElementById("Mile").focus() 去掉parseFloat的javascript代码如下: var CalcMile=(Mile-3); var price=2; var Together=0; var Onebyeone=0; if (CalcMile0&&Mile=15&&Mile=18) {Together=10+12*price+(Mile-15)*price*1.5; Onebyeone=10+12*price+10+(Mile-18)*price;}  More...

Posted by windtear at 11:19 PM

June 3, 2006

Firefox 1.5.0.4 Released - 更新 http://firefox.ipcn.org 提供镜像下载 我爱网络

http://windtear.net/archives/2006/06/03/000997.html Firefox 1.5.0.4 Released - 更新 http://firefox.ipcn.org 提供镜像下载 Firefox 1.5.0.4 Released http://www.mozilla.com/firefox/ 顺便更新了 http://firefox.ipcn.org/ http://firefox.windtear.net/ http://www.mozilla.com/products/download.html?product=firefox-1.5.0.4&os=win&lang=en-US Mozilla Firefox 1.5.0.4 Release Notes http://www.mozilla.com/firefox/releases/1.5.0.4.html What's New in Firefox 1.5.0.4 Firefox 1.5.0.4 is a security update that is part of our ongoing program to provide a safe Internet experience for our customers. We recommend that all users upgrade to this latest version. *  More...

Posted by windtear at 11:56 PM

June 2, 2006

[信息] 三险一金 四险一金 五险一金 历年北京市缴费基数上限 (3倍社会平均工资)

[信息] 三险一金 四险一金 五险一金 历年北京市缴费基数上限 (3倍社会平均工资) 年份 社平 基数上限 养老*0.08 医保*0.02 公积金*0.1 失业*0.005 医保存折*0.028 2003 1727 5182 145.10 2004 2004 6011 480.88 120.22 601 168.31 2005 2362 7087 566.96 141.74 708 35.44 198.44 2006 2734 8202 656.16 167.04(3互助) 820 41.01 229.66 2007 3008 9024 721.92 183.48(3互助) 902 45.12 252.67 2008 3322 9966 721.92 183.48(3互助) 1192(12%) 45.12 252.67 年份 社平 基数上限  More...

Posted by windtear at 11:58 PM



Google
 
搜索windtear.net 搜索所有网页

本站使用中的任何问题,请与 windtear @ windtear.net 联系
Copyright© 1999-2012 Windtear. All rights reserved.