Oct 27, 2010

来刷个配置——configure replace

经常都有要刷配置的时候,第一直觉我想大部分人都是Ctrl+C,然后Ctrl+V这样。或者 copy tftp://xxx run 这样来完成。如果是一台干净的设备还问题不大,如果是一台有配置的设备,需要贴配置,这样或许不太妥。 我们假设这样一个情景,原来某设备上有一段配置: interface FastEthernet0/0   description To_XXX  ip address 13.13.13.1 255.255.255.0  duplex auto  speed auto ! interface FastEthernet0/1  description To_R2  ip address 12.12.12.1 255.255.255.0  ip ospf authentication message-digest  ip ospf message-digest-key 1 md5 cisco  duplex auto  speed auto而不幸的是,某个工程师弄错了东西改动了配置成这样了 interface FastEthernet0/0  description To_R2  ip address 12.12.12.1 255.255.255.0  ip ospf authentication message-digest  ip ospf...

Oct 21, 2010

让GFW溢出的Python代码

import socket import binascii import time import threading class DataReceiver:     def __init__(self, s):         self.s = s     def __call__(self):         while True:             r = s.recvfrom(65535)[0]             i = 0             while i < len(r):                 print '%04x:' % i,                 p = list(r[i : i + 16])                ...

Oct 19, 2010

Juniper JNCIA 笔记

别人写的,还是不错的。 点这...

Pages 251234 »
Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Powered by Blogger