October 31st, 2009 | Tags:

昨天晚上的《项目管理》,让我受益匪浅。其中令我印象比较深刻的部分就是项目管理老师,以一个小公司老板的身份来给我们讲述他自己的公司和项目从无到有的过程。讲述过程中,他提到了他曾经雇佣的前两个工程师问题比较大,严重滞后了项目的进度。针对这一点,我比较有兴趣,因为很可能我毕业之后也要做一个工程师,所以就在后面的提问过程中请他着重讲解前两个工程师的问题所在。他提出以下几点:

一,“沟通能力差”。我们老师要了解项目进展速度,打个电话过去问,结果伊在电话上支支吾吾说不出个所以然来。

二,“项目做不出来就懵了”。也就是说,在做项目的过程中遇到困难就不知道该怎么进行了,索性就放下来不做了。老师三个月前交给他的任务,到截止期限一问,伊说没做,然后列出一大堆借口。

三,“不知变通”。这四个字是我概括的,不是十分准确,就是说当那个工程师明知道做不出来的时候,他还是会拖到最后期限,然后告诉老板没做、做不了、不会做。他不知道知难而退,在明知自己无法完成的时候提前向老师通知,以便老师换个能力更强的工程师,继续把项目做下去。

四,“自尊心强”。工程师的自尊心都很强。如果你没有两把刷子镇住他,他就想镇住你。

这就是我们老师从一个老板的角度来评论工程师的好坏,虽不甚全面,但也具备足够的警醒意义。

October 23rd, 2009 | Tags:

在 Windows 7 里,系统预先定义了“高对比度”模式,此模式可以通过 Alt(左) + Shift(左) + PrtSc SysRq 启用,见截图。

设置高对比度

设置高对比度

启用后系统就变成了这个样子

启用高对比度

启用高对比度

如图红色框显示,Alt(左) + Shift(左) + PrtSc SysRq 既可以启用高对比度模式,也可以关闭高对比度模式。但实际上,你是没办法通过 Alt(左) + Shift(左) + PrtSc SysRq 三个组合键关闭高对比度模式,不知道是系统 Bug 还是我的操作问题。

那么如何关闭呢?很简单,通过更换系统主题即可解决。

October 23rd, 2009 | Tags:

先把实际截图放出来

Virtual CloneDrive

Virtual CloneDrive

官方介绍如下:

虚拟CloneDrive工作表现就象是实际存在的CD/DVD外设, 尽管它不是以实物形式存在. CloneDVD或者CloneCD生成的镜像文件可以被从硬盘上或者网络盘上”装入”到虚拟设备,因此可以被当作普通的CD/DVD使用.

虚拟CloneDrive也许是最好的虚拟外设软件, 允许你享受到虚拟外设的自由,并且是免费的.

是不是 the best virtual drive software ,这个见仁见智吧,毕竟还有很多优秀的类似软件,比如免费的 Daemon Tools 等等。但是它的特点还是很不错的:

支持所有的通用镜像格式,例如ISO, BIN, CCD
同时支持最多八个虚拟外设
容易使用 – 只要双击镜像文件,载入为虚拟外设
虚拟CloneDrive是免费软件, 你不需要支付任何费用就可以使用.

在 System Requirements 里,官方并未明确标明支持 64bit Windows 7 ,但经过实际测试,它在 64 位 Windows 7 上运行完全良好,未出现任何问题。

那么相对于 Daemon Tools ,它有什么好处呢?

首先,安装软件较小。Daemon Tools 的安装包已经做到了 7.xMB,而 Virtual CloneDrive 才 1.xMB。

其次,不含无用组件。我记得 Daemon Tools 会偷偷安装一个 search bar ,这个 search bar 指的是出现在桌面上,紧靠任务栏上方的那个搜索工具条,而不是 ie 工具条。在安装的过程中还会显示另外一个 ie 插件,所幸后者是可选的。

最后,与 64 位 Windows 7 兼容良好,还没遇到过任何问题。我没在 Windows 7 上用过 Daemon Tools,不知道后者是不是存在兼容性问题。

好处列了三条,缺点也有

首先是支持的文件格式可能没有Daemon Tools 多,Virtual CloneDrive 并未明确注明支持哪些文件格式,但在我印象中 Daemon Tools 几乎支持所有的镜像格式。

其次是对一些受版权保护光盘支持可能不如 Daemon Tools。我没有实际测试,印象中 Daemon Tools 对一些应用了特殊保护的光盘也能很好的支持,这是一个很优秀的特性,Virtual CloneDrive 可能并不具备。

最后,Daemon Tools 已经免费发布多年,在软件界有口皆碑,而这个 Virtual CloneDrive 似乎就没有那么悠久的历史了。

Anyway, it’s up to you.

相关链接
Virtual CloneDrive Homepage

October 19th, 2009 | Tags:

今天听了某个讲座,讲座人和题目都不介绍了,容易泄漏我个人信息。

讲座内容的 Abstract 如下:

The wealth of data available on the Internet changes the way we think about multimedia. Never before has there been so much data available for training models and answering questions. But these new riches bring with it a change in the problems we must think about. The data is noisy and largely unlabeled — we must make sense of it, often returning an answer in hundreds of milliseconds. How do we take into account context and do it at the scale of the Internet? In this talk I’d like to share with you Yahoo’s experiences in this brave new world of multimedia everywhere, describe promising new technologies, and discuss open research directions. I will describe the need for better models, the kinds of algorithms needed for today’s large databases, and how the Internet is changing multimedia retrieval.

Internet正以其前所未有的方式向我们提供着丰富的数据资源,这些可用数据的出现改变着我们对多媒体信息的思考方式。一方面,这些数据为我们提供了新的机遇,我们可以利用它们来训练模型、发现其中蕴含的知识等。而另一方面,海量数据的涌现也让我们必须面对由噪声数据的影响、标注信息的缺乏所带来问题,并需要在很短的时间内理解其含义。由此,一个值得我们思考的问题是:如何将上下文的情境信息与互联网上的信息结合?在这个报告中,我将与各位分享雅虎(Yahoo!)在这方面的研究经验,讨论如何面对当今随处可见的多媒体数据、有关技术前景和将来可能的研究方向等。同时,我也会分析市场对于新模型的需求,处理大规模数据库所需的各种算法,以及Internet为多媒体信息搜索所带来的影响等。

本来这个讲座被安排到了小教室,因为这边做图像方面的人不多,而且考虑到下午还有课。结果去听的人的确不是很多,但一个小教室断然是不够用的,后来换到了大教室。

演讲者为美国人,讲的纯英文,而且语速很快。这个时候,外语水平的优劣就显现出来了,我英语水平较差,只听懂了大概 30%~40% 的样子,不过也小有收获,至少通过这次讲座,我弄明白了一个我一直弄不明白的问题– Google 的图像搜索是如何实现的。简单说来,分三步。

一,根据图片相似度选取图片,并分组。把内容相似的图片分到一个组中去,便于进一步整理。

二,对于一组图片,根据各个图片的 Tags 识别图片内容。这里面有个问题,相近的图片,它们的 Tags 并不一样。这个时候,就需要进行筛选,其目的是选取最接近图片内容的 Tags 。怎么选取呢?就是把这些 Tags 分别整理出来,并统计,出现频率最高的 Tags 即被视为最接近图片内容;那么,这一组图片的 Tags 就确定了。如果某次的搜索请求的关键词中含有某个 Tag ,只需要把对应的图片返回即可。

三,具体到搜索结果的时候,以 Google 为例,还会牵涉到 PageRank 技术–Google 会优先显示那些出现在高 PageRank 页面的图片。

演讲者还提到了 Flickr — Yahoo! 旗下的图片分享网站,其中有一句话我记忆比较深刻,大致的意思是说,Flickr 需要的 “NOT better search BUT connections(among pictures)” 。也就是说,相对于专业的搜索引擎(比如 Google/Yahoo! Image Search)而言,Flickr 需要的不是更精准的搜索结果,而是为图片建立相互的关联性。说实话,这大大超出了我的概念,因为我一直以为,在进行信息检索的时候,结果的精准和全面是绝对第一位的;现在才知道,技术的发展和研究方向被实际需求所决定。

Update: 追加一点,相对于文本搜索,用户对于图像搜索结果的行为显得更为盲目。比如,某个人只是想搜一下麦当娜,凑巧,返回结果里返回了 Britney Spears ,大家知道,布兰妮对大部分人的吸引力还是要比麦当娜大一些的,这样就有可能出现很多人去点击查看布兰妮图片的现象。这个时候,如果按照文本搜索的思想,点击量高的链接所占权重大,这个错误的图片就有可能被“顶”上首页,这是我们所不希望的。所以,在图像搜索领域,或者说多媒体搜索领域,必须降低用户行为对搜索结果的影响这一权重。

