screenshot-service/script3.sh

47 lines
862 B
Bash
Raw Normal View History

2022-04-20 23:23:48 +02:00
#!/bin/bash
2022-02-24 00:24:13 +01:00
2022-02-13 22:30:56 +01:00
source ./ephemeral-x.sh
2022-04-20 23:23:48 +02:00
source ./annotate_header.sh
source ./utils.sh
2022-02-13 22:30:56 +01:00
start_firefox
prepare_firefox
load_website "biedronka.pl"
open_network_inspector
network_inspector_search "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
2022-02-24 00:24:13 +01:00
index=0
2022-02-24 00:24:13 +01:00
declare -a pids;
pids=()
2022-02-24 00:24:13 +01:00
while network_inspector_has_more_entries
2022-02-24 00:24:13 +01:00
do
filename="${index}.png"
scrot "$filename"
annotate_header "$filename" \
"set-cookie" "identyfikator internetowy z cookie" \
"Cookie" "identyfikator internetowy z cookie" \
"Referer" "Część mojej historii przeglądania" &
pids+=($!)
network_inspector_next_entry
((index++))
2022-02-24 00:24:13 +01:00
done
echo "starting wait..."
2022-02-14 22:10:01 +01:00
jobs -l
2022-02-13 22:30:56 +01:00
for PID in "${pids[@]}"
2022-02-24 00:24:13 +01:00
do
wait $PID
2022-02-24 00:24:13 +01:00
done
2022-02-13 22:30:56 +01:00
kill -2 %%;
cleanup
2022-02-24 00:24:13 +01:00
echo "Done!"