File: test-aircrack-ng-0020.sh

package info (click to toggle)
aircrack-ng 1%3A1.6%2Bgit20210130.91820bc-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 19,056 kB
  • sloc: ansic: 67,045; cs: 5,392; sh: 3,773; python: 2,565; pascal: 1,074; asm: 570; makefile: 253; cpp: 46
file content (45 lines) | stat: -rwxr-xr-x 1,016 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
# -*- tcl -*-
# The next line is executed by /bin/sh, but not expect \
exec ${EXPECT:=expect} "$0" ${1+"$@"}

set abs_builddir $::env(abs_builddir)
set abs_srcdir $::env(abs_srcdir)

exit -onexit {
    exp_internal 1
    exec rm -f pipe.cap
}

puts -nonewline "Aircrack-ng will tail PCAP files: "
flush stdout

log_user 0

exec cp ${abs_srcdir}/wep_64_ptw_01.cap pipe.cap

spawn ${abs_builddir}/../aircrack-ng -X pipe.cap
set tool_spawn_id $spawn_id

set timeout 900

# wait for startup
expect "Opening pipe.cap"

expect "got 2551 IVs"
expect "Failed. Next try with 5000 IVs."

exec cat ${abs_srcdir}/wep_64_ptw_02.cap >> pipe.cap
expect "Failed. Next try with 10000 IVs." { sleep 2 }

exec cat ${abs_srcdir}/wep_64_ptw_03.cap >> pipe.cap
exec cat ${abs_srcdir}/wep_64_ptw_04.cap >> pipe.cap
expect "got 10180 IVs"
expect {
    "Failed. Next try with 15000 IVs." { puts "OK\n"; exit 0 }
    eof { puts "FAILED"; exit 1 }
    timeout { puts "FAILED(timeout)"; exit 2 }
}

puts "FAILED(exceptional)"
exit 99