October 13th, 2009 | Tags:

称之为“教程”其实很惭愧,我其实才第二次使用 MySQL 命令。第一次使用的时候是十几天前,很多命令都已经忘了。这一次不能在“重蹈覆辙”,必须记下来。

假设环境如下,MySQL 服务器安装在本地,我们有一个适当权限的用户,账号为 proftpd ,密码为 123456。该用户对 proftpd 库有完全控制权限,我们的任务是,在 proftpd 库的某一个表里添加一条数据。换句话说,其实就是给 proftpd 服务器加一个管理员账号。

步骤如下:

[root@localhost ~]# mysql -h localhost -u proftpd -p #连接 MySQL
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 29342 to server version: 5.0.18

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> SHOW DATABASES; #列出所有数据库的名字
+——————–+
| Database |
+——————–+
| information_schema |
| proftpd |
| test |
+——————–+
3 rows in set (0.00 sec)

mysql> USE proftpd; #选择 proftpd 数据库
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SHOW TABLES; #列出 proftpd 数据库中的所有表
+——————-+
| Tables_in_proftpd |
+——————-+
| ftpadmin |
| ftpgroups |
| ftphomework |
| ftpusers |
+——————-+
4 rows in set (0.00 sec)

mysql> DESCRIBE ftpadmin; #显示 ftpadmin 表的结构
+———–+———+——+—–+———+——-+
| Field | Type | Null | Key | Default | Extra |
+———–+———+——+—–+———+——-+
| userid | text | NO | | | |
| passwd | text | NO | | | |
| uid | int(11) | NO | | | |
| gid | int(11) | NO | | | |
| home | text | YES | | NULL | |
| shell | text | YES | | NULL | |
| count | int(11) | YES | | NULL | |
| host | text | YES | | NULL | |
| lastlogin | text | YES | | NULL | |
+———–+———+——+—–+———+——-+
9 rows in set (0.04 sec)

mysql> SELECT * FROM ftpadmin; #显示 ftpadmin 表的内容
+———–+————+—–+——+—————+————-+——-+—————–+———————+
| userid | passwd | uid | gid | home | shell | count | host | lastlogin |
+———–+————+—–+——+—————+————-+——-+—————–+———————+
| w******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 527 | x.x.x.50 | 2009-10-13 16:55:56 |
| l******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 103 | x.x.x.197 | 2007-10-13 23:45:50 |
| z******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 28 | x.x.x.102 | 2007-11-24 08:00:28 |
| s******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 28 | x.x.x.70 | 2008-12-04 08:25:18 |
| i******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 18 | x.x.x.44 | 2008-09-22 09:48:56 |
| m******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 586 | x.x.x.10 | 2009-10-12 11:32:34 |
| h******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 5 | x.x.x.146 | 2007-09-02 19:46:51 |
| d******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 135 | x.x.x.239 | 2008-01-13 22:46:25 |
| c******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 47 | x.x.x.52 | 2008-09-16 21:20:24 |
| l******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 28 | x.x.x.12 | 2008-01-02 10:10:43 |
+———–+————+—–+——+—————+————-+——-+—————–+———————+
10 rows in set (0.00 sec)

