xfer.exp
来自「samba-3.0.22.tar.gz 编译smb服务器的源码」· EXP 代码 · 共 49 行
EXP
49 行
## Test file transfer## Initialisationload_lib util-defs.expload_lib smbclient.expload_lib env-single.expset timeout 60# Spawn a connectionif {![spawn_smbclient //$server/$share -U $user]} { perror "error spawning smbclient" return -1}# Create a big file, store it and fetch it againforeach { op } { "!dd if=/dev/urandom of=/tmp/file bs=1048576 count=1\r" \ "lcd /tmp\r" "put file\r" "get file /tmp/file2\r" } { set action "doing $op" set output [do_smbclient $op $action] if {[regexp "ERR" $output]} { error $action puts $output return -1 }}# Compare the two filesset output [util_start "diff" "/tmp/file /tmp/file2" ""]if {[regexp "differ" $output]} { fail "xfertest" puts $output} else { pass "xfertest"}# Clean up temporary filesfile delete /tmp/file /tmp/file2
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?