-
Notifications
You must be signed in to change notification settings - Fork 2
/
generate_ctf_json.py
50 lines (49 loc) · 1.39 KB
/
generate_ctf_json.py
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
config = '''{
"title": "TestCTF",
"flagValidityInRounds": 10,
"checkedRoundsPerRound": 3,
"roundLengthInSeconds": 60,
"dnsSuffix": "eno.host",
"teamSubnetBytesLength": 15,
"flagSigningKey": "testkey",
"teams": ['''
for i in range(128):
config += '''{
"id": '''+str(i+1)+''',
"name": "teamname'''+str(i+1)+'''",
"address": "135.181.237.147",
"teamSubnet": "fd00:1337:'''+str(i+1)+'''::"
},'''
config = config[:-1]
config += '''],
"services": [{
"id": 1,
"name": "Pomelo",
"flagsPerRoundMultiplier": 1,
"noisesPerRoundMultiplier": 1,
"havocsPerRoundMultiplier": 1,
"checkers": ["http://[::1]:8000"]
},{
"id": 3,
"name": "testify",
"flagsPerRoundMultiplier": 1,
"noisesPerRoundMultiplier": 1,
"havocsPerRoundMultiplier": 1,
"checkers": ["http://[::1]:3002"]
},{
"id": 4,
"name": "postit",
"flagsPerRoundMultiplier": 1,
"noisesPerRoundMultiplier": 1,
"havocsPerRoundMultiplier": 1,
"checkers": ["http://[::1]:9338"]
},{
"id": 5,
"name": "orcanojr",
"flagsPerRoundMultiplier": 1,
"noisesPerRoundMultiplier": 1,
"havocsPerRoundMultiplier": 1,
"checkers": ["http://[::1]:8010"]
}]
}'''
print(config)