Skip to content

Commit

Permalink
Add user-agent (curl) (#495)
Browse files Browse the repository at this point in the history
* Add user-agent (curl)

* user-agent: Linux x86_64
  • Loading branch information
nikolaev-rd authored Jan 4, 2024
1 parent 89e6e2a commit 762c5d8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash

USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"

while true
do
if [[ $(curl -sL -b cookiefile -w "%{http_code}\\n" "$(/home/pi/scripts/get_url)" -o /dev/null) =~ ^([23][0-9]{2,2}|401)$ ]] || grep -q disabled "/boot/check_for_httpd" ; then
if [[ $(curl -sL -b cookiefile -w "%{http_code}\\n" -H "user-agent: ${USER_AGENT}" "$(/home/pi/scripts/get_url)" -o /dev/null) =~ ^([23][0-9]{2,2}|401)$ ]] || grep -q disabled "/boot/check_for_httpd" ; then
xdotool mousemove 9000 9000
%BROWSER_START_SCRIPT%
fi
Expand Down

0 comments on commit 762c5d8

Please sign in to comment.