-
Notifications
You must be signed in to change notification settings - Fork 6
/
seth_test.sh
69 lines (52 loc) · 2.39 KB
/
seth_test.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
echo "This script DELETES several files presumed to be from previous tests."
echo "Check you are not in an important directory before running this"
read -r -n 1 -p "Continue? [y/N]"
if [ "$REPLY" = "y" ]
then
# Clean up bitpoints files
rm bitpoints.10.*
rm bp*.*
# Clean up receipt files
rm bank_receipt.*.*
# Clean up previous run files
rm mint2
rm pwds
# Configurations
certPath="certs/signed_certs/5001cert"
keyPath="certs/signed_certs/5001pk"
badCert="certs/signed_certs/6001cert"
echo =================== PrintingPress create ===================
python3 PrintingPress.py create $certPath $keyPath mint2
echo =================== PrintingPress mint ===================
python3 PrintingPress.py mint 100:100 $certPath mint2
bitpointsfile="$(ls | grep bitpoints | head -1)"
echo =================== PrintingPress info ===================
python3 PrintingPress.py info $bitpointsfile
echo =================== PrintingPress validate ===================
python3 PrintingPress.py validate $bitpointsfile $certPath
echo =================== BankCore full_test ===================
python3 BankCore.py test $certPath $keyPath $bitpointsfile $badCert
echo =================== BankCore balances ===================
python3 BankCore.py balances $certPath test_bankcore_db
echo =================== OnlineBank pw user add ===================
echo Adding user fadyuser
python3 OnlineBank.py pw pwds user add fadyuser
echo Adding user sethuser
python3 OnlineBank.py pw pwds user add sethuser
echo =================== OnlineBank pw account add ===================
python3 OnlineBank.py pw pwds account add "Fady'sPEM"
# matching account names with those in BankCore's full_test
echo =================== OnlineBank pw chmod ===================
python3 OnlineBank.py pw pwds chmod fadyuser "Fady'sPEM" btwda
python3 OnlineBank.py pw pwds chmod sethuser "Fady'sPEM" b
python3 OnlineBank.py pw pwds chmod sethuser "VAULT" btwda
python3 OnlineBank.py pw pwds chmod sethuser "__admin__" BSAFC
echo fadyuser Permissions:
python3 OnlineBank.py pw pwds chmod fadyuser
echo sethuser Permissions:
python3 OnlineBank.py pw pwds chmod sethuser
echo =================== OnlineBank server ===================
python3 OnlineBank.py server pwds test_bankcore_db $certPath $certPath
#echo =================== OnlineBank Client ===================
#python3 OnlineBank.py client 20174.1337.1337.1 $certPath fadyuser
fi