mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2025-01-03 04:50:11 +00:00
add print welcome
This commit is contained in:
parent
5f93aaf92f
commit
117e053751
@ -2,11 +2,12 @@ package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/xvzc/SpoofDPI/config"
|
||||
"github.com/xvzc/SpoofDPI/proxy"
|
||||
"github.com/xvzc/SpoofDPI/util"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -21,14 +22,13 @@ func main() {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
cyan := pterm.NewLettersFromStringWithStyle("Spoof", pterm.NewStyle(pterm.FgCyan))
|
||||
purple := pterm.NewLettersFromStringWithStyle("DPI", pterm.NewStyle(pterm.FgLightMagenta))
|
||||
pterm.DefaultBigText.WithLetters(cyan, purple).Render()
|
||||
util.PrintWelcome()
|
||||
|
||||
pterm.DefaultBulletList.WithItems([]pterm.BulletListItem{
|
||||
{Level: 0, Text: "SRC : " + *src},
|
||||
{Level: 0, Text: "DNS : " + *dns},
|
||||
}).Render()
|
||||
err = config.SetOsProxy()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
proxy.Start()
|
||||
}
|
||||
|
20
util/welcome.go
Normal file
20
util/welcome.go
Normal file
@ -0,0 +1,20 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/xvzc/SpoofDPI/config"
|
||||
)
|
||||
|
||||
|
||||
func PrintWelcome() {
|
||||
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: "SOURCE IP : " + config.GetConfig().SrcIp},
|
||||
{Level: 0, Text: "SOURCE PORT : " + config.GetConfig().SrcPort},
|
||||
{Level: 0, Text: "DNS : " + config.GetConfig().DNS},
|
||||
}).Render()
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user