Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contact-details.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name: first last
email: name@email.com
name: Shai Kamenker
email: kamenker92@gmail.com
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.5:b54041f5-4c69-4c8b-b66b-6dc80a4d6d02
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1566334730
1 change: 1 addition & 0 deletions vagrant/.vagrant/machines/server1/virtualbox/box_meta
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"ubuntu/precise64","version":"20170427.0.0","provider":"virtualbox","directory":"boxes/ubuntu-VAGRANTSLASH-precise64/20170427.0.0/virtualbox"}
1 change: 1 addition & 0 deletions vagrant/.vagrant/machines/server1/virtualbox/creator_uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
1 change: 1 addition & 0 deletions vagrant/.vagrant/machines/server1/virtualbox/id
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b54041f5-4c69-4c8b-b66b-6dc80a4d6d02
1 change: 1 addition & 0 deletions vagrant/.vagrant/machines/server1/virtualbox/index_uuid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f15ec8cbb9e04025b4d10a6b78ea0e5e
27 changes: 27 additions & 0 deletions vagrant/.vagrant/machines/server1/virtualbox/private_key
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAuPjODk633+6xITW+TT5H1W4U9spp4BHLcYa48LOeL8p1Vqjk
g9ADAbFwcY6S7Ln8tA1aZX9ADmuGujXhWsCVGMNQvPh0XS5dCgnNvVy5GuZKG270
KW9ltIlOmahhRaGOltmwVzMjQTkyQlpdIOQz9/VIQhVMQvpD5SOSMtBv4d315t/z
RtPqdCp4yFK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3uarR+eQRvYGRkE+YT
wQ+LtcfycUOZUjLoTNSeINUkYqgfz6uvgv8V1cycuTVq9l+kBXMA02eYlmYf14Sh
osPkuVmLPD1IWmuobC0KJJcsZ1/mFWjXSd2ZfcXsOBDF0JuUxxj786RViWGK8Gxw
GjyBAoGBAKMkGK+uNRLBtIaS0jvEanLBIH3mTSBJYmFWgnl9FYqhlXVC5IFjDh+J
u7vE9gPpQOdWPiOJ8CtrM8/AJHcp+sOAbdJXlgaX/lfs0VnqZacSX0/hO/8WTWVG
etQWkyQDYR76pDB8pRUcAUpFGDtKtAgnoQds0oL7ePRlstCvbYLV
-----END RSA PRIVATE KEY-----
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"C:/Users/shai/Documents/GitHub/candidates-assignment/vagrant","disabled":false,"__vagrantfile":true}}}
1 change: 1 addition & 0 deletions vagrant/.vagrant/machines/server1/virtualbox/vagrant_cwd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
C:/Users/shai/Documents/GitHub/candidates-assignment/vagrant
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.5:33720ad2-b642-469b-a5d3-7fcb7b984f7d
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1566334852
1 change: 1 addition & 0 deletions vagrant/.vagrant/machines/server2/virtualbox/box_meta
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"ubuntu/precise64","version":"20170427.0.0","provider":"virtualbox","directory":"boxes/ubuntu-VAGRANTSLASH-precise64/20170427.0.0/virtualbox"}
1 change: 1 addition & 0 deletions vagrant/.vagrant/machines/server2/virtualbox/creator_uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
1 change: 1 addition & 0 deletions vagrant/.vagrant/machines/server2/virtualbox/id
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
33720ad2-b642-469b-a5d3-7fcb7b984f7d
1 change: 1 addition & 0 deletions vagrant/.vagrant/machines/server2/virtualbox/index_uuid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a8f6bec7e2c74378b0b2c938fb988d3a
27 changes: 27 additions & 0 deletions vagrant/.vagrant/machines/server2/virtualbox/private_key
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAsmmGHnher2eR3rRqTVX3Xy4pSiX9y1gW6a6tzGjB8QL7mDXk
ZwYx4PMa+sSca0nRqFL0IMnO0OZ0kLZrLmPQIwG/Fu3XQrGZQNNQ7QVH4Qa3UGsh
ks+Vwa5T4jjWTSenQQBWil5LFk9JWy/0SsNC5Ccv/rzL+dNm52Tjux5GCgXahkv3
GO1Wzw5kyKx1UVyU2mKk64NUrYF5qCz+8EfEc9kYLmfNA3mc8E+gf6HVwf/RRqSh
bamxY9xQ/6o99SNwi87/EC1I3OzKZ9GeUxx61dPoeAbmhTu06rrSjdMUrvBVUySF
2sDP9Da6PbCguGAC6qk3iL5TxpcUBbEzfkq0dQIDAQABAoIBAHDxfIYtjUNdPWrO
q7zpfwAyKNFX26Ku0VJ90mhkqOH6EWv6Me1Gbq0JOTsm3B7PTHpSiVl4aAS233P9
Bz0G0uxWXrIVPwBpjasMG17wyOAbcFDogQh/gT5rLY84i/Gr+KWdoStXJhGpf7bK
VMw/cEkexbNtsXMl8S7rH3+FWrFck64gPwaz1FTcCzrinrC9BtpmrfV55y2nVJ0q
9R7gZnLbh+7mVMyzDkorHTerDy13w3UD5iM6w3VCqAIO5oHuK4tvchdW+UwQ4xp1
aSZZ6ngaHbLqyVacyA1MGElTvKeBUz/OqXfl+Zw/uVwGKtO9x3jk4FX1CHFGfCIL
VmZKOgECgYEA6SCahR1H+9JL0MVKzdoR/Y84yy9Cl5FCMTDOBoSFiHBcq4Xqpqdu
fKc2tQx9lunO5FMjyVokISGd5a3NC3x55/zzFNcLUfIxo/lek2fpMdx4Xu/ffwwu
Y4MjJmiqq+Zz3X1QUWmlcRCupuKHTCrBIPOgluCK5OxW0QqUGBx/7T0CgYEAw+qn
lw/EyAcGgIVrK+/2ba799sjwsQTbpzd/PXgqEA9SM4eGTwQ59CvqLRYW4AN9VbiE
huDeeb+wRMl6nUoIuOALOHjaxzZ9perLFc4Oja0DVoIURjFv2yp0ZG+GKdMP/8ac
9YMUJ30xQnmrzjkOkqVPW62yTror11DDT8vSR5kCgYEA5fGUt+uzzr0Uru2K5RRN
Xm5gNHl/E4ThZyeeb2tTUsqRfVVvp8XKAwXjvhx929bujOM8jyRsMom39o3Bi6zR
iXNESK/7qG5dbEFRec+qgdXWnL25EtVvBBSbHQ1sGnYKntM137d2ydkMi+swTH53
VAs5wNfl5/r9ft8SR94EiHkCgYEAg7K++84u0uPeHBET7RI/DpZexEFpgyWn3m1x
DEo1xFv4PwlwYLePmbLXlX1O3UGbRD9oXx7UjvUrseHamddFq7l38XtUXiwkJJ+D
62F76QMPxlxk8paTAbo1Sbqqbn0iOSczJdr6dl0y+uO9eUBjqnKTuSY3QbLme7Qf
xwlVjqkCgYB11ye6LPasqX8sTztEBPwQUhCqA+TlMfg+f47dDH20/WHSqKtdKP1G
5ejQxRL47xv6vNjmwWY/9fOTMW0cYoEB7NICJFhIJYDmQlhHk/b3RZRyyw9zJttv
mbZjeF0JVtLr+FTmCWsLQ+hdDgxC8MLCD2oIzg/mtrhLYW1//CND8Q==
-----END RSA PRIVATE KEY-----
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"C:/Users/shai/Documents/GitHub/candidates-assignment/vagrant","disabled":false,"__vagrantfile":true}}}
1 change: 1 addition & 0 deletions vagrant/.vagrant/machines/server2/virtualbox/vagrant_cwd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
C:/Users/shai/Documents/GitHub/candidates-assignment/vagrant
9 changes: 9 additions & 0 deletions vagrant/.vagrant/rgloader/loader.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file loads the proper rgloader/loader.rb file that comes packaged
# with Vagrant so that encoded files can properly run with Vagrant.

