From 5f2f4b62a206460c1d98d3c141e1834755cd78b6 Mon Sep 17 00:00:00 2001 From: Christopher Talib Date: Thu, 19 Dec 2019 16:26:14 +0100 Subject: [PATCH] first implementation of clippy --- ai/main.go | 6 +++--- main.go | 2 ++ utils/main.go | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ai/main.go b/ai/main.go index 1d7ae5a..a40badb 100644 --- a/ai/main.go +++ b/ai/main.go @@ -1,7 +1,6 @@ package ai import ( - "fmt" "regexp" "strings" @@ -19,11 +18,12 @@ func ReadFromStream(inputChan chan utils.InputEvent) { switch b.String() { case b.String(): if findPassword(b.String()) { - fmt.Println("I LIKE YOUR PASSWORD") + utils.ClippySays("I LIKE YOUR PASSWORD") + b.Reset() } if findLove(b.String()) { - fmt.Println("I love you too...") + utils.ClippySays("I love you too...") b.Reset() } default: diff --git a/main.go b/main.go index 1577da9..137eaef 100644 --- a/main.go +++ b/main.go @@ -114,6 +114,8 @@ func (k *KeyLogger) Close() error { func main() { fmt.Println("Your keyboard input will be here: ", getKeyboard()) + utils.ClippySays("i am here to help") + // TODO // !) get streaming data from keyboard // 2 unpackage the data to be human readable diff --git a/utils/main.go b/utils/main.go index 6b9a917..85d31de 100644 --- a/utils/main.go +++ b/utils/main.go @@ -1,6 +1,7 @@ package utils import ( + "fmt" "syscall" "unsafe" ) @@ -154,3 +155,16 @@ func (i *InputEvent) KeyPress() bool { func (i *InputEvent) KeyRelease() bool { return i.Value == 0 } + +func ClippySays(what string) { + + clippy := fmt.Sprintf(` __ +/ \ +| | / +@ @ | %s +|| || | +|| || <--| +|\_/| | +\___/ \`, what) + fmt.Printf("%s", clippy) +}