Add automatic scrolling when headers don't fit on screen - Closes #26
This commit is contained in:
parent
20195f8f6c
commit
6d1f3f2bf1
@ -62,20 +62,23 @@ while IFS= read -r DOMAIN; do
|
||||
network_inspector_search "domain:$DOMAIN " # can filter with more granularity: https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor/request_list#filtering_by_properties
|
||||
|
||||
# grab ni_search
|
||||
|
||||
count=0
|
||||
while network_inspector_has_more_entries
|
||||
do
|
||||
filename="$ID/${index}.png"
|
||||
scrot "/opt/static/$filename"
|
||||
grab "searching $DOMAIN"
|
||||
BASE_URL="$BASE_URL" python annotate_header.py "$filename" "$DOMAIN" \
|
||||
"set-cookie" "identyfikator internetowy z cookie" 11 ""\
|
||||
"Cookie" "identyfikator internetowy z cookie" 11 ""\
|
||||
"Referer" "Część mojej historii przeglądania" 0 "$ORIGIN_DOMAIN" &
|
||||
screenshot_and_annotate "$ID" $index "$DOMAIN" "$ORIGIN_DOMAIN" &
|
||||
pids+=($!)
|
||||
network_inspector_next_entry
|
||||
((index++))
|
||||
while network_inspector_headers_need_scrolling
|
||||
do
|
||||
xdotool mousemove 2400 1000
|
||||
echo "SCROLLING DOWN"
|
||||
xdotool click 5 click 5 click 5 # scroll down
|
||||
sleep 0.1
|
||||
screenshot_and_annotate "$ID" $index "$DOMAIN" "$ORIGIN_DOMAIN" &
|
||||
pids+=($!)
|
||||
((index++))
|
||||
done
|
||||
network_inspector_next_entry
|
||||
((count++))
|
||||
if [ $count -gt 10 ]; then
|
||||
break;
|
||||
|
@ -223,3 +223,21 @@ network_inspector_next_entry(){
|
||||
# measure(){
|
||||
|
||||
# }
|
||||
network_inspector_headers_need_scrolling (){
|
||||
color=$(get_pixel_color 2870 1573)
|
||||
[ "$color" = "#ededf0" ]
|
||||
}
|
||||
|
||||
screenshot_and_annotate(){
|
||||
ID=$1
|
||||
index=$2
|
||||
DOMAIN=$3
|
||||
ORIGIN_DOMAIN=$4
|
||||
filename="$ID/${index}.png"
|
||||
scrot "/opt/static/$filename"
|
||||
grab "searching $DOMAIN"
|
||||
BASE_URL="$BASE_URL" python annotate_header.py "$filename" "$DOMAIN" \
|
||||
"set-cookie" "identyfikator internetowy z cookie" 11 ""\
|
||||
"Cookie" "identyfikator internetowy z cookie" 11 ""\
|
||||
"Referer" "Część mojej historii przeglądania" 0 "$ORIGIN_DOMAIN"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user