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