<commit_before>#!/usr/bin/perl

use strict;
use JSON;

my $qname    = ".";
my @servers  = ("172.16.17.32", "fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b");
my $nxdomain = "4089e55b9193d26bfbbf968ea1283fe93f01f755";

my %template = (

    #'tcp_timeout' => 8,
    #'udp_timeout' => 3,

    # quick test timers
    'tcp_timeout' => 1,
    'udp_timeout' => 1,
);

foreach my $server (@servers) {
    foreach my $transport ("udp", "tcp") {

        my %query = %template;

        $query{address}   = $server;
        $query{transport} = $transport;
        $query{qclass}    = "IN";

        # SOA without DO=1
        $query{qname} = $qname;
        $query{qtype} = "SOA";
        $query{flags} = { do => 0, cd => 0, rd => 0, ad => 0 };
        print to_json(\%query), "\n";

        # SOA with DO=1
        $query{qname} = $qname;
        $query{qtype} = "SOA";
        $query{flags} = { do => 1, cd => 0, rd => 0, ad => 0 };
        print to_json(\%query), "\n";

        # NS
        $query{qname} = $qname;
        $query{qtype} = "NS";
        $query{flags} = { do => 1, cd => 0, rd => 0, ad => 0 };
        print to_json(\%query), "\n";

        # DNSKEY
        $query{qname} = $qname;
        $query{qtype} = "DNSKEY";
        $query{flags} = { do => 1, cd => 0, rd => 0, ad => 0 };
        print to_json(\%query), "\n";

        # NXDOMAIN
        $query{qname} = sprintf("%s.%s", $nxdomain, $qname);
        $query{qtype} = "SOA";
        $query{flags} = { do => 1, cd => 0, rd => 0, ad => 0 };
        print to_json(\%query), "\n";

        # RECURSION
        $query{qname} = "icann.org";
        $query{qtype} = "SOA";
        $query{flags} = { do => 1, cd => 0, rd => 1, ad => 0 };
        print to_json(\%query), "\n";
    }
}<commit_msg>tweek<commit_after>#!/usr/bin/perl

use strict;
use JSON;

my $qname      = ".";
my @servers    = ("172.16.17.32", "fd00:c2b6:b24b:be67:2827:688d:e6a1:6a3b");
my $nxdomain   = "4089e55b9193d26bfbbf968ea1283fe93f01f755";
my $recursive  = "example.com";
my @transports = ("udp", "tcp");

my %template = (

    #'tcp_timeout' => 8,
    #'udp_timeout' => 3,

    # quick test timers
    'tcp_timeout' => 1,
    'udp_timeout' => 1,
);

foreach my $server (@servers) {
    foreach my $transport (@transports) {

        my %query = %template;

        $query{address}   = $server;
        $query{transport} = $transport;
        $query{qclass}    = "IN";

        # SOA without DO=1
        $query{qname} = $qname;
        $query{qtype} = "SOA";
        $query{flags} = { do => 0, cd => 0, rd => 0, ad => 0 };
        print to_json(\%query), "\n";

        # SOA with DO=1
        $query{qname} = $qname;
        $query{qtype} = "SOA";
        $query{flags} = { do => 1, cd => 0, rd => 0, ad => 0 };
        print to_json(\%query), "\n";

        # NS
        $query{qname} = $qname;
        $query{qtype} = "NS";
        $query{flags} = { do => 1, cd => 0, rd => 0, ad => 0 };
        print to_json(\%query), "\n";

        # DNSKEY
        $query{qname} = $qname;
        $query{qtype} = "DNSKEY";
        $query{flags} = { do => 1, cd => 0, rd => 0, ad => 0 };
        print to_json(\%query), "\n";

        # NXDOMAIN
        $query{qname} = sprintf("%s.%s", $nxdomain, $qname);
        $query{qtype} = "SOA";
        $query{flags} = { do => 1, cd => 0, rd => 0, ad => 0 };
        print to_json(\%query), "\n";

        # RECURSION
        $query{qname} = $recursive;
        $query{qtype} = "SOA";
        $query{flags} = { do => 0, cd => 0, rd => 1, ad => 0 };
        print to_json(\%query), "\n";
    }
}
{'fraction_non_alphanumeric': 0.2099634112018013, 'fraction_numerical': 0.047283985364480724, 'mean_word_length': 2.0428082191780823, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '266828', 'n_tokens_mistral': 1535, 'n_tokens_neox': 1389, 'n_words': 312}