mysql> INSERT INTO ftpadmin VALUES (‘j*’,'******’,'666′,’1000′,’/home/proftpd’,'/sbin/false’,0,NULL,NULL); #添加一条数据,实际上是添加用户。注意不要把 0 和 NULL 混用。
Query OK, 1 row affected (0.06 sec)

mysql> SELECT * FROM ftpadmin; #检查所添加的数据
+———–+————+—–+——+—————+————-+——-+—————–+———————+
| userid | passwd | uid | gid | home | shell | count | host | lastlogin |
+———–+————+—–+——+—————+————-+——-+—————–+———————+
| w******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 527 | x.x.x.50 | 2009-10-13 16:55:56 |
| l******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 103 | x.x.x.197 | 2007-10-13 23:45:50 |
| z******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 28 | x.x.x.102 | 2007-11-24 08:00:28 |
| s******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 28 | x.x.x.70 | 2008-12-04 08:25:18 |
| i******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 18 | x.x.x.44 | 2008-09-22 09:48:56 |
| m******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 586 | x.x.x.10 | 2009-10-12 11:32:34 |
| j******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 0 | NULL | NULL |
| h******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 5 | x.x.x.146 | 2007-09-02 19:46:51 |
| d******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 135 | x.x.x.239 | 2008-01-13 22:46:25 |
| c******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 47 | x.x.x.52 | 2008-09-16 21:20:24 |
| l******** | ****** | 666 | 1000 | /home/proftpd | /sbin/false | 28 | x.x.x.12 | 2008-01-02 10:10:43 |
+———–+————+—–+——+—————+————-+——-+—————–+———————+
11 rows in set (0.00 sec)

mysql> exit
Bye

October 13th, 2009 | Tags:

从 PowerPoint 2007 中复制了部分文字,粘贴到 Word 2007 时,被 Word 阻止,并跳出如下警告blockquote>Microsoft Visual Basic
该工程中的宏被禁止。请参阅联机帮助或主应用程序的文档来决定如何激活宏。

解决办法
主菜单 -> Word 选项 -> 信任中心 -> 信任中心设置 -> 宏设置 -> 启用所有宏。然后重新启动 Word 程序

需要注意的是,对于不安全文档,启用所有宏可能会带来安全性问题。

October 11th, 2009 | Tags:

最近使用 CosmosScope 做实验,在 export image 时遇到如上错误消息。首先确定是环境变量的问题,因为在我没有更改环境变量之前它一直正常。

到网上 Google 了一下,在 LinuxSir.ORG 找到了解决办法,把环境变量 LD_ASSUME_KERNEL 设置为 2.4.1 即可。为图省事,我把 LD_ASSUME_KERNEL=2.4.1 加入到 /env/environment 中了。

相关链接
version GLIBC_2.0 not defined in file libc.so.6 with link time reference

October 3rd, 2009 | Tags:

今天实验室里上网感觉不大对劲, 总是打不开网页, 怀疑有 ARP 病毒作祟, 就用 arp 命令查看了一下 ARP Entries, 结果如下:

C:\>arp -d & arp -a
接口: x.x.x.23 — 0xb
Internet 地址 物理地址 类型
x.x.x.1 00-15-f2-61-9d-fd 动态

C:\>arp -d & arp -a
未找到 ARP 项。

C:\>arp -d & arp -a
接口: x.x.x.23 — 0xb
Internet 地址 物理地址 类型
x.x.x.1 00-15-f2-61-9d-fd 动态

C:\>arp -d & arp -a
接口: x.x.x.23 — 0xb
Internet 地址 物理地址 类型
x.x.x.1 00-e0-fc-17-ea-78 动态

可以看到网关对应了两个 MAC 地址, 这其中至少有一个是病毒机. 我把两个地址都记录下来, 对实验室里所有正在运行的机子都挨个排查, 最终确定了“毒源”。

September 7th, 2009 | Tags:

今天对自制的绿色版 Dr.Web 升级,发现屡次升级都失败,提示找不到服务器。检查网络连接,正常;检查 C:\Windows\System32\Drivers\Etc\Hosts 文件,正常;nslookup 查询 Dr.Web 服务器正常;ping Dr.Web 服务器失败(见下文);重置 WinSock ,故障依旧。初步判断是因为系统感染了劫持本地 DNS 的病毒所致,于是便有了下面的杀毒历程。

先 Show 一下奇怪的现象(1.1.1.1 为虚假地址,真实地址正常)

C:\>ipconfig /all
Windows IP Configuration #经检查,所有参数都正常
Host Name . . . . . . . . . . . . : NoteBook
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8139 Family PCI Fast Ethernet NIC
Physical Address. . . . . . . . . : 00-14-78-10-24-XX
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 1.1.1.1
Subnet Mask . . . . . . . . . . . : 1.1.1.1
Default Gateway . . . . . . . . . : 1.1.1.1
DHCP Server . . . . . . . . . . . : 1.1.1.1
DNS Servers . . . . . . . . . . . : 1.1.1.1
1.1.1.1
Lease Obtained. . . . . . . . . . : 2009年9月6日 21:42:56
Lease Expires . . . . . . . . . . : 2009年9月7日 1:42:56

C:\>nslookup www.google.com
Server: 1.1.1.1
Address: 1.1.1.1
Name: www.l.google.com
Addresses: 64.233.189.103, 64.233.189.104, 64.233.189.147, 64.233.189.99
Aliases: www.google.com
C:\>Pinging www.l.google.com [64.233.189.147] with 32 bytes of data:
Reply from 64.233.189.147: bytes=32 time=46ms TTL=239
Reply from 64.233.189.147: bytes=32 time=51ms TTL=239
Reply from 64.233.189.147: bytes=32 time=66ms TTL=239
Reply from 64.233.189.147: bytes=32 time=72ms TTL=239
Ping statistics for 64.233.189.147:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 46ms, Maximum = 72ms, Average = 58ms

C:\>nslookup www.kaspersky.com
Server: 1.1.1.1
Address: 1.1.1.1
Name: www.kaspersky.com
Address: 195.27.181.10
C:\>Ping www.kaspersky.com
Ping request could not find host www.kaspersky.com. Please check the name and try again.

C:\>nslookup www.kaspersky.com.cn
Server: 1.1.1.1
Address: 1.1.1.1
Name: www.kaspersky.com.cn.fastcdn.com
Addresses: 58.198.42.10, 58.198.42.11, 58.198.42.8, 58.198.42.9
Aliases: www.kaspersky.com.cn
C:\>Ping www.kaspersy.com.cn
Ping request could not find host www.kaspersky.com.cn. Please check the name and try again.

C:\>nslookup www.drweb.com
Server: 1.1.1.1
Address: 1.1.1.1
DNS request timed out.
timeout was 2 seconds.
Name: boss.drweb.com
Address: 87.242.72.150
Aliases: www.drweb.com
C:\>Ping www.drweb.com
Ping request could not find host www.drweb.com. Please check the name and try again.

C:\>nslookup www.drweb.com.cn
Server: 1.1.1.1
Address: 1.1.1.1
Name: www.drweb.com.cn
Address: 60.217.32.246
C:\>ping www.drweb.com.cn
Ping request could not find host www.drweb.com.cn. Please check the name and try again.

C:\>nslookup www.rising.com.cn
Server: 1.1.1.1
Address: 1.1.1.1
Name: www.rising.com.cn
Addresses: 211.103.159.89, 219.238.233.203
C:\>Ping www.rising.com.cn
Ping request could not find host www.rising.com.cn. Please check the name and try again.

C:\>nslookup www.pandasecurity.com
Server: 1.1.1.1
Address: 1.1.1.1
DNS request timed out.
timeout was 2 seconds.
Name: a1331.b.akamai.net
Addresses: 61.200.81.150, 61.200.81.142
Aliases: www.pandasecurity.com, pandasecurity.com.edgesuite.net
C:\>ping www.pandasecurity.com
Ping request could not find host www.pandasecurity.com. Please check the name and try again.

先找出 Autoruns ,发现如下异常项目

HKLM\System\CurrentControlSet\Services
Nla 收集并保存网络配置和位置信息,并在信息改动时通知应用程序。 (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
HKLM\System\CurrentControlSet\Services\WinSock2\Parameters\NameSpace_Catalog5\Catalog_Entries
Tcpip Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
网络位置知晓 (NLA) 名称空间 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
HKLM\System\CurrentControlSet\Services\WinSock2\Parameters\Protocol_Catalog9\Catalog_Entries
000000000001 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000002 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000003 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000004 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000005 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000006 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000007 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000008 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
000000000009 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000010 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000011 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000012 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000013 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000014 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000015 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000016 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000017 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000018 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000019 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000020 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll
0000000000021 Microsoft Windows Sockets 2.0 Service Provider (Not verified) Microsoft Corporation c:\windows\system32\mswsock.dll

用 Process Explorer 查看进程并查询该模块,得到如下结果

mswsock.dll 注入进程

mswsock.dll 注入进程

把 c:\windows\system32\mswsock.dll 这个文件上传至 VirScan.ORG 扫描,得出结果如下

mswsock.dll 的扫描结果

mswsock.dll 的扫描结果

现在基本上已经确定了它是一个病毒,剩下的事情就好办多了。基本杀毒过程如下:
1,删除 c:\windows\system32\dllcache\mswsock.dll 和 c:\windows\system32\mswsock.dll 。此病毒的反删除能力很弱,直接使用 del 命令即可。记住要同时删除这两个文件,否则病毒还会死灰复燃。
2,在 Autoruns 里删除上述注册表项。
3,重新从 Windows 安装光盘里复制正常的 mswsock.dll 到 C:\Windows\System32 目录下
4,重新安装 Tcp/IP 协议

系统终于恢复正常了。

重启后,电脑恢复正常,无论是 Dr.Web 升级还是 Ping 那些杀毒软件的官方地址,都没有任何问题了。

相关链接
如何在 Windows XP 中重置 Internet 协议 (TCP/IP)

September 5th, 2009 | Tags:

今天想写一个批处理文件,其功能是从一个指定的 Ftp 服务器上把某个目录下的所有文件都下载下来,结果发现遇到个难题。

我本来是这样写的

C:>cat Batch.bat
@echo off && @color 0A & cls
ftp 1.1.1.1
cd /pub/files/
mget *.*

一运行,发现批处理运行到 ftp 1.1.1.1 这条命令后就出现了要求输入用户名和密码的提示。刚开始尝试替换为如下形式

ftp -a 1.1.1.1
ftp USERNAME:PASSWORD@1.1.1.1
ftp ftp://USERNAME:PASSWORD@1.1.1.1#匿名时用户名为 anonymous ,密码为空

均告失败。其中第一条的 -a 参数无效(*nix 系统中 -a 表示匿名访问,Windows 中不是),第二条和第三条报告 Unknown Host 错误。

后来在 http://technet.microsoft.com 中找到了官方的 Ftp 命令帮助页面,内容如下

ftp [-v] [-d] [-i] [-n] [-g] [-s:FileName] [-a] [-w:WindowSize] [-A] [Host]

Parameters
-v : Suppresses the display of FTP server responses.
-d : Enables debugging, displaying all commands passed between the FTP client and FTP server.
-i : Disables interactive prompting during multiple file transfers.
-n : Suppresses the ability to log on automatically when the initial connection is made.
-g : Disables file name globbing. Glob permits the use of the asterisk (*) and question mark (?) as wildcard characters in local file and path names. For more information, see Ftp: Glob
-s: FileName : Specifies a text file that contains ftp commands. These commands run automatically after ftp starts. This parameter allows no spaces. Use this parameter instead of redirection (< ).
-a : Specifies that any local interface can be used when binding the FTP data connection.
-w: WindowSize : Specifies the size of the transfer buffer. The default window size is 4096 bytes.
-A : Logs onto the FTP server as anonymous.
Host : Specifies the computer name, IP address, or IPv6 address of the FTP server to which to connect. The host name or address, if specified, must be the last parameter on the line.
/? : Displays help at the command prompt.

发现两个问题:
1,-a 指的是 interface,真难理解,难道是指定网卡或网络连接?
2,-A 才是匿名访问
3,Ftp 命令专门提供了一个 -s:FileName 参数以便登录进入服务器之后调出使用。

现在好办了,原批处理文件内容修改如下

C:>cat Batch.bat
@echo off && @color 0A & cls
ftp -A 1.1.1.1
cd /pub/files/
mget *.*

再运行一次,好了,顺利登录,但登录进入服务器之后没有自动运行后两条命令,这好办,利用 -s 命令即可。先在同目录下创建一个文本文件,文件名取为 commands.ini(与文件后缀无关),内容如下

C:>cat commands.ini
cd /pub/files
mget *.*

然后,把 Batch.bat 文件修改如下

C:>cat Batch.bat
@echo off && @color 0A & cls
ftp -s:commands.ini 1.1.1.1

再次运行之后,基本上达到了预期的目标,后来再经改进,版本如下

C:>cat Batch.bat
@echo off && @color 0A & cls
start ftp -s:commands.ini 1.1.1.1 #用 start 命令把 Ftp 动作给 fork 出来,以便继续执行下面的命令
OTHER LOCAL COMMANDS #任意本地命令
C:>cat commands.ini
USERNAME #只写用户名,不能再前面加 user 命令
PASSWORD #如果密码为空,则此行为空;必须保留这一行
cd /pub/files
prom #关闭提示,否则 mget 每次下载文件前都要手工判断 YES or NO
mget *.*

注意
此处的 cat 命令等同于 type 命令
“#” 号是注释符,仅供阅读方便

相关链接
Ftp