-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathExiF
executable file
·112 lines (106 loc) · 2.73 KB
/
ExiF
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/bin/env bash
#Coded by Ivam3 on 06/02/2018
#Modificatd on 20/06/2020
#
trap ctrl_c 2
R='\033[1;31m'
G='\033[1;32m'
Goke='\033[92m'
Glig='\e[1;32m'
Y='\033[1;33m'
B='\033[1;34m'
M='\033[1;35m'
C='\033[1;36m'
W='\033[0m'
FILE=$1
PWD=$(pwd)
TMP_FILE=$(mktemp)
command -v exiftool > /dev/null 2>&1 || { echo >&2 "[!]─➤ Installing repositories"; sleep 1; pkg install exiftool; }
ctrl_c() {
Banner
printf "\t |-| |-|\n\t$R\tABORTING\n$W"
sleep 0.5
printf "$Y\n[!]─➤ Going me on$B https://t.me/Ivam3byCinderella$W\n\n"
exit
}
Banner() {
clear
printf "$Glig
_____ _ _____
| ____Ivam3(_) ___|
| _| \ \/ / | |_
| |___ > <| | _|
|_____/_/\_\_|_|_v2.0\n"
}
Menu() {
printf "\t |-| |-|\n\t\tMAIN MENU\n$W"
printf "$Glig\n\t[*]─➤$C What do you wanna do ?$W\n\n"
printf "\t$Glig 1)$W Extract Meta Data.\n"
printf "\t$Glig 2)$W Delete Meta Data. \n"
printf "\t$Glig 3)$W Add or Modify Meta Data\n"
printf "\t$Glig 0)$W Exit.\n\n$W"
while read -p " [+]─➤ " ANSW && [ -z $ANSW ]; do
continue
done
case $ANSW in
1|01)
Banner
printf "\t |-| |-|\n\t\tMETA DATA\n\n$W"
$(which exiftool) -V $FILE > $TMP_FILE
$(which cat) $TMP_FILE
printf "$Y\n[!]─➤$C Data saved in $TMP_FILE\n$W\n"
;;
2|02)
printf "\t$Glig 2.1)$W All data\n"
printf "\t$Glig 2.2)$W An specific tag\n\n"
while read -p " [+]─➤ " ANSW && [ -z $ANSW ]; do
continue
done
Banner
printf "\t |-| |-|\n\t DELETING DATA\n\n$W"
if [ "$ANSW" = "2.1" ]; then
$(which exiftool) -all= $FILE
elif [ "$ANSW" = "2.2" ]; then
printf "$Glig\t[*]─➤$C Set the tag to delete$W\n"
while read -p " [+]─➤ " ANSW && [ -z $ANSW ]; do
continue
done
TAG=$ANSW
$(which exiftool) -$TAG=" " $FILE
else
printf "$R\t[w]─➤ O-ops!!$W\n"
sleep 2
ctrl_c
fi
;;
3|03)
Banner
printf "\t |-| |-|\n\t WRITING DATA\n$W"
printf "$Glig\t[*]─➤$C Set the tag to change$W\n"
while read -p " [+]─➤ " ANSW && [ -z $ANSW ]; do
continue
done
TAG=$ANSW
printf "$Glig\n\t[*]─➤$C Set the new value$W\n"
while read -p " [+]─➤ " ANSW && [ -z $ANSW ]; do
continue
done
VALUE=$ANSW
$(which exiftool) -$TAG="$VALUE" $FILE
;;
0)
exit
;;
esac
}
Banner
if [ -z $1 ]; then
printf "\t |-| |-|\n\t\t USAGE$W\n\t* ExiF <imagen/video path> *\n"
exit
elif [ ! -e $1 ]; then
printf "\t |-| |-|\n\t\t$R WARNING$W\n\t Not such file or directory\n"
exit
else
Menu
fi
# @Ivam3