Go to file
Kevin F 1147984f40 update readme for current state of project 2023-03-05 22:29:15 -06:00
.vscode + Finished authentication 2022-09-10 14:28:54 -05:00
security Split the client and server into different Go packages and binaries to make it easier to do cross platform builds and to be more unixy 2023-01-26 18:51:31 -06:00
server Add backlog 2023-03-05 19:51:45 -06:00
tools Remove print about numbers 2023-03-05 20:02:20 -06:00
util added utility to remove fenced code blocks from final html docs since srcweave is a pain in that regard 2022-09-08 13:35:51 -05:00
.gitattributes added gitattributes with linguist ignores 2022-09-10 14:33:46 -05:00
.gitignore + Started ThreatModel.md 2022-12-31 00:34:03 -06:00
Building.md Add building.md 2023-01-05 01:10:57 -06:00
Client.md Replace sendkeys with keylogger 2023-03-02 21:20:34 -06:00
Dependencies.md mostly working 2023-03-04 20:40:41 -06:00
EnvironmentVariables.md Replace sendkeys with keylogger 2023-03-02 21:20:34 -06:00
LICENSE.md Add license and move websocket to Streaming file 2022-12-27 17:05:32 -06:00
Makefile Switched rawcapture to use python because it works 2023-03-04 22:55:02 -06:00
ReadMe.md update readme for current state of project 2023-03-05 22:29:15 -06:00
ThreatModel.md Started client 2022-12-31 19:23:52 -06:00

ReadMe.md

GoSmartKeyboard

Copyright Kevin Froman Licensed under GPLv3

Work in progress

Introduction

GoSmartKeyboard is a daemon that allows you to have a more powerful keyboarding experience. It can be used with a secondary device, such as an Android phone or a raspberry pi, or it can run locally. A seperate client binary is provided that reads from a FIFO (named pipe) and sends the data to the server. This allows you to use any program that can write to a FIFO as a source of keyboard input.

This is done with a simple websocket server meant to accept a single connection, authenticate it, and stream UTF16 characters and send them as key strokes into the window manager. With a simple daemon like this we can enhance keyboarding with inteligent features.

Be careful with online games, as they may interpret the keystrokes as cheating. I assume if you don't send keystrokes or more accurately than a human you should be fine, but don't blame the software if you get banned.

See Building.md for instructions on how to build this literate project.

What can you do with it?

Examples of what you can do:

  • Run dictation software on a separate device
  • Typical macros
  • Buffer typed text before sending it to the server, preventing invalid commands or input.
  • Clever CLI tricks, think vim or cowsay on your keyboard!
  • Isolated password manager
  • One Time Passwords
  • Virtual keyboard switch (keyboard multiplexer)
  • Typing things into VMS, or transfering text based files to VMs/servers.
  • Text storage, such as configuration or SSH pubkeys
  • On-the-fly spell checking or translation
  • On-the-fly encryption (ex: PGP sign every message you type), isolated from the perhaps untrusted computer
  • Easy layout configuration
  • Delay keystrokes by a few dozen or so milliseconds to reduce key stroke timing biometrics

Some points about the design of this project:

  • Written in go with the literate tool srcweave, so this markdown book is actually the source code
  • KISS principle above All
  • Small and light core
  • No dependencies for the core and most features
  • Features (such as described in above section) are implementend as seperate programs, unix style
  • Simple threat model

Running

Server

sudo KEYBOARD_TCP_BIND_ADDRESS=0.0 KEYBOARD_TCP_BIND_PORT=8080 ./keyboard

Server Entrypoint

Right out of the gate, we make sure a token is provisioned. In the future we will use the system keyring.

Then we can start the web server and listen for websocket connections.


--- entrypoint

    func main(){
        
        tokenBase64, _ := auth.ProvisionToken()
        if len(tokenBase64) > 0 {
            fmt.Println("This is your authentication token, it will only be shown once: " + tokenBase64)        
        }


        server.StartServer()
    }

---


--- /server/main.go
    package main

    import(
        "fmt"
        "keyboard.voidnet.tech/server"
        "keyboard.voidnet.tech/auth"
    )


    @{entrypoint}

---



--- set network bind globals

    var string unixSocketPath
    var bool unixSocketPathExists
    var string tcpBindAddress
    var bool tcpBindAddressExists
    var string tcpBindPort
    var bool tcpBindPortExists

---