Created
November 10, 2009 17:42
-
-
Save markuswustenberg/231071 to your computer and use it in GitHub Desktop.
A little script to send yubikey keys (or any input string) over network.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Port to send message to | |
PORT=9999 | |
# IP address of destination machine | |
DESTIP="127.0.0.1" | |
# Use UDP | |
NETCAT_CMD="nc -w 1 -n -u $DESTIP $PORT" | |
# Use TCP | |
#NETCAT_CMD="nc -w 1 $DESTIP $PORT" | |
while (true) | |
do | |
read KEY | |
echo "Got key $KEY" | |
echo $KEY | $NETCAT_CMD | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment