Archive for 2月, 2009

在你最美的时候遇见了谁

Posted in 搬家之前, 生活琐碎 on 2月 28th, 2009 by 飘(piao2010) – Be the first to comment

文章是转载的,觉得挺有哲理的.o(∩_∩)o…

 

世界上有两种可以称之为浪漫的情感,一种叫相濡以沫,另一种叫相忘于江湖,我们需要做的是争取和相爱的人相濡以沫,和次爱的人相忘于江湖,也许不是不曾心动,不是没有可能,只是有缘无份,情深缘浅,我们爱在不对的时间。

回首往事的时候,想起那些如流星般划过生命的爱情,我们常常会把彼此的错过归咎为缘份,其实说到底,缘份是那么虚幻抽象的一个概念。

真正影响我们的, read more »

find命令相关

Posted in FreeBSD, Linux, 搬家之前 on 2月 27th, 2009 by 飘(piao2010) – Be the first to comment
find 其实是一个很有用的工具,且常用的工具。

◎find - walk a file hierarchy  
          在一个档案等级制度中游走 顾名思义 也就是搜寻
◎语法: find  path  operators
                path:路径  operators:运算子(参数)
           
◎operators: 常用的参数如下 (若有疑义请参阅man page 为准
               ★号表示重要… 
       1. -atime n: 用档案存取时间(access)为搜寻条件,n 为数字代表期,
                     单位是24小时。
                     
         ★解:     n不带正负时,表示距今从目前这个期到下个期为止 
                     n为负号时(-),表示距今这个期之前。 read more »

centOS

Posted in Linux, 搬家之前 on 2月 22nd, 2009 by 飘(piao2010) – Be the first to comment

  之前接触的是FreeBSD,最近想学习一下Linux,朋友推荐centOS,于是就打算在服务器上装一个跑跑。

下载安装就不说了,都挺简单的。设置好网络,配置好SSH,基本上和BSD下一致。然后准备安装软件,yum命令听说特别好用,哈哈!首先设置一下,这里采用的是科大的 http://centos.ustc.edu.cn/

步骤一:

 cd /etc/yum.repos.d

mv CentOS-Base.repo  CentOS-Base.repo.save

wget http://centos.ustc.edu.cn/CentOS-Base.repo.5

mv CentOS-Base.repo.5 CentOS-Base.repo

步骤二:

rpm –import http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5

然后yum update一下。

接下来安装软件就爽了。yum install XXX

配置软件的过程和BSD下基本一致,但是yum命令比BSD的ports更快更简单。

 

Sniffit官方文件

Posted in FreeBSD, 搬家之前 on 2月 13th, 2009 by 飘(piao2010) – Be the first to comment

 

官方的文件通俗易懂,相信有需要的朋友们一看就能明白。

#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#
*                         Sniffit V.0.3.7 Beta                                *
#                          By Brecht Claerhout                                #
*                                                                             *
#  This program is intended to demonstrate the unsafeness of TCP (currently)  #
*                 No illegal activities are encouraged!                       *
#                     Please read the LICENSE file                            #
*                                                                             *
#  Sniffit grew a little upon its original intentions and is now              #
*  extended for network debugging (UDP, ICMP, netload, etc.)                  *
#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#
*                          Libpcap library                                    *
#      This product includes software developed by the Computer Systems       #
*           Engineering Group at Lawrence Berkeley Laboratory.                *
#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#

0. Introduction, and some stuff you should know.
        0.1 Credits and contact
        0.2 Compiling
        0.3 License 
1. Programmers notes
 excuses for my incompetence
2. Use of the program
 flags and examples
3. Extra info on use
        3.1 Running interactive mode
 3.2 Forcing network devices   (*READ*)
 3.3 Format of the config file
 3.4 Loglevels
4. The output
 4.1 Normal
 4.2 Logfile
5. IMPORTANT NOTES, READ!
 this also!

——————————————————————————

0. Introduction, and some stuff you should know.
————————————————

0.3.7 (Beta). It has been a while I know. But this year has been a hell, last
year of uni, projects, thesis, …. it didn’t stop. Well that is behind us
now, the most important thing, is that I’m back working on the program again,
and intend to keep on doing it.

I hope you enjoy this beta version. Like always, I removed some bugs. There
is a new ‘logging’ feature. It is now possible to record traffic with
Sniffit and process it later! (it is completely different from the logging
done in the 0.3.6 version, that is known to some hardcore Sniffit users)
Please take a minute to skim through the text and read the passages marked
with a ‘*’, these are the new features.
(Please read BETA-TESTING)

I use the libpcap library developed at Berkeley Laboratory, for easy
porting (Read the licence).

0.1 Credits and contact
———————–

Credits go to (in order of appearance on the Sniffit scene):
    Wim Vandeputte <wvdputte@reptile.rug.ac.be>,
     best friend and UNIX guru, for support, testing and
                   providing me with a WWW site.
    Godmar Back, for fixing that kernel 1.2.X bug (Sniffit 0.1.X).
    Peter Kooiman, of Paradigm Systems Technology for providing read more »

FreeBSD:OpenSSH

Posted in FreeBSD, 搬家之前 on 2月 13th, 2009 by 飘(piao2010) – Be the first to comment

文章参考别人的o(∩_∩)o… 

客户端用密钥方式登陆到 FreeBSD SSH服务器

一、密匙认证原理简介
  密匙认证需要依靠密匙,首先创建一对密匙(包括公匙和私匙,用公匙加密的数据只能用私匙解密),把公匙放到需要远程服务器上,私钥放在客户端。这样当登录远程服务器时,客户端软件就会向服务器发出认证请求;服务器收到请求之后,先在服务器的宿主目录下寻找你的公匙,然后检查该公匙是否是合法,如果合法就用公匙加密一随机数生成所谓 read more »

freebsd:socks5代理服务器

Posted in FreeBSD, 搬家之前 on 2月 12th, 2009 by 飘(piao2010) – Be the first to comment

因为配置很简单,算是原创吧。o(∩_∩)o…

freebsd# whereis socks5
socks5: /usr/local/bin/socks5 /usr/local/man/man1/socks5.1.gz /usr/ports/net/socks5
freebsd# cd /usr/ports/net/socks5

然后make install

完成后/etc/rc.conf 增加一条:socks5_enable=”yes”

配置文件:/usr/local/etc/socks5.conf

#指定SOCKS v5绑定的ip地址和监听的端口。如果不指定绑定的IP将使用0.0.0.0
set SOCKS5_BINDINFC 0.0.0.0:1080
#忽略ident请求。当客户机没有运行identd时,使用SOCKS5_NOIDENT将降低超时值
set SOCKS5_NOIDENT
#指定连接停顿最长时间。超过最大值后, read more »

freebsd:Nginx+php+mysql

Posted in FreeBSD, 搬家之前 on 2月 10th, 2009 by 飘(piao2010) – Be the first to comment

文章是参考别人的,本人是在原先lighttpd+fastcgi(php)+mysql环境下直接安装nginx,然后修改相关配置文件/usr/local/etc/nginx/nginx.conf

location / {

root    /usr/local/www/nginx;

index    index.php index.html index.htm;

}

location ~ \.php$ {

fastcgi_pass    127.0.0.1:9000;

fastcgi_index   index.php;

fastcgi_param     SCRIPT_FILENAME     /usr/local/www/nginx$fastcgi_script.name;#PHP文件所在目录

include      fastcgi_params;

}

本来是很简单的一个过程,启动的时候出现了问题,unknown “fastcgi_script” variable

然后只能把

fastcgi_param     SCRIPT_FILENAME     /usr/local/www/nginx$fastcgi_script.name;

修改成

fastcgi_param     SCRIPT_FILENAME     /usr/local/www/nginx;

启动时候是不报错了,但是访问PHP文件出错nginx No input file specified

结果在网上找了一堆资料搞了半天,很多提到php.ini里面的相关设置。 read more »

入侵检测系统IDS(FreeBSD:Snort)

Posted in FreeBSD, 搬家之前 on 2月 9th, 2009 by 飘(piao2010) – Be the first to comment

文章是参考别人的,经本人测试:freebsd7.0+lighttpd+php5+mysql5+snort2.7,安装过程大同小异,Snort我也是采用ports安装的,访问acid点击Create Acid AG 创建相关数据表的时候遇到了问题,只能根据相应php文件的代码手工在mysql中创建相关的字段,另外规则文件需要去官方网站注册后下载,如果不注册只能下载低版本的。花了一个晚上时间终于搞定,大家元宵节快乐!o(∩_∩)o…

1.Snort简介

Snort 是一个强大的轻量级的网络入侵检测系统。它具有实时数据流量分析 read more »


无觅相关文章插件,快速提升流量