Delete apgen
This commit is contained in:
@@ -1,52 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
## ARDUINO PASSKEY GENERATOR
|
|
||||||
## 20260722-043053
|
|
||||||
|
|
||||||
##SETUP
|
|
||||||
#sudo apt install coreutils curl git openssl
|
|
||||||
#curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
|
|
||||||
#chmod +x ./bin/arduino-cli; sudo cp ./bin/arduino-cli /usr/local/bin/
|
|
||||||
#arduino-cli core install arduino:avr; arduino-cli lib install keyboard
|
|
||||||
|
|
||||||
echo "CREATE PASSKEY:"
|
|
||||||
read -r pw
|
|
||||||
##sha512sum
|
|
||||||
#key=$(echo -n $key | sha512sum | awk '{print $1}')
|
|
||||||
##openssl sha512
|
|
||||||
#key=$(printf '%s' $key | openssl dgst -sha512 | awk '{print $2}')
|
|
||||||
##openssl passwd sha512
|
|
||||||
key=$(openssl passwd -6 -salt $pw $pw | awk -F'$' '{print $4}')
|
|
||||||
|
|
||||||
#arduino-cli board list
|
|
||||||
#echo "SET SERIAL PORT [PORT]:"
|
|
||||||
#read -r port
|
|
||||||
#echo "SET BOARD [FQBN]:"
|
|
||||||
#read -r fqbn
|
|
||||||
port=ACM0
|
|
||||||
fqbn=arduino:avr:micro
|
|
||||||
#export port
|
|
||||||
#export fqbn
|
|
||||||
|
|
||||||
sudo rm -drf ./.tmp
|
|
||||||
mkdir ./.tmp
|
|
||||||
mkdir ./.tmp/apg
|
|
||||||
|
|
||||||
echo "
|
|
||||||
#include <Keyboard.h>
|
|
||||||
|
|
||||||
void setup() {
|
|
||||||
// put your setup code here, to run once:
|
|
||||||
Keyboard.begin();
|
|
||||||
delay(1000);
|
|
||||||
Keyboard.println(\"$key\");
|
|
||||||
}
|
|
||||||
|
|
||||||
void loop() {
|
|
||||||
// put your main code here, to run repeatedly:
|
|
||||||
|
|
||||||
}" | tee ./.tmp/apg/apg.ino
|
|
||||||
|
|
||||||
|
|
||||||
arduino-cli compile --fqbn $fqbn --port /dev/tty$port ./.tmp/apg/apg.ino
|
|
||||||
arduino-cli upload --fqbn $fqbn --port /dev/tty$port ./.tmp/apg/apg.ino
|
|
||||||
Reference in New Issue
Block a user