<commit_before>package executer

import (
	"os/exec"
	"fmt"
	"bufio"
	"os"
	"strings"
)

type TcpdumpExecuter struct {
	cmd *exec.Cmd
}

func (this *TcpdumpExecuter) RunTcpdump(pcapDirectory, filename, commandOptions string) error {
	fmt.Println("starting tcpdump")

	tcpdumpCommand := append(
		[]string{"shell", "tcpdump", "-w", pcapDirectory + filename},
		strings.Split(commandOptions, " ")...)

	fmt.Println("tcpdump command:", tcpdumpCommand)

	this.cmd = exec.Command("bin/adb/adb.exe", tcpdumpCommand...)

	if err := this.cmd.Start(); err != nil {
		return err
	}

	fmt.Println("tcpdump running")

	return nil
}

func (this *TcpdumpExecuter) TerminateTcpdump() error {
	fmt.Println("press 'q' to stop tcpdump")

	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		if scanner.Text() == "q" {
			fmt.Println("stopping tcpdump")

			if err := this.cmd.Process.Kill(); err != nil {
				return err
			}

			fmt.Println("tcpdump stopped")
			break
		}
	}

	return nil<commit_msg>Modified stop tcpdump instruction<commit_after>package executer

import (
	"os/exec"
	"fmt"
	"bufio"
	"os"
	"strings"
)

type TcpdumpExecuter struct {
	cmd *exec.Cmd
}

func (this *TcpdumpExecuter) RunTcpdump(pcapDirectory, filename, commandOptions string) error {
	fmt.Println("starting tcpdump")

	tcpdumpCommand := append(
		[]string{"shell", "tcpdump", "-w", pcapDirectory + filename},
		strings.Split(commandOptions, " ")...)

	fmt.Println("tcpdump command:", tcpdumpCommand)

	this.cmd = exec.Command("bin/adb/adb.exe", tcpdumpCommand...)

	if err := this.cmd.Start(); err != nil {
		return err
	}

	fmt.Println("tcpdump running")

	return nil
}

func (this *TcpdumpExecuter) TerminateTcpdump() error {
	fmt.Println("enter 'q' to stop tcpdump")

	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		if scanner.Text() == "q" {
			fmt.Println("stopping tcpdump")

			if err := this.cmd.Process.Kill(); err != nil {
				return err
			}

			fmt.Println("tcpdump stopped")
			break
		}
	}

	return nil
{'fraction_non_alphanumeric': 0.15469061876247506, 'fraction_numerical': 0.0, 'mean_word_length': 4.063131313131313, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1433460', 'n_tokens_mistral': 781, 'n_tokens_neox': 716, 'n_words': 160}