if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]
require File.expand_path(
"rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
else
raise "Encoded files can't be read outside of the Vagrant installer."
end
4 changes: 4 additions & 0 deletions vagrant/fixScripts/exercise1-fix.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
#!/bin/bash
#add fix to exercise1 here

sudo ip route delete 208.86.224.90/32 dev eth0 src 192.168.100.10


3 changes: 3 additions & 0 deletions vagrant/fixScripts/exercise2-fix.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
#!/bin/bash
#add fix to exercise2 here

sudo sed -i 's/127.0.0.1 www.ascii-art.de/#127.0.0.1 www.ascii-art.de/' /etc/hosts

4 changes: 4 additions & 0 deletions vagrant/fixScripts/exercise3-fix.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
#!/bin/bash
#add fix to exercise3 here

sudo sed -i 's/deny from all/Allow from all/' /etc/apache2/sites-available/default
sudo service apache2 restart

6 changes: 6 additions & 0 deletions vagrant/fixScripts/exercise4-fix_server1.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
#!/bin/bash
#add fix to exercise4-server1 here

sudo chown vagrant /etc/hosts
echo "192.168.100.11 server2" >> /etc/hosts
sudo chown root /etc/hosts


4 changes: 4 additions & 0 deletions vagrant/fixScripts/exercise4-fix_server2.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
#!/bin/bash
#add fix to exercise4-server2 here

sudo chown vagrant /etc/hosts
echo "192.168.100.10 server1" >> /etc/hosts
sudo chown root /etc/hosts
4 changes: 4 additions & 0 deletions vagrant/fixScripts/exercise5-fix_server1.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
#!/bin/bash
#add fix to exercise5-server1 here

ssh-keygen
ssh-copy-id [email protected]
ssh -o "StrictHostKeyChecking=no" vagrant@server2
5 changes: 5 additions & 0 deletions vagrant/fixScripts/exercise5-fix_server2.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
#!/bin/bash
#add fix to exercise5-server2 here

ssh-keygen
ssh-copy-id [email protected]
ssh -o "StrictHostKeyChecking=no" vagrant@server1

27 changes: 26 additions & 1 deletion vagrant/fixScripts/exercise6-fix.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,27 @@
#!/bin/bash
#add fix to exercise6-fix here
#e6-fix here

if [ $# -lt 2 ];
then
echo "Need to insert at least 2 parameter"
echo "exercise6-fix.sh [ file1 [, file2, ..], dest_dir ]"
exit 2

else
ARGS=("$@")
#AR=ARGS[${ARGS[@]}-1]
unset ARGS[${#ARGS[@]}-1]
counter=0
fileSize=0
dest="${@: -1}"
for file in "${ARGS[@]}";
do
scp $file vagrant@server2:/$dest
fileSize="$(stat --printf="%s" "$file")"
counter=$((fileSize + counter))
done

echo $counter
fi