mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2024-12-23 06:42:51 +00:00
31 lines
800 B
Go
31 lines
800 B
Go
package util
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
|
|
"github.com/pterm/pterm"
|
|
)
|
|
|
|
func ParseArgs() (string, string, bool) {
|
|
port := flag.String("port", "8080", "port")
|
|
dns := flag.String("dns", "8.8.8.8", "DNS server")
|
|
debug := flag.Bool("debug", false, "true | false")
|
|
|
|
flag.Parse()
|
|
|
|
return *port, *dns, *debug
|
|
}
|
|
|
|
func PrintWelcome(port string, dns string, debug bool) {
|
|
cyan := pterm.NewLettersFromStringWithStyle("Spoof", pterm.NewStyle(pterm.FgCyan))
|
|
purple := pterm.NewLettersFromStringWithStyle("DPI", pterm.NewStyle(pterm.FgLightMagenta))
|
|
pterm.DefaultBigText.WithLetters(cyan, purple).Render()
|
|
|
|
pterm.DefaultBulletList.WithItems([]pterm.BulletListItem{
|
|
{Level: 0, Text: "PORT : " + port},
|
|
{Level: 0, Text: "DNS : " + dns},
|
|
{Level: 0, Text: "DEBUG : " + fmt.Sprint(debug)},
|
|
}).Render()
|
|
}
|