Twitter Weekly Updates for 2009-08-17

August 16th, 2009 BianJiang No comments
  • 大裤衩设计师公开承认:央视大楼是色情玩笑 http://twokeqi.blog.163.com/blog/static/8992656320097141357851/ #
  • Linux Kernel 2.x sock_sendpage() Local Root Exploit http://milw0rm.com/exploits/9436 #
  • twitzap down? Service Unavailable #
  • Local Privilege Escalation On All Linux Kernels http://bit.ly/wLa3H #
  • RT: @jlguo: 还有65万,加油啊。 @flyshow RT @GongmengOCI: 截至8月13日,公盟共收到社会各界以各种方式捐款845783元。 #
  • Real men program in C http://bit.ly/h9h2s #
  • RT: @qingfeng: RT @nasiless: 上海情侣网吧门 http://is.gd/2g1Dr // 很好很强大 // 现在的年轻人都很奔放。 #
  • 问啥老板喜欢在周末开会。。。 #
  • Wordpress 2.8.3 Admin Reset Exploit http://bit.ly/AzQt6 #
  • tig, the ncurses front-end to Git http://bit.ly/KrLbk #
  • RT: @hugege: 又花了几百美元买主机啦,希望这次是真的有SSH的 // 是不是想把国外的主机都感受一圈。 in reply to hugege #
  • RT @lidaobing linux下poll和epoll内核源代码剖析 http://ff.im/-6zYTS #
  • Pro Git professional version control http://progit.org/book/ #
  • RT @lwnnet Another kernel NULL pointer vulnerability (http://lwn.net/Articles/347006/rss) #
  • RT @herock New blog post 开通了Google Voice: 终于搞定Google Voice,得到了一个永久的美国号码和美国本地通话全免费,全球免费SMS的服务(据称),后两者我自己还没有做过充分.. http://bit.ly/x0as8 #
  • RT: @qingfeng: 再次声明一下,新的BPUG聚会是2009.9.5(日),报名地址: http://bit.ly/DoGMi #
  • RT: @limodou: RT @qingfeng: 9月10日,BPUG2009年第二次Python聚会Topic征集通告:)http://bit.ly/rHBzV 我去讲uliweb #
  • RT: @mranti: In today’s Tan Zuoren trial, ALL witnesses detained or stopped before court starts. RT @wenyunchao: 冉云飞: 所有证人均未准到场完全是无证庭审 #
  • RT: @mranti: Pic: Ai Weiwei with the policeman who detains him. RT @wenyunchao: 艾神早上电梯间自拍: http://trunc.it/19mrc #
  • RT @isaac RT @mranti Ai Weiwei beaten by Sichuan police RT @pearlher 去成都给谭作人一案充当证人的艾未未一行,凌晨在旅馆遭警方扣押看管问话。被要求不得前往法院作证。同时艾未未遭到警方暴力对待,被殴打,正在医院医治 #
  • RT: @hugege: RT @isaac rt @wenyunchao: 香港now宽频发表声明:本台(now新聞台)在成都的採訪隊亦都被公安禁止採訪,大批便衣公安聲稱收到市民舉報,說房間內有違禁品,禁止記者離開,不過公安並無出示任何的証件。 #
  • Evaluation of Flash File Systems for Large NAND Flash Memory http://tinyurl.com/nkorla #
  • Embedded Linux Conference 2009. http://www.celinuxforum.org/CelfPubWiki/ELC2009Presentations #
  • A short history of btrfs http://lwn.net/Articles/342892/ #
  • twhirl twitterfox 都可以更新了,哈哈 #

Powered by Twitter Tools.

Categories: Others Tags:

通过修改Host访问Google picasaweb

August 12th, 2009 BianJiang No comments

Google picasaweb 被封,无法看到图片,找个几个IP暂时可以用。

203.208.39.104 picadaweb.google.com
203.208.39.104 lh1.ggpht.com
203.208.39.104 lh2.ggpht.com
203.208.39.104 lh3.ggpht.com
203.208.39.104 lh4.ggpht.com
203.208.39.104 lh5.ggpht.com
203.208.39.104 lh6.ggpht.com

把上面的地址更新进hosts就好了。
Linux: /etc/hosts

FuckGFW

Categories: Geek Tags: , , ,

