-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathoccli_gui
More file actions
32 lines (28 loc) · 900 Bytes
/
occli_gui
File metadata and controls
32 lines (28 loc) · 900 Bytes
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
#!/usr/bin/env bash
# occli GUI for CSI Linux
Startoccli() {
printf "Enter the case name\n"
if [ -z "$1" ]
then
cases=$(zenity --entry --width=300 --title "Case Name" --text "Enter the case to add this to:" 2> >(grep -v 'GtkDialog' >&2))
else
cases=$1
echo "Adding to Case $cases"
fi
if [ -n "$cases" ]; then
if [ ! -d "~/Cases/$cases" ]; then
mkdir ~/Cases/$cases 2>/dev/null
cd ~/Cases/$cases
fi
/opt/csitools/case_env $cases 2>/dev/null
else
zenity --error --width=200 --text "No case entered, exiting" 2> >(grep -v 'GtkDialog' >&2)
exit
fi
}
Startoccli $1
comp=$(zenity --entry --title "occli" --text "Enter target company name" --entry-text "" 2> >(grep -v 'GtkDialog' >&2))
mkdir ~/Cases/$cases/Export/$domain 2>/dev/null
occli -q "$comp" -d "/home/csi/Cases/$cases/Export/$comp.txt" -v
gedit "/home/csi/Cases/$cases/Export/$comp.txt"
exit