-
Notifications
You must be signed in to change notification settings - Fork 0
/
ccap.sh
24 lines (24 loc) · 859 Bytes
/
ccap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
##############################################################################################################
# ccap.sh
# A small shell script to take the output from your cutycapt.rc resource script and go collect the pictures
# written by: @GraphX
# TODO: combine cutycapt and ccap into one resource script and save images as loot or make it an aux module
#
##############################################################################################################
THREADS=8
if [ $# != 2 ]; then
echo "Usage: $0 <file> </path/to/dump/to/>"
exit 1;
fi
fname=$1
cd $2
cat $fname | while read LINE; do
ofile=$(echo $LINE | cut -d "/" -f3- | cut -d "/" -f1 | sed 's/:/_/')
echo "[*] Capturing $LINE"
/usr/bin/cutycapt --url=$LINE --out=$ofile.png &
while (( $(jobs | wc -l) >= $THREADS )); do
sleep 0.1
jobs > /dev/null
done
done