Twitter Weekly Updates for 2009-08-10

August 9th, 2009 BianJiang No comments
  • ICMP 的速度已经优化到0.6ms, 估计还可以优化0.2ms左右。 #
  • — 192.168.0.100 ping statistics —156 packets transmitted, 156 received, 0% packet loss, time 155005msrtt min/avg/max/mdev = 0.601/0. … #

Powered by Twitter Tools.

Categories: Others Tags:

Twitter Weekly Updates for 2009-08-02

August 2nd, 2009 BianJiang No comments
  • Bootkit bypasses hard disk encryption http://bit.ly/15MrJ9 #
  • XORP 真是个好东西,可以拿来测测刚写的IGMP解析协议,可以不用马上去买支持IGMP的路由器了。 http://www.xorp.org #

Powered by Twitter Tools.

Categories: Others Tags:

IGMPv3 Multicasting Linux MRouter with XORP How-to on Ubuntu

July 31st, 2009 BianJiang 4 comments

今天在wikipedia看IGMP的时候,无意中发现了XORP, 简单适用了一下非常好用,并且官方的资料真理的比较全,使用也比较方便,还提供了一个基本的shell xorpsh 来配置管理信息。刚好可以省去买支持IGMP的路由器,支持IGMP的路由器最少也要1.5W…

XORP, or Extensible Open Router Platform, is an open source routing software suite, aimed at being both stable and fully featured enough for production use and also extensible to support networking research.

Request:
OS: ubuntu 9.04 (Linux Kernel 2.6.28-11-generic) with GCC 4.3.3
SW: XORP (multicast routing daemon)
HW: PC with 2 or 3 ethernet card (default gw is itself) !

Step 1: Check Linux Kernel Functions!
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MROUTE=y
After this configurations, the linux kernel support IGMP, DVMRP and MOSPF. If want support PIM-SM , do below settings
CONFIG_IP_PIMSM_V2=y
PS: you can use vi view /boot/CONFIG-(kernel version) to confirm !

Step 2: edit /etc/sysctl.conf to enable ip_forward
net.ipv4.conf.default.forwarding=1
PS: reboot or use command “sysctl -p” to enable !

Step 3: Install XORP(To compile XORP requires nearly 1.4GB of free disk space)
Step 3.1: Download xorp-1.6.tar.gz
Step 3.2: untar the xorp-1.6.tar.gz
Step 3.3: ./configure
Step 3.4: make
Step 3.4-1: make check (just to check)(it is not necessary)

Step 4: run  rtrmgr/xorp_rtrmgr  rtrmgr/xorpsh (A sample xorp command shell)
Step 4.1: create user group named “xorp”

sudo addgroup xorp

Step 4.2: cp or edit config.boot in xorp-1.6/rtrmgr/config.boot
config.boot for our environment

protocols {
fib2mrib {
disable: false
}
igmp {
disable: false
interface eth0 {
vif eth0 {
disable: false
version: 3
enable-ip-router-alert-option-check: false
query-interval: 125
query-last-member-interval: 1
query-response-interval: 10
robust-count: 2
}
}
}
}
fea {
unicast-forwarding4 {
disable: false
}
}
interfaces {
restore-original-config-on-shutdown: false
interface eth0 {
disable: false
discard: false
description: “”
default-system-config {
}
}
}

Step 4.3: xorp-1.6/rtrmgr/xorp_rtrmgr -b xorp-1.6/rtrmgr/config.boot

Step 5: Check Mrouter work OK
Step 5.1: Connect eth0 to VLC Player server PC and connect eth1 to VLC Player client PC
Step 5.2: Use VLC Player server PC run multicast streaming
Step 5.3: Use VLC Player client PC to play multicast streaming by multicast URL

Step6: run rtrmgr/xorpsh (A sample xorp command shell)

xorp-1.6$ rtrmgr/xorpsh
Welcome to XORP on wifihack

border@wifihack> show igmp ?
Possible completions:
group                Display information about IGMP group membership
interface            Display information about IGMP interfaces

