first implementation of clippy
This commit is contained in:
parent
1d3c16cd7b
commit
5f2f4b62a2
|
@ -1,7 +1,6 @@
|
||||||
package ai
|
package ai
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -19,11 +18,12 @@ func ReadFromStream(inputChan chan utils.InputEvent) {
|
||||||
switch b.String() {
|
switch b.String() {
|
||||||
case b.String():
|
case b.String():
|
||||||
if findPassword(b.String()) {
|
if findPassword(b.String()) {
|
||||||
fmt.Println("I LIKE YOUR PASSWORD")
|
utils.ClippySays("I LIKE YOUR PASSWORD")
|
||||||
|
|
||||||
b.Reset()
|
b.Reset()
|
||||||
}
|
}
|
||||||
if findLove(b.String()) {
|
if findLove(b.String()) {
|
||||||
fmt.Println("I love you too...")
|
utils.ClippySays("I love you too...")
|
||||||
b.Reset()
|
b.Reset()
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
2
main.go
2
main.go
|
@ -114,6 +114,8 @@ func (k *KeyLogger) Close() error {
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Println("Your keyboard input will be here: ", getKeyboard())
|
fmt.Println("Your keyboard input will be here: ", getKeyboard())
|
||||||
|
utils.ClippySays("i am here to help")
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
// !) get streaming data from keyboard
|
// !) get streaming data from keyboard
|
||||||
// 2 unpackage the data to be human readable
|
// 2 unpackage the data to be human readable
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
@ -154,3 +155,16 @@ func (i *InputEvent) KeyPress() bool {
|
||||||
func (i *InputEvent) KeyRelease() bool {
|
func (i *InputEvent) KeyRelease() bool {
|
||||||
return i.Value == 0
|
return i.Value == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ClippySays(what string) {
|
||||||
|
|
||||||
|
clippy := fmt.Sprintf(` __
|
||||||
|
/ \
|
||||||
|
| | /
|
||||||
|
@ @ | %s
|
||||||
|
|| || |
|
||||||
|
|| || <--|
|
||||||
|
|\_/| |
|
||||||
|
\___/ \`, what)
|
||||||
|
fmt.Printf("%s", clippy)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue