<commit_before>package config

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"os"
	"path"
	"strings"

	"github.com/crazy-max/WindowsSpyBlocker/app/bindata"
	"github.com/crazy-max/WindowsSpyBlocker/app/utils/file"
	"github.com/crazy-max/WindowsSpyBlocker/app/utils/pathu"
	"github.com/crazy-max/WindowsSpyBlocker/app/utils/print"
)

// App
var (
	AppName    = "WindowsSpyBlocker"
	AppVersion = "1.0.0"
	AppPackage = "github.com/crazy-max/WindowsSpyBlocker"
	AppUrl     = "https://" + AppPackage
)

// Config
var (
	App      conf
	Settings settings
)

// Lib structure
type Lib struct {
	Url        string `json:"url"`
	Dest       string
	OutputPath string
	Checkfile  string `json:"checkfile"`
}

// NcsiProbe structure
type NcsiProbe struct {
	WebHostV4    string `json:"webHostV4"`
	WebPathV4    string `json:"webPathV4"`
	WebContentV4 string `json:"webContentV4"`
	WebHostV6    string `json:"webHostV6"`
	WebPathV6    string `json:"webPathV6"`
	WebContentV6 string `json:"webContentV6"`
	DnsHostV4    string `json:"dnsHostV4"`
	DnsContentV4 string `json:"dnsContentV4"`
	DnsHostV6    string `json:"dnsHostV6"`
	DnsContentV6 string `json:"dnsContentV6"`
}

type dataTpl struct {
	Head  string `json:"head"`
	Value string `json:"value"`
}

type conf struct {
	Version         string `json:"version"`
	Debug           bool   `json:"debug"`
	UseEmbeddedData bool   `json:"useEmbeddedData"`
	Proxifier       struct {
		LogPath string `json:"logPath"`
	} `json:"proxifier"`
	Sysmon struct {
		EvtxPath string `json:"evtxPath"`
	} `json:"sysmon"`
	Wireshark struct {
		PcapngPath string `json:"pcapngPath"`
		Capture    struct {
			Interface int    `json:"interface"`
			Filter    string `json:"filter"`
		} `json:"capture"`
	} `json:"wireshark"`
	Exclude struct {
		Ips   []string `json:"ips"`
		Hosts []string `json:"hosts"`
		Orgs  []string `json:"orgs"`
	} `json:"exclude"`
}

type settings struct {
	Uris struct {
		LatestVersion string `json:"latestVersion"`
		Threatcrowd   string `json:"threatcrowd"`
		Whatis        string `json:"whatis"`
		Dnsquery      string `json:"dnsquery"`
		Ipapi         string `json:"ipapi"`
		Ipinfo        string `json:"ipinfo"`
		Ipnf          string `json:"ipnf"`
	} `json:"uris"`
	Libs struct {
		Wireshark Lib `json:"wireshark"`
		Npcap     Lib `json:"npcap"`
		Sysmon    Lib `json:"sysmon"`
	} `json:"libs"`
	DataTpl struct {
		Dnscrypt dataTpl `json:"dnscrypt"`
		Openwrt  struct {
			Ip      dataTpl `json:"ip"`
			Domains dataTpl `json:"domains"`
		} `json:"openwrt"`<commit_msg>Add ability to perform DNS AAAA lookup test on hosts<commit_after>package config

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"os"
	"path"
	"strings"

	"github.com/crazy-max/WindowsSpyBlocker/app/bindata"
	"github.com/crazy-max/WindowsSpyBlocker/app/utils/file"
	"github.com/crazy-max/WindowsSpyBlocker/app/utils/pathu"
	"github.com/crazy-max/WindowsSpyBlocker/app/utils/print"
)

// App
var (
	AppName    = "WindowsSpyBlocker"
	AppVersion = "1.0.0"
	AppPackage = "github.com/crazy-max/WindowsSpyBlocker"
	AppUrl     = "https://" + AppPackage
)

// Config
var (
	App      conf
	Settings settings
)

// Lib structure
type Lib struct {
	Url        string `json:"url"`
	Dest       string
	OutputPath string
	Checkfile  string `json:"checkfile"`
}

// NcsiProbe structure
type NcsiProbe struct {
	WebHostV4    string `json:"webHostV4"`
	WebPathV4    string `json:"webPathV4"`
	WebContentV4 string `json:"webContentV4"`
	WebHostV6    string `json:"webHostV6"`
	WebPathV6    string `json:"webPathV6"`
	WebContentV6 string `json:"webContentV6"`
	DnsHostV4    string `json:"dnsHostV4"`
	DnsContentV4 string `json:"dnsContentV4"`
	DnsHostV6    string `json:"dnsHostV6"`
	DnsContentV6 string `json:"dnsContentV6"`
}

type dataTpl struct {
	Head  string `json:"head"`
	Value string `json:"value"`
}

type conf struct {
	Version         string `json:"version"`
	Debug           bool   `json:"debug"`
	UseEmbeddedData bool   `json:"useEmbeddedData"`
	Proxifier       struct {
		LogPath string `json:"logPath"`
	} `json:"proxifier"`
	Sysmon struct {
		EvtxPath string `json:"evtxPath"`
	} `json:"sysmon"`
	Wireshark struct {
		PcapngPath string `json:"pcapngPath"`
		Capture    struct {
			Interface int    `json:"interface"`
			Filter    string `json:"filter"`
		} `json:"capture"`
	} `json:"wireshark"`
	Exclude struct {
		Ips   []string `json:"ips"`
		Hosts []string `json:"hosts"`
		Orgs  []string `json:"orgs"`
	} `json:"exclude"`
}

type settings struct {
	Uris struct {
		LatestVersion string `json:"latestVersion"`
		Threatcrowd   string `json:"threatcrowd"`
		Whatis        string `json:"whatis"`
		Dnsquery      string `json:"dnsquery"`
		Ipapi         string `json:"ipapi"`
		Ipinfo        string `json:"ipinfo"`
		Ipnf          string `json:"ipnf"`
		Ip6           string `json:"ip6"`
	} `json:"uris"`
	Libs struct {
		Wireshark Lib `json:"wireshark"`
		Npcap     Lib `json:"npcap"`
		Sysmon    Lib `json:"sysmon"`
	} `json:"libs"`
	DataTpl struct {
		Dnscrypt dataTpl `json:"dnscrypt"`
		Openwrt  struct {
			Ip      dataTpl `json:"ip"`
			Domains dataTpl `json:"domains"`
		} `json:"openwrt"`
{'fraction_non_alphanumeric': 0.1378299120234604, 'fraction_numerical': 0.0093841642228739, 'mean_word_length': 3.7590697674418605, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6687654', 'n_tokens_mistral': 1984, 'n_tokens_neox': 1904, 'n_words': 397}