2010年6月23日星期三

这个网站,需要经常去看看

http://cve.mitre.org/about/documents.html

一个介绍软件安全漏洞的网站,很好,文档详细。


2010年6月14日星期一

密码学习的网站,先暂时记下,以后再看

来源:http://bbs.cisps.org/viewtopic.php?f=35&t=6373&sid=08b47d0209b0862ec2f7b476a39499aa

挺好的网站: 
大家看看 
http://maths.utime.cn:81 
不过有点慢的难受

http://www.smatrix.org/bbs/?u=404

the best one, I think is 
http://www.adastral.ucl.ac.uk/~helger/crypto/

http://www.keylength.com/index.php

http://www.cacr.math.uwaterloo.ca/hac/about/chap13.pdf

http://www.rsasecurity.com/ 

http://bbs.chinacissp.com/ 

http://groups.google.com/group/sci.crypt?hl=zh-CN

http://eprint.iacr.org/ 
密码学最新的进展都会发表在这里。

www.100code.com很不错,里面的版主人很好的。 
山东大学的数缘社区。我最喜欢的一个,里面的管理员特别特别好!学密码的同行一定要常去这两地方,受益匪浅的啊!!!

http://www.openssl.org/

http://www.mathmagic.cn
www.yantuo.com

http://www.team509.com/这网站的东西绝对精华,而且站点是美国的。很不错的。吸其精华,弃其糟粕,以强国人。

2010年6月8日星期二

Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 解决方案

问题描述:
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

Fatal error: Unknown: Failed opening required '/usr/local/apache/htdocs/filename.php' (include_path='.:/usr/local/php/lib/php') in Unknown on line 0

问题的原因是 : 你的 filename.php文件 在这个用户下不具有 可读的权限 通过 ls -l 查看 文件的权限 然后更改权限(添加读权限 chmod +r filename.php)就不会出现这个问题了...

vsftpd服务器出现553 Could not create file与 500 OOPS: cannot change directory错误

vsftpd服务器出现553 Could not create file与 500 OOPS: cannot change directory错误
题目够长呵呵
这两个是我在安装配置vsftpd、建的虚拟用户后上传时一直头疼的错误,所以都拿出来摆摆:
首先 553 Could not create file
 这个顾名思义  没有创建(写)文件的权限,
    write_enable=YES ,这个是主要的,
另外,更主要的(呵)是你要把这个安放文件的主目录下的文件夹权限改下,
例如:sudo chmod 775 /var/small2/

再一个:500 OOPS: cannot change directory错误(上传时遇到)
  我是把文件夹属主改了sudo chown small2 /var/small2/
  因为这个用户的建立是在另一个用户下sudo useradd加上的,其文件夹属主也随之了

以上是我遇到的问题及解决办法(前提是在其它设置都正常之下),
该错误诸君有则改之,无则加冕?呵~

vsftpd 553 Could not create file问题的解决方法

当需要用VSFTPD服务器,上传文件的时候出现:

vsftpd 553 Could not create file错误

解决方法:比如上传的文件目录是/var/www,而该目录的权限是root,你的用户是test,不具有改目录的权限。
则需要输入:chown test /var/www
然后再次上传文件,即可解决问题。

2010年6月7日星期一

Server sent unexpected return value (405 Method Not Allowed) in response to 问题的解决方法

 

I have never seen this error before. Can someone help me?

Solution

I managed to solve the problem:

  • Delete the parent's directory of the folder giving the problem.
  • Did SVN Update
  • A folder with the same name as the new one already existed in repository.
  • Delete this folder
  • SVN Commit
  • Copy the new folder, Schedule for addition and SVN Commit

 

源文档 <http://serverfault.com/questions/11996/subversion-error-405-method-not-allowed-in-response-to-mkcol>

 

 

What does Subversion "405 Method Not Allowed" mean?