border@wifihack> show igmp group
Interface    Group           Source          LastReported Timeout V State
eth0         224.0.0.2       0.0.0.0         192.168.1.134     240 3     E
eth0         224.0.0.22      0.0.0.0         192.168.1.134     240 3     E
eth0         224.0.0.251     0.0.0.0         192.168.1.134     232 3     E
eth0         224.0.0.252     0.0.0.0         192.168.1.30     232 3     E
eth0         239.255.255.250 0.0.0.0         192.168.1.104     240 3     E

参考:
1. http://www.linuxdiyf.com/bbs/redirect.php?fid=55&tid=69157&goto=nextnewset
2. http://www.xorp.org/getting_started.html
3. “User Manual” http://www.xorp.org/releases/current/docs/user_manual/user_manual.pdf
4. http://en.wikipedia.org/wiki/XORP
5. http://en.wikipedia.org/wiki/IGMP

Categories: Kernel, OpenSource, Tech.Notes Tags: , , ,

md5 sha Deprecated since version 2.5 Use the hashlib module instead.

July 30th, 2009 BianJiang No comments

今天在安装完xmpppy-0.5.0rc1 ,在运行的时候报md5和sha被hashlib替换,查了资料才发现,在Python2.6中使用md5, sha函数不推荐直接使用而是用hashlib替代。

md5

-import md5
-def HH(some): return md5.new(some)
+import hashlib
+def HH(some): return hashlib.md5(some)

sha

-import sha
-def HH(some): return sha.new(some)
+import hashlib
+def HH(some): return hashlib.sha1(some)

都包括 md5(), sha1(), sha224(), sha256(), sha384(), and sha512()

这里给出auth.py md5和sha的patch

diff –git a/xmpp/auth.py b/xmpp/auth.py
index 6e51d72..508718a 100755
— a/xmpp/auth.py
+++ b/xmpp/auth.py
@@ -21,11 +21,11 @@ Can be used both for client and transport authentication.

from protocol import *
from client import PlugIn
-import sha,base64,random,dispatcher,re
+import base64,random,dispatcher,re

-import md5
-def HH(some): return md5.new(some).hexdigest()
-def H(some): return md5.new(some).digest()
+import hashlib
+def HH(some): return hashlib.md5(some).hexdigest()
+def H(some): return hashlib.md5(some).digest()
def C(some): return ‘:’.join(some)

class NonSASL(PlugIn):
@@ -54,15 +54,15 @@ class NonSASL(PlugIn):

if query.getTag(’digest’):
self.DEBUG(”Performing digest authentication”,’ok’)
-            query.setTagData(’digest’,sha.new(owner.Dispatcher.Stream._document_attrs['id']+self.password).hexdigest())
+            query.setTagData(’digest’,hashlib.sha1(owner.Dispatcher.Stream._document_attrs['id']+self.password).hexdigest())
if query.getTag(’password’): query.delChild(’password’)
method=’digest’
elif query.getTag(’token’):
token=query.getTagData(’token’)
seq=query.getTagData(’sequence’)
self.DEBUG(”Performing zero-k authentication”,’ok’)
-            hash = sha.new(sha.new(self.password).hexdigest()+token).hexdigest()
-            for foo in xrange(int(seq)): hash = sha.new(hash).hexdigest()
+            hash = hashlib.sha1(hashlib.sha1(self.password).hexdigest()+token).hexdigest()
+            for foo in xrange(int(seq)): hash = hashlib.sha1(hash).hexdigest()
query.setTagData(’hash’,hash)
method=’0k’
else:
@@ -81,7 +81,7 @@ class NonSASL(PlugIn):
def authComponent(self,owner):
“”" Authenticate component. Send handshake stanza and wait for result. Returns “ok” on success. “”"
self.handshake=0
-        owner.send(Node(NS_COMPONENT_ACCEPT+’ handshake’,payload=[sha.new(owner.Dispatcher.Stream._document_attrs['id']+self.password).hexdigest()]))
+        owner.send(Node(NS_COMPONENT_ACCEPT+’ handshake’,payload=[hashlib.sha1(owner.Dispatcher.Stream._document_attrs['id']+self.password).hexdigest()]))
owner.RegisterHandler(’handshake’,self.handshakeHandler,xmlns=NS_COMPONENT_ACCEPT)
while not self.handshake:
self.DEBUG(”waiting on handshake”,’notify’)

参考:
1.  hashlib http://docs.python.org/library/hashlib.html#module-hashlib