4e5dfae237
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/nmap#b0d2e8add17e7c21b40790e528522977b3a0b5ed
23 lines
316 B
Plaintext
Executable File
23 lines
316 B
Plaintext
Executable File
#!/usr/bin/expect
|
|
|
|
set timeout 10
|
|
|
|
spawn ncat -vl 6666
|
|
|
|
expect {
|
|
eof { exit 2 }
|
|
default { exit 1 }
|
|
"Ncat: Connection from 127.0.0.1" { sleep 1; send -- "ServerSend\r" }
|
|
}
|
|
expect {
|
|
eof { exit 2 }
|
|
default { exit 1 }
|
|
"ClientSend\r"
|
|
}
|
|
expect {
|
|
eof { exit 0 }
|
|
default { exit 1 }
|
|
}
|
|
exit 3
|
|
|