first implementation of clippy
This commit is contained in:
parent
1d3c16cd7b
commit
5f2f4b62a2
|
@ -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:
|
||||
|
|
2
main.go
2
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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue