/ 雑記帳

lightmpd/upnpgw メンテ用スクリプト

#!/usr/bin/expect -f
set address "192.168.x.x"
set port "8023"
spawn telnet $address $port
expect "Escape character is '^]'." {
sleep 1
send "root¥r"
}
expect "Password" {
sleep 1
send "lightmpd¥r"
}
expect "#" {
sleep 1
send "mount /dev/sda1 /tmp ; df ; cd /tmp ; ls -l¥r"
}
expect "#" {
sleep 1
interact
exit 0
}
expect eof

— posted by くま at 05:55 pm  

この記事に対するコメントはありません

<< 2018.9 >>
SMTWTFS
      1
234 56 78
9101112 131415
16 1718192021 22
23242526272829
30       
 
























ThemePanel
Created in 0.0071 sec.