package common import ( "fmt" "os" ) var ( ColorReset = "\033[0m" ColorRed = "\033[31m" ColorPurple = "\033[35m" ColorLightBlue = "\033[34m" ColorCyan = "\033[36m" ColorGreen = "\033[32m" ColorOrange = "\033[91m" ColorGray = "\033[90m" ColorYellow = "\033[93m" ) func Banner() { fmt.Printf(`%s .------..------..------..------..------..------..------. |%s%sP%s%s.--. ||%s%sA%s%s.--. ||%s%sT%s%s.--. ||%s%sD%s%s.--. ||%s%sO%s%s.--. ||%s%sW%s%s.--. ||%s%sN%s%s.--. | | :/\: || (\/) || :/\: || :/\: || :/\: || :/\: || :(): | | (__) || :\/: || (__) || (__) || :\/: || :\/: || ()() | | '--'P|| '--'A|| '--'T|| '--'D|| '--'O|| '--'W|| '--'N| '------''------''------''------''------''------''------' %s%s sincerely, ~ delorean%s `, ColorRed, ColorReset, ColorGray, ColorReset, ColorRed, ColorReset, ColorGray, ColorReset, ColorRed, ColorReset, ColorGray, ColorReset, ColorRed, ColorReset, ColorGray, ColorReset, ColorRed, ColorReset, ColorGray, ColorReset, ColorRed, ColorReset, ColorGray, ColorReset, ColorRed, ColorReset, ColorGray, ColorReset, ColorRed, ColorReset, ColorGray, ColorReset) } func Usage() { fmt.Fprintf(os.Stderr, `patdown usage: (%s-t%s) - target domain (%s-n%s) - specific nameserver to snoop, can be multiple (%s-c%s) - concurrent threads [%s100%s] (%s-s%s) - delay between queries, per thread, in milliseconds [%s100%s] %se.g.%s patdown -t supernets.org patdown -n ns1.supernets.org -n ns2.supernets.org patdown -t supernets.org -c 50 -s 500 `, ColorCyan, ColorReset, ColorCyan, ColorReset, ColorCyan, ColorReset, ColorGray, ColorReset, ColorCyan, ColorReset, ColorGray, ColorReset, ColorCyan, ColorReset) } var Vendors = map[string]string{ "Microsoft Defender for Endpoint": "\033[34mMicrosoft Defender for Endpoint\033[0m", "VMWare Carbon Black": "\033[36mVMware\033[0m \033[90mCarbon Black\033[0m", "CrowdStrike Falcon": "\033[31mCrowdStrike\033[0m \033[1mFalcon\033[0m", "CheckPoint Harmony": "\033[35mCheckPoint\033[0m \033[1mHarmony\033[0m", "Cybereason": "\033[93mCybereason\033[0m", "Trellix": "\033[32mTrellix\033[0m", "Palo Alto Networks": "\033[91mPalo Alto Networks\033[0m", "SentinelOne": "\033[35mSentinelOne\033[0m", "Symantec": "\033[93mSymantec\033[0m", "Tanium": "\033[31mTanium\033[0m", "Nextron Aurora": "\033[36mNextron\033[0m \033[90mAurora\033[0m", "Trend Micro": "\033[31mTrend\033[0m \033[1mMicro\033[0m", "Rapid7 InsightIDR": "\033[97mRapid\033[0m\033[91m7\033[0m \033[97mInsightIDR\033[0m", } func Success(msg string) { fmt.Printf(" %s~+~%s %s\n", ColorGreen, ColorReset, msg) } func Info(msg string) { fmt.Printf(" %s~i~%s %s\n", ColorCyan, ColorReset, msg) } func Warning(msg string) { fmt.Printf(" %s~!~%s %s\n", ColorYellow, ColorReset, msg) } func Error(msg string) { fmt.Printf(" %s~x~%s %s\n", ColorRed, ColorReset, msg) } func Fatal(msg string) { fmt.Printf(" %s~f~%s %s\n", ColorRed, ColorReset, msg) os.Exit(-1) }