Update for initial code

This commit is contained in:
William Moore 2023-12-26 13:55:56 -06:00
parent 0291da191e
commit 1d754db4e4
5 changed files with 19 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
password.txt

10
unlock.as Normal file
View File

@ -0,0 +1,10 @@
do shell script "caffeinate -u -t 3"
set theFile to POSIX file "./password.txt"
set theFile to theFile as alias
set theFileContents to paragraphs of (read file theFile)
tell application "System Events"
keystroke (item 1 of theFileContents as string)
delay 1
keystroke return
end tell

3
unlock.php Normal file
View File

@ -0,0 +1,3 @@
<?php
header("Location: unlock_action.php");
?>

4
unlock_action.php Normal file
View File

@ -0,0 +1,4 @@
<?php
echo shell_exec("osascript './unlock.as'");
header("Location: unlock_finished.php");
?>

1
unlock_finished.php Normal file
View File

@ -0,0 +1 @@
Thank you!