The error message "Server sent unexpected return value (405 Method Not Allowed) in response to MKCOL request for..." means that the commit to the Subversion repository failed. There are a few possible explanations and solutions.

  • You may have performed an svn move twice before attempting to commit. Either move once and commit, or, if you decide after the move that you need to move it elsewhere, use svn revert to revert the first move, then svn move to move it where you want, then commit.
  • Something in your working copy may have got confused. Run clean up on your working copy. If this option does not resolve the problem, try renaming the top-level folder of your working copy and check out a new copy.
  • The length of your pathname could be causing issues. Windows doesn't support relative paths with more than about 255 characters. To avoid this, use absolute paths everywhere. One solution might be to check out the working copy into a shorter path.
  • The size of your file could be causing timeout issues. This is more of an Apache issue, but it can cause svn errors.

 

源文档 <http://help.collab.net/topic/faq/405_method_not_allowed.html>




2010年6月4日星期五

如何安装xapian

Xapian 是一个搜索引擎库,GPL许可。 C++编写的,,支持在Perl、Python、PHP、Java、Tcl、C#和Ruby中使用。

  • 在Ubuntu中安装Xapian非常简单,http://www.xapian.org/download.php ,根据其中的介绍,设置好source.list后,直接apt-get即可。我是在软件包管理器中直接勾选按装的.

在windows上安装,就比较麻烦了.需要先下载源码,然后编译.

1.下载xapian-core-0.9.9,xapian-bindings-0.9.9和win32.zip

2.新键文件夹xapian, 将下载的文件解压后分别放在xapain目录下.结构是

  • xapian\xapian-core-0.9.9
    • xapian\xapian-core-0.9.9\win32
    xapian\xapian-bindings-0.9.9

3.编辑xiapian\xiapian-core-0.9.9\win32\config.mak

  • CPPFLAGS_EXTRA=/I..\include /I..\common /I"D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include" /I"D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include" LIBFLAGS=/LIBPATH:"D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Lib" /LIBPATH:"D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib"

4.到win32目录下执行putmakfiles 5.到xapian-core-0.9.9的每一个子目录下编辑win32.mak, 在LIB32_FLAGS的最后加上$(LIBFLAGS)

5.设置环境变量path,追加D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin;D:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE;D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include;D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Lib

6.到win32目录下执行nmake win32.mak 7.到xapian-bindings-0.9.9\python目录下执行nmake win32.mak

大功告成~~~~~~~

来源:http://wiki.woodpecker.org.cn/moin/xapian001



开始学习xapian了,记录一下

既然要学习xapian,当然要知道在什么地方下载xapian了。

http://xapian.org/download

下载地址如上:

Adding this PPA to your system

You can update your system with unsupported packages from this untrusted PPA by adding ppa:xapian-backports/ppa to your system's Software Sources. (Read about installing)

Technical details about this PPA

This PPA can be added to your system manually by copying the lines below and adding them to your system's software sources.

Display sources.list entries for: ubuntu 10.4 lucid
  deb http://ppa.launchpad.net/xapian-backports/ppa/ubuntu lucid main  deb-src http://ppa.launchpad.net/xapian-backports/ppa/ubuntu lucid main 
Signing key:
1024R/A0735AD0 (What is this?)
Fingerprint:
3172410B048C8FFCBEC377962A73995FA0735AD0

这里有一篇文章:

Xapian VS PyLucene

今天初步比较了一下xapian和pylucene

  • 将大约10万条数据分别用xapian和pylucene建立索引,然后再分别搜索相同的词。 建立索引的时间,xapian和pylucene用的时间差不多,感觉上xapian略快一点。

    在索引文件的大小上,xapian的索引文件是pylucene的十倍多,原因可能是我自己写的分词模块造成的,分词是这样的“大家好,这是一个测试”分 别为"大 大家 家 家好 这 这是 是 是一 一 一个 个 个测 测 测试”这样可能造成了很多垃圾关键词。而pylucene 使用的是PyLucene.ChineseAnalyzerPyLucene的分词应该比我的更科学。 索引建立好以后,进行搜索,搜索同样一个词,xapian的搜索速度是pylucene的几百倍,pylucene用0.227505922318秒,xapian用了0.000517129898071秒。 看来搜索效率上,xapain确实比pylucene快一些。 这只是一个简单的比较,可能很多地方并不是很科学,所以,也并不能说明什么问题。

    来源:http://wiki.woodpecker.org.cn/moin/XapianVsPyLucene


    看来还是xapian强一些!


2010年6月3日星期四

linux(redhat)系统启动级别设置

1、LINUX系统启动级别
查看/etc/inittab文件,其主要内容如下:
# 0 - halt (Do NOT set initdefault to this)

# 1 - Single user mode

# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)

# 3 - Full multiuser mode

# 4 - unused

# 5 - X11

# 6 - reboot (Do NOT set initdefault to this)

#

id:5:initdefault:
... ...

0:停机(不要设置为启动默认级别)
1:单用户模式
2:多用户,无NFS(如果您没有配置网络,该级别与3一样)
3:完全多用户模式
4:不使用
5:X11图形模式
6:重启(不要设置为启动默认级别)
如果想让系统不用图形模式登陆可将id:5:initdefault: 中的5改为3即可。

2、Linux运行级别

Linux 启动时,运行一个叫做init 的程序,然后由它来启动后面的任务,包括多用户环境,网络等。
那么,到底什么是运行级别呢?简单的说,运行级就是操作系统当前正在运行的功能级别。这个级别从1 到6
,具有不同的功能。这些级别在/etc/inittab 文件里指定。这个文件是init
程序寻找的主要文件,最先运行的服务是那些放在/etc/rc.d 目录下的文件。
大多数的Linux 发行版本中,启动脚本放在/etc/rc.d/init.d,这些脚本被ln 命令来连接到 /etc/rc.d/rcn.d
目录(这里的n 就是运行级0-6)。如:/etc/rc.d/rc5.d 下面的S10network
就是连接到/etc/rc.d/init.d下的network 脚本的。因此,我们可以知道,rc5.d 下面的文件就是和运行级5 有关的。

2010年6月2日星期三

Failed to open/create the internal network 'HostInterfaceNetworking-wlan0' (you might need to modprobe vboxnetflt to make it accessible) (VERR_SUPDRV_COMPONENT_NOT_FOUND).问题解决

今天开机使用VirtualBox OSE ,突然发现如下的错误:

启动虚拟电脑 winxp 失败.
Failed to open/create the internal network 'HostInterfaceNetworking-wlan0' (you might need to modprobe vboxnetflt to make it accessible) (VERR_SUPDRV_COMPONENT_NOT_FOUND).
Please install the virtualbox-ose-dkms package and execute 'modprobe vboxdrv' as root (VERR_SUPDRV_COMPONENT_NOT_FOUND)

用Google搜得一个解决方法:
打开控制台,输入:modprobe vboxnetflt命令

然后再次使用VirtualBox OSE ,打开winxp虚拟机,OK!

原因:
该问题是由于在系统开机的时候,vboxnetflt模块没有正常加载造成的。

有时间的XDJM,看看这篇文章吧:

VERR_SUPDRV_COMPONENT_NOT_FOUND on VirtualBox

6 January 2009

If anybody is getting the VERR_SUPDRV_COMPONENT_NOT_FOUND error when trying to start a VM in VirtualBox when trying to set up Host Interface networking, the error is occurring because VirtualBox can’t communicate with the vboxnetflt driver.

To fix this, simply load the vboxnetflt module:

  # modprobe vboxnetflt

Then, try starting the VM again. If it works, you know that the problem is that the vboxnetfltmodule is not loading on startup.

If it didn’t work, make sure the module has been built. A little # /etc/init.d/vboxdrv setupought to do the trick.

On most Linux systems, you can add an entry to /etc/modprobe.conf to make the module load on startup. (On OpenRC-based Gentoo systems, you can add an entry to /etc/conf.d/modulesto do it the Gentoo Way™.)

来源:http://jeremy.visser.name/2009/01/06/verr_supdrv_component_not_found-on-virtualbox/

2010年6月1日星期二