<commit_before>#!/usr/bin/expect

set timeout 1

spawn "./gen-capture.pl"

# Choose filename
expect ":  " 
send "OK.pcap\r"

# SYNC packet
expect ":  "
send "1\r"
# Next packet
expect ")  "
send "0\r"

# Type 2 UCD
expect ":  "
send "2\r"
# TLV 1
expect ":  "
send "1\r"
# Next TLV
expect ")  "
send "0\r"
# TLV 2
expect ":  "
send "2\r"
# Next TLV
expect ")  "
send "1\r"

# Last packet
expect ")  "
send "1\r\r"

# print exit code
expect " "
send "\r"
<commit_msg>SYNC, Type 2 UCD and Request Frames support in automatic mode.<commit_after>#!/usr/bin/expect

set timeout 1

spawn "./gen-capture.pl"

# Choose filename
sleep 0.1
expect ":  "
send "OK.pcap\r"

for {set i 0} {$i < 1} {incr i 1} {

    # SYNC
    expect ":  "
    send "1\r"
    # Next packet
    expect ")  "
    send "0\r"

    # Type 2 UCD
    expect ":  "
    send "2\r"
    # TLV 1
    expect ":  "
    send "1\r"
    # Next TLV
    expect ")  "
    send "0\r"
    # TLV 2
    expect ":  "
    send "2\r"
    # Next TLV
    expect ")  "
    send "0\r"
    # TLV 3
    expect ":  "
    send "3\r"
    # Next TLV
    expect ")  "
    send "0\r"
    # TLV 4
    expect ":  "
    send "4\r"
    # TLV 4.1
    expect ":  "
    send "1\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 4.2
    expect ":  "
    send "2\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 4.3
    expect ":  "
    send "3\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 4.4
    expect ":  "
    send "4\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 4.5
    expect ":  "
    send "5\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 4.6
    expect ":  "
    send "6\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 4.7
    expect ":  "
    send "7\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 4.8
    expect ":  "
    send "8\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 4.9
    expect ":  "
    send "9\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 4.10
    expect ":  "
    send "10\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 4.11
    expect ":  "
    send "11\r"
    # Last sub-TLV
    expect ")  "
    send "1\r"
    # Next TLV
    expect ")  "
    send "0\r"
    # TLV 5
    expect ":  "
    send "5\r"
    # TLV 5.1
    expect ":  "
    send "1\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 5.2
    expect ":  "
    send "2\r"


    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 5.3
    expect ":  "
    send "3\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 5.4
    expect ":  "
    send "4\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 5.5
    expect ":  "
    send "5\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 5.6
    expect ":  "
    send "6\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 5.7
    expect ":  "
    send "7\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 5.8
    expect ":  "
    send "8\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 5.9
    expect ":  "
    send "9\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 5.10
    expect ":  "
    send "10\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 5.11
    expect ":  "
    send "11\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 5.12
    expect ":  "
    send "12\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 5.13
    expect ":  "
    send "13\r"
    # Next sub-TLV
    expect ")  "
    send "0\r"
    # TLV 5.14
    expect ":  "
    send "14\r"
    # Last sub-TLV
    expect ")  "
    send "1\r"
    # Next TLV
    expect ")  "
    send "0\r"
    # TLV 6
    expect ":  "
    send "6\r"
    # Next TLV
    expect ")  "
    send "0\r"
    # TLV 7
    expect ":  "
    send "7\r"
    # Next TLV
    expect ")  "
    send "0\r"
    # TLV 15
    expect ":  "
    send "15\r"
    # Next TLV
    expect ")  "
    send "0\r"
    # TLV 16
    expect ":  "
    send "16\r"
    # Next TLV
    expect ")  "
    send "0\r"
    # TLV 18
    expect ":  "
    send "18\r"
    # Next TLV
    expect ")  "
    send "0\r"
    # TLV 19
    expect ":  "
    send "19\r"
    # Last TLV
    expect ")  "
    send "1\r"

    # Next packet
    expect ")  "
    send "0\r"

    # Request Frame (minislots)
    expect ":  "
    send "a\r"
    # Next packet
    expect ")  "
    send "0\r"

    # Request Frame (bytes)
    expect ":  "
    send "b\r"
    # Next packet
    expect ")  "
    send "0\r"

}

# Last SYNC packet
expect ":  "
send "1\r"
# Next packet
expect ")  "
send "1\r"

# print exit code
expect " "
send "\r"

{'fraction_non_alphanumeric': 0.16066481994459833, 'fraction_numerical': 0.03899424675047944, 'mean_word_length': 1.31003937007874, 'pattern_counts': {'":': 47, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4288750', 'n_tokens_mistral': 2132, 'n_tokens_neox': 2054, 'n_words': 509}