星期四, 八月 23, 2007

把man手册打印出来看的方法

col命令蛮好用的
COL(1) BSD General Commands Manual COL(1)
NAME
col - filter reverse line feeds from input
SYNOPSIS
col [-bfpx] [-l num]
DESCRIPTION
Col filters out reverse (and half reverse) line feeds so the output is in the correct order with only for-
ward and half forward line feeds, and replaces white-space characters with tabs where possible. This can
be useful in processing the output of nroff(1) and tbl(1).
Col reads from standard input and writes to standard output.
The options are as follows:
-b Do not output any backspaces, printing only the last character written to each column position.
-f Forward half line feeds are permitted (猬茆fine猬"猬" mode). Normally characters printed on a half line
boundary are printed on the following line.
-p Force unknown control sequences to be passed through unchanged. Normally, col will filter out any
control sequences from the input other than those recognized and interpreted by itself, which are
listed below.
-x Output multiple spaces instead of tabs.
-lnum Buffer at least num lines in memory. By default, 128 lines are buffered.




如果我们要把某个程序的man手册打印出来,可以这样
man ettercap |col -b >ettercap_man.txt
这样就可以再加工并打印出来了
哈哈

星期二, 八月 21, 2007

[转]在Linux操作系统下修改IP、DNS和路由配置

转自http://linux.chinaitlab.com/administer/728328.html



ifconfig eth0 新ip

  然后编辑/etc/sysconfig/network-scripts/ifcfg-eth0,修改ip

一、修改IP地址

  [aeolus@db1 network-scripts]$ vi ifcfg-eth0

  DEVICE=eth0

  ONBOOT=yes

  BOOTPROTO=static

  IPADDR=219.136.241.211

  NETMASK=255.255.255.128

  GATEWAY=219.136.241.254

二、修改网关

  vi /etc/sysconfig/network

  NETWORKING=yes

  HOSTNAME=Aaron

  GATEWAY=192.168.1.1

三、修改DNS

  [aeolus@db1 etc]$ vi resolv.conf

  nameserver 202.96.128.68

  nameserver 219.136.241.206

四、重新启动网络配置

  /etc/init.d/network restart

  修改ip地址

  即时生效:

  # ifconfig eth0 192.168.0.20 netmask 255.255.255.0

  启动生效:

  修改/etc/sysconfig/network-scripts/ifcfg-eth0

  修改default gateway

  即时生效:

  # route add default gw 192.168.0.254

  启动生效:

  修改/etc/sysconfig/network-scripts/ifcfg-eth0

  修改dns

  修改/etc/resolv.conf

  修改后可即时生效,启动同样有效

  修改host name

  即时生效:

  # hostname fc2

  启动生效:

  修改/etc/sysconfig/network

星期五, 八月 17, 2007

Avril Lavigne——I Will Be (一直很喜欢这首)

Avril Lavigne不对外公开的单曲“I Will Be”只有美国的歌迷在iTunes网站上付费下载艾薇儿新专辑《The Best Damn Thing》后才可以收听,并不对外公开。确实好听呀。

I Will Be
There's nothin' I could say to you
Nothin' I could ever do to make you see
What you mean to me
All the pain, the tears I cried
Still, you never said good-bye
And now I know
How far you'd go
I know I let you down
But it's not like that now
This time I'll never let you go
[Chorus:]
I will be all that you want
And get myself together
'Cause you keep me from falling apart
All my life
I'll be with you forever
To get you through the day
And make everything okay
I thought that I had everything
I didn't know what life could bring
But now I see
Honestly
You're the one thing I got right
The only one I let inside
Now I can breathe
'Cause you're here with me
And if I let you down
I'll turn it all around
'Cause I will never let you go
[Chorus]
'Cause without you
I can't sleep
I'm not gonna ever, ever let you leave
You're all I got
You're all I want
Yeah
And without you I don't know what I'd do
I could never ever live a day without you here
With me
Do you see?
You're all I need

星期一, 八月 13, 2007

不小心又中灰鸽子病毒了,搞定它

昨天从bt上down了一个软件光盘,用Daemon tools一打开,Nortun就开始报警,当时没在意,本以为Nortun能搞定这个病毒,没仔细多关照。这是Nortun的历史记录

0

今天大清早起床,本来心情还不错,因为今天天气晴朗呀。可一开机居然发现又是一个SYSTEM用户运行的IEXPLORE,以前我中过招,这次有经验。灰鸽子又发作了,看来是个变种,而且免杀的。在NAT技术广泛使用的网络时代,放木马有意思麽?哎,又惹我老人家上火。

1

看来又要我亲自动手了。

首先run一下 services.msc 看看又添了哪个异常的服务了,现在的病毒和木马真烦,整天想着把自己弄成个服务伪装一下,能骗得过高手麽?

果然有一个不正常的

2

查看一下这个东西的properties,定位一下到底哪个文件在捣乱。原来是这个文件 C:\Program Files\Common Files\Microsoft Shared\MSInfo\face.exe

3

同时查了一下system32目录下,发现这个东西居然还自己备份了一下,_face.exe

4

在正常模式下是删不掉的,灰鸽子的技术含量还是蛮高的,只好到安全模式下搞定了。

到safe mode下,删删,然后运行regedit,到HKEY_LOCAL_MACHINE\SYSTEM\CURRENTCONTRRLSET\SERVICES里把那个telligent transfer 的服务删掉。

最后,reboot

好了 ,正常了。

真实麻烦,大清早的美好时光折腾这个玩意了。

星期二, 八月 07, 2007

如何在rdesktop全屏和窗口模式中切换

rdesktop是个不错的东西,有了它,在linux上就可以远程控制windows了。不过如果使用了全屏模式,可能不知道如何切换回窗口模式,其实很简单,只要按
ctrl+alt+enter 就可以来回切换了 ,哈 这下可方便了。