-
Notifications
You must be signed in to change notification settings - Fork 2
/
test-sedTools.sh
executable file
·83 lines (56 loc) · 1.46 KB
/
test-sedTools.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
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
#!/bin/bash
drive=$1
clear
#-----------
# Test Setup
#-----------
echo "----- [+] Initiating Drive ..."
./bin/sed_tools $drive --setup
if [ $? -ne 0 ]; then
echo "\n\n----- [-] Failed to fully initialize hard drive"
exit
fi
echo "----- [+] Drive Initialized"
echo "----- [+] Unlocking and Unshadowing drive"
#------------
# Test Lock
#------------
echo "----- [+] Locking Drive ..."
./bin/sed_tools $drive --default-account --lock-drive
if [ $? -ne 0 ]; then
echo "\n\n----- [-] Failed to lock the drive"
exit
fi
echo "----- [+] Successfully Locked the drive"
#------------
# Test Unlock
#------------
echo "----- [+] Unlocking Drive ..."
./bin/sed_tools $drive --default-account --unlock-drive
if [ $? -ne 0 ]; then
echo "\n\n----- [-] Failed to unlock the drive"
exit
fi
echo "----- [+] Drive Successfully Unlocked"
echo "----- [+] Verifying default accounts credentials"
#-----------
# Test Login
#-----------
echo "---- [+] Checking Account login information"
./bin/sed_tools $drive --default-account --test-login
if [ $? -ne 0 ]; then
echo "\n\n----- [-] Failed to authenticate with default accounts"
exit
fi
echo "----- [+] Accounts credentials verified"
#-----------------
# Revert the drive
#-----------------
echo "----- [+] Reverting the drive"
./bin/sed_tools $drive --revert dpassword
if [ $? -ne 0 ]; then
echo "\n\n----- [-] Failed to revert the drive"
exit
fi
echo "----- [+] Drive reverted"
echo "----- [+] Test completed successfully"