https://github.com/celzero/gotrie
A golang reader for a in-house, modified stevehanov's succinct trie implementation (http://stevehanov.ca/blog/?id=120) serialized to uint16 instead of base64.
https://github.com/celzero/gotrie
Last synced: 12 months ago
JSON representation
A golang reader for a in-house, modified stevehanov's succinct trie implementation (http://stevehanov.ca/blog/?id=120) serialized to uint16 instead of base64.
- Host: GitHub
- URL: https://github.com/celzero/gotrie
- Owner: celzero
- License: mpl-2.0
- Created: 2020-09-16T15:44:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-14T13:01:44.000Z (about 1 year ago)
- Last Synced: 2025-03-25T04:03:45.353Z (about 1 year ago)
- Language: Go
- Homepage: https://bravedns.com/configure
- Size: 126 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gotrie
## Build FrozenTrie
```
err,FT := trie.Build("./td.txt","./rd.txt","./basicconfig.json","./filetag.json")
```
## Create URLencoded Base64 string
```
param := []string{"AMI","CQT","EOK","MTF"}
usr_flag := FT.CreateUrlEncodedflag(param) ###### input 3character unique string of blacklist file name
fmt.Println(usr_flag)
######### following will be output as URL encoded base64 string
6IeA6ICA4oCAxIAE
```
## Unique filename frm User flag
```
fmt.Println(FT.Urlenc_to_flag("6IeA6ICA4oCAxIAE")) ###### input URLencoded base64 user flag string
######### following will be output as list of string
[AMI CQT EOK MTF]
```
## Domain Name lookup in Trie
```
text := "alltereg0.ru"
usr_flag := "6IeA6ICA4oCAxIAE"
FT.DNlookup(text,usr_flag)
######### following will be output as (boolean, list of string)
true [EOK AMI]
text := "google.com"
usr_flag := "6IeA6ICA4oCAxIAE"
FT.DNlookup(text,usr_flag)
######### following will be output as (boolean, list of string)
false []
```