├── .gitignore
├── Icon.png
├── README.md
├── appgui
├── loadui.go
├── textbox.go
└── theme.go
├── crypto
├── ascii.go
├── base64.go
├── hex.go
├── html.go
├── js.go
├── md5.go
├── sha.go
├── url.go
└── xss.go
├── go.mod
├── go.sum
├── main.go
└── screenshot.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # Binaries for programs and plugins
2 | *.exe
3 | *.exe~
4 | *.dll
5 | *.so
6 | *.dylib
7 | .idea/
8 | .DS_Store
9 | # Test binary, built with `go test -c`
10 | *.test
11 |
12 | # Output of the go coverage tool, specifically when used with LiteIDE
13 | *.out
14 |
15 | # Dependency directories (remove the comment below to include it)
16 | # vendor/
17 |
--------------------------------------------------------------------------------
/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/veo/Hattrick/0cad324e3e7611e6c86ff69a1241af7bcfd7be7c/Icon.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Hattrick
2 | ================================
3 | [](https://github.com/veo/Hattrick/releases/latest)
4 |
5 | 
6 |
7 |
8 | Hattrick 是一款简单、快速的跨平台网络安全编码转换工具。
9 |
10 | ## 下载
11 | * [windows 点击下载](https://github.com/veo/Hattrick/releases/download/1.0.0/Hattrick_windows.zip)
12 | * [macos 点击下载](https://github.com/veo/Hattrick/releases/download/1.0.0/Hattrick_macos.dmg)
13 | * [linux 点击下载](https://github.com/veo/Hattrick/releases/download/1.0.0/Hattrick_linux_amd64.tar.gz)
14 | ## 支持操作系统
15 | * Windows
16 | * MacOS
17 | * Linux (Linux中文支持需要自己配字体)
18 | * Android
19 | * Ios
20 |
21 | ## 编码类型
22 | * MD5_32
23 | * MD5_16
24 | * SHA1
25 | * SHA256
26 | * SHA512
27 | * Base64_GBK
28 | * Base64_UTF8
29 | * HEX
30 | * ASCII
31 | * ASCII SUM
32 | * FromCharCode
33 | * HTML DEC
34 | * HTML HEX
35 | * Unicode
36 | * URL_ALL
37 | * URL_GBK
38 | * URL_UTF8
39 | * JsHex
40 | * JsUnicode
41 | * Unescape
42 |
43 | ## 解码类型
44 | * Base64解码_GBK
45 | * Base64解码_UTF8
46 | * URL解码_GBK
47 | * URL解码_UTF8
48 |
49 | ## 已知bug
50 | * Base64_UTF8解密Base64_GBK的内容时会卡死
--------------------------------------------------------------------------------
/appgui/loadui.go:
--------------------------------------------------------------------------------
1 | package appgui
2 |
3 | import (
4 | "fyne.io/fyne"
5 | "fyne.io/fyne/app"
6 | "fyne.io/fyne/layout"
7 | "fyne.io/fyne/widget"
8 | "github.com/veo/Hattrick/crypto"
9 | "net/url"
10 | )
11 |
12 | func Loadui() {
13 | app := app.New()
14 | //app.SetIcon(fyne.NewStaticResource("Icon.png", static.IconPNG))
15 | app.Settings().SetTheme(&HatTrickTheme{})
16 | w := app.NewWindow("Hattrick")
17 | blog, err := url.Parse("https://xwhoami.com")
18 | if err != nil {
19 | fyne.LogError("Could not parse URL", err)
20 | }
21 | github, err := url.Parse("https://github.com/veo")
22 | if err != nil {
23 | fyne.LogError("Could not parse URL", err)
24 | }
25 | textbox := &Textbox{}
26 | w.SetContent(widget.NewVBox(
27 | textbox.InputBox(),
28 | widget.NewHScrollContainer(fyne.NewContainerWithLayout(layout.NewGridLayout(10),
29 | widget.NewButton("MD5_Encode_32", func() { textbox.EncodeText.SetText(crypto.MD5_Encode_32(textbox.InputText.Text)) }),
30 | widget.NewButton("MD5_Encode_16", func() { textbox.EncodeText.SetText(crypto.MD5_Encode_16(textbox.InputText.Text)) }),
31 | widget.NewButton("SHA1_Encode", func() { textbox.EncodeText.SetText(crypto.SHA1_Encode(textbox.InputText.Text)) }),
32 | widget.NewButton("SHA256_Encode", func() { textbox.EncodeText.SetText(crypto.SHA256_Encode(textbox.InputText.Text)) }),
33 | widget.NewButton("SHA512_Encode", func() { textbox.EncodeText.SetText(crypto.SHA512_Encode(textbox.InputText.Text)) }),
34 | widget.NewButton("Base64_GBK", func() { textbox.EncodeText.SetText(crypto.Base64Encode_GBK(textbox.InputText.Text)) }),
35 | widget.NewButton("Base64_UTF8", func() { textbox.EncodeText.SetText(crypto.Base64Encode_UTF8(textbox.InputText.Text)) }),
36 | widget.NewButton("16进制(HEX)", func() { textbox.EncodeText.SetText(crypto.HexEncode(textbox.InputText.Text)) }),
37 | widget.NewButton("ASCII编码", func() { textbox.EncodeText.SetText(crypto.AsciiEncode(textbox.InputText.Text)) }),
38 | widget.NewButton("ASCII之和", func() { textbox.EncodeText.SetText(crypto.AsciiSUM(textbox.InputText.Text)) }),
39 | ),
40 | ),
41 | widget.NewHScrollContainer(fyne.NewContainerWithLayout(layout.NewGridLayout(10),
42 | widget.NewButton("FromCharCode", func() { textbox.EncodeText.SetText(crypto.FromChar(textbox.InputText.Text)) }),
43 | widget.NewButton("HTML实体(DEC)", func() { textbox.EncodeText.SetText(crypto.HtmlEncode_Dec(textbox.InputText.Text)) }),
44 | widget.NewButton("HTML实体(HEX)", func() { textbox.EncodeText.SetText(crypto.HtmlEncode_Hex(textbox.InputText.Text)) }),
45 | widget.NewButton("Unicode", func() { textbox.EncodeText.SetText(crypto.Unicode(textbox.InputText.Text)) }),
46 | widget.NewButton("URL编码_所有", func() { textbox.EncodeText.SetText(crypto.UrlEncode_ALL(textbox.InputText.Text)) }),
47 | widget.NewButton("URL编码_GBK", func() { textbox.EncodeText.SetText(crypto.UrlEncode_GBK(textbox.InputText.Text)) }),
48 | widget.NewButton("URL编码_UTF8", func() { textbox.EncodeText.SetText(crypto.UrlEncode_UTF8(textbox.InputText.Text)) }),
49 | widget.NewButton("JsHex", func() { textbox.EncodeText.SetText(crypto.JsHex(textbox.InputText.Text)) }),
50 | widget.NewButton("JsUnicode", func() { textbox.EncodeText.SetText(crypto.JsUnicode(textbox.InputText.Text)) }),
51 | widget.NewButton("Unescape", func() { textbox.EncodeText.SetText(crypto.Unescape(textbox.InputText.Text)) }),
52 | ),
53 | ),
54 | textbox.EncodeBox(),
55 | widget.NewHScrollContainer(fyne.NewContainerWithLayout(layout.NewGridLayout(10),
56 | widget.NewButton("Base64_GBK", func() { textbox.DecodeText.SetText(crypto.Base64Decode_GBK(textbox.EncodeText.Text)) }),
57 | widget.NewButton("Base64_UTF8", func() { textbox.DecodeText.SetText(crypto.Base64Decode_UTF8(textbox.EncodeText.Text)) }),
58 | widget.NewButton("URL_GBK", func() { textbox.DecodeText.SetText(crypto.UrlDecode_GBK(textbox.EncodeText.Text)) }),
59 | widget.NewButton("URL_UTF8", func() { textbox.DecodeText.SetText(crypto.UrlDecode_UTF8(textbox.EncodeText.Text)) }),
60 | ),
61 | ),
62 | textbox.DecodeBox(),
63 | widget.NewHBox(layout.NewSpacer(), widget.NewLabel("作者: veo "), widget.NewHyperlink("blog", blog), widget.NewHyperlink("github", github), layout.NewSpacer()),
64 | ))
65 | w.Resize(fyne.NewSize(1200, 750))
66 | w.ShowAndRun()
67 | }
68 |
--------------------------------------------------------------------------------
/appgui/textbox.go:
--------------------------------------------------------------------------------
1 | package appgui
2 |
3 | import (
4 | "fyne.io/fyne"
5 | "fyne.io/fyne/canvas"
6 | "fyne.io/fyne/layout"
7 | "fyne.io/fyne/widget"
8 | "image/color"
9 | )
10 |
11 | type Textbox struct {
12 | InputText *widget.Entry
13 | EncodeText *widget.Entry
14 | DecodeText *widget.Entry
15 | }
16 |
17 | func BorderBody(width, hight int, body fyne.CanvasObject) *fyne.Container {
18 | top := HorizontalLine(width, 1)
19 | bottom := HorizontalLine(width, 1)
20 | left := VerticalLine(hight, 1)
21 | right := VerticalLine(hight, 1)
22 | borderset := layout.NewBorderLayout(top, bottom, left, right)
23 |
24 | return fyne.NewContainerWithLayout(borderset, top, bottom, left, right, body)
25 | }
26 |
27 | func HorizontalLine(length, strong int) fyne.CanvasObject {
28 | rect := canvas.NewRectangle(&color.RGBA{0, 0, 0, 0xff})
29 | rect.SetMinSize(fyne.NewSize(length, strong))
30 | rect.Visible()
31 | return rect
32 | }
33 |
34 | func VerticalLine(length, strong int) fyne.CanvasObject {
35 | rect := canvas.NewRectangle(&color.RGBA{0, 0, 0, 0xff})
36 | rect.SetMinSize(fyne.NewSize(strong, length))
37 | rect.Visible()
38 | return rect
39 | }
40 |
41 | func (t *Textbox) InputBox() fyne.CanvasObject {
42 | t.InputText = widget.NewMultiLineEntry()
43 | t.InputText.Wrapping = fyne.TextWrapWord
44 | t.InputText.SetPlaceHolder("inputText")
45 | box := BorderBody(1050, 190, t.InputText)
46 | return box
47 | }
48 | func (t *Textbox) EncodeBox() fyne.CanvasObject {
49 | t.EncodeText = widget.NewMultiLineEntry()
50 | t.EncodeText.Wrapping = fyne.TextWrapWord
51 | t.EncodeText.SetPlaceHolder("encodeText")
52 | box := BorderBody(1050, 190, t.EncodeText)
53 | return box
54 | }
55 |
56 | func (t *Textbox) DecodeBox() fyne.CanvasObject {
57 | t.DecodeText = widget.NewMultiLineEntry()
58 | t.DecodeText.Wrapping = fyne.TextWrapWord
59 | t.DecodeText.SetPlaceHolder("decodeText")
60 | box := BorderBody(1050, 190, t.DecodeText)
61 | return box
62 | }
63 |
--------------------------------------------------------------------------------
/appgui/theme.go:
--------------------------------------------------------------------------------
1 | package appgui
2 |
3 | import (
4 | "fyne.io/fyne"
5 | "fyne.io/fyne/theme"
6 | "image/color"
7 | "runtime"
8 | )
9 |
10 | func font() fyne.Resource {
11 | if runtime.GOOS == `windows` {
12 | font, err := fyne.LoadResourceFromPath(`C:\Windows\Fonts\simhei.ttf`)
13 | if err != nil {
14 | font = theme.LightTheme().TextFont()
15 | }
16 | return font
17 | } else if runtime.GOOS == `darwin` {
18 | font, err := fyne.LoadResourceFromPath(`/Library/Fonts/Arial Unicode.ttf`)
19 | if err != nil {
20 | font = theme.LightTheme().TextFont()
21 | }
22 | return font
23 | }
24 | return theme.LightTheme().TextFont()
25 | }
26 |
27 | type HatTrickTheme struct{}
28 |
29 | func (HatTrickTheme) BackgroundColor() color.Color { return theme.LightTheme().BackgroundColor() }
30 | func (HatTrickTheme) ButtonColor() color.Color { return theme.LightTheme().ButtonColor() }
31 | func (HatTrickTheme) HyperlinkColor() color.Color { return theme.LightTheme().HyperlinkColor() }
32 | func (HatTrickTheme) TextColor() color.Color { return theme.LightTheme().TextColor() }
33 | func (HatTrickTheme) PlaceHolderColor() color.Color { return theme.LightTheme().PlaceHolderColor() }
34 | func (HatTrickTheme) PrimaryColor() color.Color { return theme.LightTheme().PrimaryColor() }
35 | func (HatTrickTheme) FocusColor() color.Color { return theme.LightTheme().FocusColor() }
36 | func (HatTrickTheme) ScrollBarColor() color.Color { return theme.LightTheme().ScrollBarColor() }
37 | func (HatTrickTheme) TextSize() int { return 11 }
38 | func (HatTrickTheme) TextFont() fyne.Resource { return font() }
39 | func (HatTrickTheme) TextBoldFont() fyne.Resource { return font() }
40 | func (HatTrickTheme) TextItalicFont() fyne.Resource { return font() }
41 | func (HatTrickTheme) TextBoldItalicFont() fyne.Resource { return font() }
42 | func (HatTrickTheme) TextMonospaceFont() fyne.Resource { return font() }
43 | func (HatTrickTheme) Padding() int { return theme.LightTheme().Padding() }
44 | func (HatTrickTheme) IconInlineSize() int { return theme.LightTheme().IconInlineSize() }
45 | func (HatTrickTheme) ScrollBarSize() int { return theme.LightTheme().ScrollBarSize() }
46 | func (HatTrickTheme) DisabledButtonColor() color.Color {
47 | return theme.LightTheme().DisabledButtonColor()
48 | }
49 | func (HatTrickTheme) DisabledIconColor() color.Color { return theme.LightTheme().DisabledIconColor() }
50 | func (HatTrickTheme) DisabledTextColor() color.Color { return theme.LightTheme().DisabledTextColor() }
51 | func (HatTrickTheme) HoverColor() color.Color { return theme.LightTheme().HoverColor() }
52 | func (HatTrickTheme) IconColor() color.Color { return theme.LightTheme().IconColor() }
53 | func (HatTrickTheme) ScrollBarSmallSize() int { return theme.LightTheme().ScrollBarSmallSize() }
54 | func (HatTrickTheme) ShadowColor() color.Color { return theme.LightTheme().ShadowColor() }
55 |
--------------------------------------------------------------------------------
/crypto/ascii.go:
--------------------------------------------------------------------------------
1 | package crypto
2 |
3 | import (
4 | "fmt"
5 | )
6 |
7 | func AsciiEncode(data string) string {
8 | var result string
9 | array := []rune(data)
10 | n := len(array)
11 | for i := 0; i < n; i++ {
12 | if i == 0 {
13 | result += fmt.Sprint(array[i])
14 | } else {
15 | result += fmt.Sprint(",", array[i])
16 | }
17 | }
18 | return result
19 | }
20 |
21 | func AsciiSUM(data string) string {
22 | var result rune
23 | array := []rune(data)
24 | n := len(array)
25 | for i := 0; i < n; i++ {
26 | result += array[i]
27 | }
28 | return fmt.Sprint(result)
29 | }
30 |
--------------------------------------------------------------------------------
/crypto/base64.go:
--------------------------------------------------------------------------------
1 | package crypto
2 |
3 | import (
4 | "bytes"
5 | "encoding/base64"
6 | "golang.org/x/text/encoding/simplifiedchinese"
7 | "golang.org/x/text/transform"
8 | "io/ioutil"
9 | )
10 |
11 | func Base64Encode_UTF8(data string) string {
12 | return base64.StdEncoding.EncodeToString([]byte(data))
13 | }
14 |
15 | func Base64Encode_GBK(data string) string {
16 | encoder := simplifiedchinese.GBK.NewEncoder()
17 | reader := transform.NewReader(bytes.NewReader([]byte(data)), encoder)
18 | d, err := ioutil.ReadAll(reader)
19 | if err != nil {
20 | return err.Error()
21 | }
22 | return base64.StdEncoding.EncodeToString(d)
23 | }
24 |
25 | func Base64Decode_UTF8(data string) string {
26 | m, err := base64.StdEncoding.DecodeString(data)
27 | if err != nil {
28 | return err.Error()
29 | }
30 | return string(m)
31 | }
32 |
33 | func Base64Decode_GBK(data string) string {
34 | m, err := base64.StdEncoding.DecodeString(data)
35 | if err != nil {
36 | return err.Error()
37 | }
38 | decoder := simplifiedchinese.GBK.NewDecoder()
39 | reader := transform.NewReader(bytes.NewReader(m), decoder)
40 | d, err := ioutil.ReadAll(reader)
41 | if err != nil {
42 | return err.Error()
43 | }
44 | return string(d)
45 | }
46 |
--------------------------------------------------------------------------------
/crypto/hex.go:
--------------------------------------------------------------------------------
1 | package crypto
2 |
3 | import "encoding/hex"
4 |
5 | func HexEncode(data string) string {
6 | return "0x" + hex.EncodeToString([]byte(data))
7 | }
8 |
--------------------------------------------------------------------------------
/crypto/html.go:
--------------------------------------------------------------------------------
1 | package crypto
2 |
3 | import "fmt"
4 |
5 | func HtmlEncode_Dec(data string) string {
6 | var result string
7 | array := []rune(data)
8 | n := len(array)
9 | for i := 0; i < n; i++ {
10 | result += fmt.Sprint("", array[i]) + ";"
11 | }
12 | return result
13 | }
14 |
15 | func HtmlEncode_Hex(data string) string {
16 | var result string
17 | array := []rune(data)
18 | n := len(array)
19 | for i := 0; i < n; i++ {
20 | result += "" + fmt.Sprintf("%X", array[i]) + ";"
21 | }
22 | return result
23 | }
24 |
--------------------------------------------------------------------------------
/crypto/js.go:
--------------------------------------------------------------------------------
1 | package crypto
2 |
3 | import (
4 | "bytes"
5 | "fmt"
6 | "golang.org/x/text/encoding/simplifiedchinese"
7 | "golang.org/x/text/transform"
8 | "io/ioutil"
9 | )
10 |
11 | func FromChar(data string) string {
12 | var result string
13 | array := []rune(data)
14 | n := len(array)
15 | for i := 0; i < n; i++ {
16 | if i == 0 {
17 | result += fmt.Sprint(array[i])
18 | } else {
19 | result += fmt.Sprint(",", array[i])
20 | }
21 | }
22 | return "String.fromCharCode(" + result + ")"
23 | }
24 |
25 | func Unicode(data string) string {
26 | var result string
27 | array := []rune(data)
28 | n := len(array)
29 | for i := 0; i < n; i++ {
30 | result += "\\u" + fmt.Sprintf("%X", array[i])
31 | }
32 | return result
33 | }
34 |
35 | func JsHex(data string) string {
36 | encoder := simplifiedchinese.GBK.NewEncoder()
37 | reader := transform.NewReader(bytes.NewReader([]byte(data)), encoder)
38 | d, err := ioutil.ReadAll(reader)
39 | if err != nil {
40 | return err.Error()
41 | }
42 | var result string
43 | n := len(d)
44 | for i := 0; i < n; i++ {
45 | result += "\\x" + fmt.Sprintf("%X", d[i])
46 | }
47 | return result
48 | }
49 |
50 | func JsUnicode(data string) string {
51 | var result string
52 | array := []rune(data)
53 | n := len(array)
54 | for i := 0; i < n; i++ {
55 | if len(fmt.Sprintf("%X", array[i])) == 2 {
56 | result += "\\u00" + fmt.Sprintf("%X", array[i])
57 | } else {
58 | result += "\\u" + fmt.Sprintf("%X", array[i])
59 | }
60 |
61 | }
62 | return result
63 | }
64 |
--------------------------------------------------------------------------------
/crypto/md5.go:
--------------------------------------------------------------------------------
1 | package crypto
2 |
3 | import (
4 | "crypto/md5"
5 | "encoding/hex"
6 | )
7 |
8 | func MD5_Encode_32(data string) string {
9 | h := md5.New()
10 | h.Write([]byte(data))
11 | return hex.EncodeToString(h.Sum(nil))
12 | }
13 |
14 | func MD5_Encode_16(data string) string {
15 | return MD5_Encode_32(data)[8:24]
16 | }
17 |
--------------------------------------------------------------------------------
/crypto/sha.go:
--------------------------------------------------------------------------------
1 | package crypto
2 |
3 | import (
4 | "crypto/sha1"
5 | "crypto/sha256"
6 | "crypto/sha512"
7 | "encoding/hex"
8 | )
9 |
10 | func SHA1_Encode(data string) string {
11 | h := sha1.New()
12 | h.Write([]byte(data))
13 | return hex.EncodeToString(h.Sum(nil))
14 | }
15 |
16 | func SHA256_Encode(data string) string {
17 | h := sha256.New()
18 | return hex.EncodeToString(h.Sum(nil))
19 | }
20 |
21 | func SHA512_Encode(data string) string {
22 | h := sha512.New()
23 | return hex.EncodeToString(h.Sum(nil))
24 | }
25 |
--------------------------------------------------------------------------------
/crypto/url.go:
--------------------------------------------------------------------------------
1 | package crypto
2 |
3 | import (
4 | "bytes"
5 | "golang.org/x/text/encoding/simplifiedchinese"
6 | "golang.org/x/text/transform"
7 | "io/ioutil"
8 | "net/url"
9 | )
10 |
11 | func UrlEncode_UTF8(data string) string {
12 | return url.PathEscape(data)
13 | }
14 |
15 | func UrlEncode_GBK(data string) string {
16 | encoder := simplifiedchinese.GBK.NewEncoder()
17 | reader := transform.NewReader(bytes.NewReader([]byte(data)), encoder)
18 | d, err := ioutil.ReadAll(reader)
19 | if err != nil {
20 | return err.Error()
21 | }
22 | return url.PathEscape(string(d))
23 | }
24 |
25 | func UrlEncode_ALL(data string) string {
26 | encoder := simplifiedchinese.GBK.NewEncoder()
27 | reader := transform.NewReader(bytes.NewReader([]byte(data)), encoder)
28 | d, err := ioutil.ReadAll(reader)
29 | if err != nil {
30 | return err.Error()
31 | }
32 | return urlencodeall(string(d))
33 | }
34 |
35 | func UrlDecode_UTF8(data string) string {
36 | s, err := url.PathUnescape(data)
37 | if err != nil {
38 | return err.Error()
39 | } else {
40 | return s
41 | }
42 | }
43 |
44 | func UrlDecode_GBK(data string) string {
45 | s, err := url.PathUnescape(data)
46 | if err != nil {
47 | return err.Error()
48 | }
49 | decoder := simplifiedchinese.GBK.NewDecoder()
50 | reader := transform.NewReader(bytes.NewReader([]byte(s)), decoder)
51 | d, err := ioutil.ReadAll(reader)
52 | if err != nil {
53 | return err.Error()
54 | }
55 | return string(d)
56 | }
57 |
58 | func urlencodeall(s string) string {
59 | hexCount := 0
60 | for i := 0; i < len(s); i++ {
61 | hexCount++
62 | }
63 | var buf [64]byte
64 | var t []byte
65 |
66 | required := len(s) + 2*hexCount
67 | if required <= len(buf) {
68 | t = buf[:required]
69 | } else {
70 | t = make([]byte, required)
71 | }
72 | j := 0
73 | for i := 0; i < len(s); i++ {
74 | c := s[i]
75 | t[j] = '%'
76 | t[j+1] = "0123456789ABCDEF"[c>>4]
77 | t[j+2] = "0123456789ABCDEF"[c&15]
78 | j += 3
79 | }
80 | return string(t)
81 | }
82 |
--------------------------------------------------------------------------------
/crypto/xss.go:
--------------------------------------------------------------------------------
1 | package crypto
2 |
3 | func Unescape(data string) string {
4 | return ""
5 | }
6 |
7 | func UnescapeAll(data string) string {
8 | return ""
9 | }
10 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/veo/Hattrick
2 |
3 | go 1.13
4 |
5 | require (
6 | fyne.io/fyne v1.3.2
7 | golang.org/x/text v0.3.2
8 | )
9 |
--------------------------------------------------------------------------------
/go.sum:
--------------------------------------------------------------------------------
1 | fyne.io/fyne v1.3.0/go.mod h1:AcBUeR8hetITnnfaLvuVqioWM/lT18WPeMVAobhMbg8=
2 | fyne.io/fyne v1.3.2 h1:9MVvZeYeGKJa0I6PKsf0LlZfeurYpsQMEpTaM2O6UpA=
3 | fyne.io/fyne v1.3.2/go.mod h1:osD/JXxGf8AC7aB+Ek0YuFF2QXzdTFFzMRM8cdqrwvQ=
4 | github.com/BurntSushi/freetype-go v0.0.0-20160129220410-b763ddbfe298/go.mod h1:D+QujdIlUNfa0igpNMk6UIvlb6C252URs4yupRUV4lQ=
5 | github.com/BurntSushi/graphics-go v0.0.0-20160129215708-b43f31a4a966/go.mod h1:Mid70uvE93zn9wgF92A/r5ixgnvX8Lh68fxp9KQBaI0=
6 | github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
7 | github.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k=
8 | github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
9 | github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9/go.mod h1:7uhhqiBaR4CpN0k9rMjOtjpcfGd6DG2m04zQxKnWQ0I=
10 | github.com/TheTitanrain/w32 v0.0.0-20180517000239-4f5cfb03fabf h1:FPsprx82rdrX2jiKyS17BH6IrTmUBYqZa/CXT4uvb+I=
11 | github.com/TheTitanrain/w32 v0.0.0-20180517000239-4f5cfb03fabf/go.mod h1:peYoMncQljjNS6tZwI9WVyQB3qZS6u79/N3mBOcnd3I=
12 | github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c=
13 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
14 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
15 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
16 | github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
17 | github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
18 | github.com/fyne-io/examples v0.0.0-20200701085432-9d943a2d6ec9/go.mod h1:JbKQWu9Avc2fACyBZT7Ntuzk93Z8wE/yTbj+3yfFUUQ=
19 | github.com/fyne-io/mobile v0.0.2 h1:eGmCR5lkFxk0PnPafGppLFRD5QODJfSVdrjhLjanOVg=
20 | github.com/fyne-io/mobile v0.0.2/go.mod h1:/kOrWrZB6sasLbEy2JIvr4arEzQTXBTZGb3Y96yWbHY=
21 | github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7 h1:SCYMcCJ89LjRGwEa0tRluNRiMjZHalQZrVrvTbPh+qw=
22 | github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7/go.mod h1:482civXOzJJCPzJ4ZOX/pwvXBWSnzD4OKMdH4ClKGbk=
23 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
24 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200625191551-73d3c3675aa3 h1:q521PfSp5/z6/sD9FZZOWj4d1MLmfQW8PkRnI9M6PCE=
25 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200625191551-73d3c3675aa3/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
26 | github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME=
27 | github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
28 | github.com/goki/freetype v0.0.0-20181231101311-fa8a33aabaff h1:W71vTCKoxtdXgnm1ECDFkfQnpdqAO00zzGXLA5yaEX8=
29 | github.com/goki/freetype v0.0.0-20181231101311-fa8a33aabaff/go.mod h1:wfqRWLHRBsRgkp5dmbG56SA0DmVtwrF5N3oPdI8t+Aw=
30 | github.com/gotk3/gotk3 v0.4.0 h1:TIuhyQitGeRTxOQIV3AJlYtEWWJpC74JHwAIsxlH8MU=
31 | github.com/gotk3/gotk3 v0.4.0/go.mod h1:Eew3QBwAOBTrfFFDmsDE5wZWbcagBL1NUslj1GhRveo=
32 | github.com/jackmordaunt/icns v0.0.0-20181231085925-4f16af745526/go.mod h1:UQkeMHVoNcyXYq9otUupF7/h/2tmHlhrS2zw7ZVvUqc=
33 | github.com/josephspurrier/goversioninfo v0.0.0-20200309025242-14b0ab84c6ca/go.mod h1:eJTEwMjXb7kZ633hO3Ln9mBUCOjX2+FlTljvpl9SYdE=
34 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
35 | github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
36 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
37 | github.com/lucor/goinfo v0.0.0-20200401173949-526b5363a13a/go.mod h1:ORP3/rB5IsulLEBwQZCJyyV6niqmI7P4EWSmkug+1Ng=
38 | github.com/mattn/go-gtk v0.0.0-20180216084204-5a311a1830ab/go.mod h1:PwzwfeB5syFHXORC3MtPylVcjIoTDT/9cvkKpEndGVI=
39 | github.com/mattn/go-pointer v0.0.0-20171114154726-1d30dc4b6f28/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc=
40 | github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
41 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
42 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
43 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
44 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
45 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
46 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
47 | github.com/skelterjohn/go.wde v0.0.0-20180104102407-a0324cbf3ffe/go.mod h1:zXxNsJHeUYIqpg890APBNEn9GoCbA4Cdnvuv3mx4fBk=
48 | github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
49 | github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
50 | github.com/sqweek/dialog v0.0.0-20200601143742-43ea34326190 h1:unOhcX2BMB09ByGiIvJds5p68ztCJlWGH8pLRxdz+Mg=
51 | github.com/sqweek/dialog v0.0.0-20200601143742-43ea34326190/go.mod h1:QSrNdZLZB8VoFPGlZ2vDuA2oNaVdhld3g0PZLc7soX8=
52 | github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564 h1:HunZiaEKNGVdhTRQOVpMmj5MQnGnv+e8uZNu3xFLgyM=
53 | github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564/go.mod h1:afMbS0qvv1m5tfENCwnOdZGOF8RGR/FsZ7bvBxQGZG4=
54 | github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9 h1:m59mIOBO4kfcNCEzJNy71UkeF4XIx2EVmL9KLwDQdmM=
55 | github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9/go.mod h1:mvWM0+15UqyrFKqdRjY6LuAVJR0HOVhJlEgZ5JWtSWU=
56 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
57 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
58 | github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
59 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
60 | github.com/xxtea/xxtea-go v0.0.0-20170828040851-35c4b17eecf6 h1:S+0oS/OPAe0kdSpQ7GAnCmpcDL7Jh2iJMjZTV6mYbPo=
61 | github.com/xxtea/xxtea-go v0.0.0-20170828040851-35c4b17eecf6/go.mod h1:2uvuCBt0VXxijrX5ieiAeeNT2+2MIsrs1DI9iXz7OOQ=
62 | github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
63 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
64 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
65 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
66 | golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
67 | golang.org/x/image v0.0.0-20200430140353-33d19683fad8 h1:6WW6V3x1P/jokJBpRQYUJnMHRP6isStQwCozxnU7XQw=
68 | golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
69 | golang.org/x/image v0.0.0-20200618115811-c13761719519 h1:1e2ufUJNM3lCHEY5jIgac/7UTjd6cgJNdatjPdFWf34=
70 | golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
71 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
72 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
73 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
74 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
75 | golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k=
76 | golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
77 | golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4=
78 | golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
79 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
80 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
81 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
82 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
83 | golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
84 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
85 | golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775 h1:TC0v2RSO1u2kn1ZugjrFXkRZAEaqMN/RW+OTZkBzmLE=
86 | golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
87 | golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo=
88 | golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
89 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
90 | golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
91 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
92 | golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
93 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
94 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
95 | golang.org/x/tools v0.0.0-20190808195139-e713427fea3f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
96 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
97 | golang.org/x/tools v0.0.0-20200328031815-3db5fc6bac03/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
98 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
99 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
100 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
101 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
102 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
103 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
104 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
105 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
106 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
107 | gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ=
108 | gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
109 |
--------------------------------------------------------------------------------
/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import "github.com/veo/Hattrick/appgui"
4 |
5 | func main() {
6 | appgui.Loadui()
7 | }
8 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/veo/Hattrick/0cad324e3e7611e6c86ff69a1241af7bcfd7be7c/screenshot.png
--------------------------------------------------------------------------------