potknocker/common/console.go
2024-08-31 20:55:33 -05:00

80 lines
2.0 KiB
Go

package common
import (
"fmt"
"os"
"time"
)
var (
colorReset = "\033[0m"
colorRed = "\033[31m"
colorPurple = "\033[35m"
colorCyan = "\033[36m"
colorYellow = "\033[33m"
colorGreen = "\033[32m"
skull = "\u2620"
)
func fatal(e string) {
fmt.Printf("%s%s %s%s\n", colorRed, skull, e, colorReset)
os.Exit(-1)
}
func info(msg string) {
fmt.Printf("%si %s%s\n", colorCyan, msg, colorReset)
}
func warn(msg string) {
fmt.Printf("%s! %s%s\n", colorYellow, msg, colorReset)
}
func success(msg string) {
fmt.Printf("%s+ %s%s\n", colorGreen, msg, colorReset)
}
func usage() {
Banner()
fmt.Fprintf(os.Stderr, `
potknocker - the block party on honeypot street
%s!%s -r %starget specific cidr range [0.0.0.0/0]
%s!%s -l %slist of target cidr's (individual ip = /32)%s
-p %spayload file to upload to the pot%s
-c %sshell commands to run on the pot
%s!%s -ssh %starget ssh honeypots
%s!%s -ftp %starget ftp honeypots%s
-t %sthreads [25]%s
-s %ssilence attempt logs%s
`, colorRed, colorCyan, colorPurple, colorRed, colorCyan, colorPurple, colorCyan, colorPurple, colorCyan,
colorPurple, colorRed, colorCyan, colorPurple, colorRed, colorCyan, colorPurple, colorCyan, colorPurple,
colorCyan, colorPurple, colorReset)
}
func Banner() {
fmt.Fprintf(os.Stderr, `
%s"i see a silly goose"%s
___________ ____
______/ \__// \__/____\
_/ \_/ //____\\
/| / \
| | \ /
| | | || \ \______/
| | || || |\ / |
\| || || | / | \
| || || | / /_\ \
| ___ || ___ || | / / \
\_ _/ \_ _/ | ____ |/__/ \
_\_ _/ \ /
/____ /
/ \ /
\______\_________/
sincerely,
~delorean
`, colorRed, colorReset)
}
func pause() {
time.Sleep(3 * time.Second)
warn("parking in front of steve linford's house...")
}