File tree Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,13 @@ webapp \
39
39
- curl
40
40
- set
41
41
- grep
42
- - python
42
+ - python3
43
43
- df
44
44
- tr
45
45
- free
46
46
- sleep
47
47
- cat
48
48
- systemctl
49
- - python2
50
49
51
50
## SCION Binaries Used/Checked
52
51
- $sbin/scmp
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ as=$(echo ${iaFile} | cut -d"-" -f2)
10
10
topologyFile=$SCION_GEN /ISD$isd /AS$as /endhost/topology.json
11
11
12
12
# get remote addresses from interfaces
13
- ip_dsts=$( cat $topologyFile | python2 -c " import sys, json
13
+ ip_dsts=$( cat $topologyFile | python3 -c " import sys, json
14
14
brs = json.load(sys.stdin)['BorderRouters']
15
15
for b in brs:
16
16
for i in brs[b]['Interfaces']:
17
- print brs[b]['Interfaces'][i]['RemoteOverlay']['Addr']" )
17
+ print( brs[b]['Interfaces'][i]['RemoteOverlay']['Addr']) " )
18
18
19
19
# test icmp ping on each interface
20
20
for ip_dst in $ip_dsts
Original file line number Diff line number Diff line change @@ -15,12 +15,12 @@ as=$(echo ${iaFile} | cut -d"-" -f2)
15
15
topologyFile=$SCION_GEN /ISD$isd /AS$as /endhost/topology.json
16
16
17
17
# get remote addresses from interfaces, return paired list
18
- dsts=($( cat $topologyFile | python2 -c " import sys, json
18
+ dsts=($( cat $topologyFile | python3 -c " import sys, json
19
19
brs = json.load(sys.stdin)['BorderRouters']
20
20
for b in brs:
21
21
for i in brs[b]['Interfaces']:
22
- print brs[b]['Interfaces'][i]['ISD_AS']
23
- print brs[b]['Interfaces'][i]['RemoteOverlay']['Addr']" ) )
22
+ print( brs[b]['Interfaces'][i]['ISD_AS'])
23
+ print( brs[b]['Interfaces'][i]['RemoteOverlay']['Addr']) " ) )
24
24
25
25
# test scmp echo on each interface
26
26
for (( i= 0 ; i< ${# dsts[@]} ; i+= 2 ))
Original file line number Diff line number Diff line change 28
28
ipAddress=$( echo " $targetLines " | grep -oE " \b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | head -n1)
29
29
topologyFile=$SCION_GEN /ISD* /AS* /endhost/topology.json
30
30
# ip address specified in the topology file. If "bind" parameter present, use that one; "public" if not
31
- ipTopology=$( cat $topologyFile | python2 -c " import sys, json
31
+ ipTopology=$( cat $topologyFile | python3 -c " import sys, json
32
32
brs = json.load(sys.stdin)['BorderRouters']
33
33
interfaces=next(iter(brs.values()))['Interfaces']
34
34
inter=next(iter(interfaces.values()))
35
- print inter['BindOverlay'] if 'BindOverlay' in inter.keys() else inter['PublicOverlay']['Addr']" )
35
+ print( inter['BindOverlay'] if 'BindOverlay' in inter.keys() else inter['PublicOverlay']['Addr']) " )
36
36
37
37
# 2.check if the ip address from the tun0 interface is consistent with the one from the topology.
38
38
if [[ $ipAddress != $ipTopology ]]; then
You can’t perform that action at this time.
0 commit comments