Clean up the cli output of the script3
This commit is contained in:
parent
c2680ddca5
commit
1c17243856
|
@ -118,7 +118,7 @@ while true; do
|
||||||
set -- $XSERVER
|
set -- $XSERVER
|
||||||
cmd=$1
|
cmd=$1
|
||||||
shift
|
shift
|
||||||
exec $cmd :$num "$@"
|
exec $cmd :$num "$@" > /dev/null 2>&1
|
||||||
) &
|
) &
|
||||||
xpid=$!
|
xpid=$!
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ if [ ! -z "$WINMGR" -a "$WINMGR" != "none" ] ; then
|
||||||
exec > /dev/null
|
exec > /dev/null
|
||||||
exec 2> /dev/null
|
exec 2> /dev/null
|
||||||
fi
|
fi
|
||||||
$WINMGR
|
$WINMGR > /dev/null 2>&1
|
||||||
) &
|
) &
|
||||||
winmgrpid=$!
|
winmgrpid=$!
|
||||||
|
|
||||||
|
|
32
script3.sh
32
script3.sh
|
@ -59,13 +59,16 @@ annotate_header(){
|
||||||
height=1260
|
height=1260
|
||||||
scrot $filename
|
scrot $filename
|
||||||
vips extract_area "$filename" "$cropped_filename" $left $top $width $height
|
vips extract_area "$filename" "$cropped_filename" $left $top $width $height
|
||||||
|
echo "cropped image"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
rm -rf /root/.mozilla/firefox/bifup8k5.docker/sessionstore-backups
|
rm -rf /root/.mozilla/firefox/bifup8k5.docker/sessionstore-backups
|
||||||
#echo 'user_pref("layout.css.devPixelsPerPx", "1.5");' >> /root/.mozilla/firefox/bifup8k5.docker/prefs.js
|
#echo 'user_pref("layout.css.devPixelsPerPx", "1.5");' >> /root/.mozilla/firefox/bifup8k5.docker/prefs.js
|
||||||
|
|
||||||
firefox --devtools &
|
firefox --devtools > /dev/null &
|
||||||
|
|
||||||
|
# test
|
||||||
|
|
||||||
FIREFOX_PID=$!
|
FIREFOX_PID=$!
|
||||||
|
|
||||||
|
@ -95,6 +98,12 @@ xdotool key Escape
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
grab after escape
|
grab after escape
|
||||||
|
|
||||||
|
|
||||||
|
keycombo Control_L Shift_L e
|
||||||
|
xdotool key Escape
|
||||||
|
keycombo Shift_L c F5 #profiler
|
||||||
|
keycombo Control_L Shift_L e
|
||||||
|
|
||||||
grab after control shift e before ctrl L
|
grab after control shift e before ctrl L
|
||||||
|
|
||||||
keycombo Control_L l
|
keycombo Control_L l
|
||||||
|
@ -111,19 +120,28 @@ sleep 1
|
||||||
|
|
||||||
scrot
|
scrot
|
||||||
|
|
||||||
|
|
||||||
echo "waiting for the website to load..."
|
echo "waiting for the website to load..."
|
||||||
|
times=0
|
||||||
while [ $(get_pixel_color 143 122) = "2E3436" ] # the center of the X icon that becomes a "refresh" icon once the website is finished loading
|
while [ $(get_pixel_color 143 122) = "2E3436" ] # the center of the X icon that becomes a "refresh" icon once the website is finished loading
|
||||||
do
|
do
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
printf "."
|
printf "."
|
||||||
grab loading
|
scrot
|
||||||
|
times=$((times + 1))
|
||||||
|
if [ $times -eq 10 ]
|
||||||
|
then
|
||||||
|
echo "Could not load website in time"
|
||||||
|
break;
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
scrot
|
keycombo Shift_L F5 #profiler
|
||||||
|
echo shift f5
|
||||||
|
sleep 1
|
||||||
keycombo Control_L Shift_L c
|
echo "sleep 1"
|
||||||
keycombo Control_L Shift_L e
|
keycombo Control_L Shift_L e
|
||||||
|
echo ctrl shift e
|
||||||
keycombo Control_L f
|
keycombo Control_L f
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
xdotool type "method:GET domain:adocean.pl" # can filter with more granularity: https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor/request_list#filtering_by_properties
|
xdotool type "method:GET domain:adocean.pl" # can filter with more granularity: https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor/request_list#filtering_by_properties
|
||||||
|
@ -147,11 +165,13 @@ do
|
||||||
xdotool key Down
|
xdotool key Down
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
annotate_header set-cookie
|
annotate_header set-cookie
|
||||||
|
# use python script ^here to annotate the cropped png
|
||||||
# scrot
|
# scrot
|
||||||
# echo "########## EXTRACTED TEXT: "
|
# echo "########## EXTRACTED TEXT: "
|
||||||
# extract_text 2056 330 824 1260 | grep cookie
|
# extract_text 2056 330 824 1260 | grep cookie
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "Done!"
|
||||||
|
|
||||||
kill -2 %%;
|
kill -2 %%;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user