Skip to content

Commit 0f441e7

Browse files
committed
solved the problem with solution.py path being absolute
1 parent 57ee2db commit 0f441e7

4 files changed

Lines changed: 3 additions & 5 deletions

File tree

app/ctfsolver/src/manager_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def get_parent(self):
2626

2727
self.file_called_frame = inspect.stack()
2828
self.file_called_path = Path(self.file_called_frame[-1].filename)
29-
self.parent = Path(self.file_called_path).parent
29+
self.parent = Path(self.file_called_path).parent.resolve()
3030

3131
if self.parent.name in self.folders_name_list:
3232
self.parent = self.parent.parent

build/lib/ctfsolver/run/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def main():
1010
Gets the path of the solution flle and runs it
1111
"""
1212
s = CTFSolver()
13-
13+
1414
solution_path = Path(s.folder_payloads, "solution.py")
1515

1616
if not solution_path.exists():

build/lib/ctfsolver/src/manager_connections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def recv_send(self, text, lines=None, text_until=None, display=False, save=False
134134
result.extend(out_lines)
135135

136136
if text_until:
137-
out_text_until = self.recv_until(text_until)
137+
out_text_until = self.recv_until(text=text_until)
138138

139139
if save:
140140
result.append(out_text_until)

build/lib/ctfsolver/src/manager_file.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ def get_parent(self):
2828
self.file_called_path = Path(self.file_called_frame[-1].filename)
2929
self.parent = Path(self.file_called_path).parent
3030

31-
self.setup_named_folder_list()
32-
3331
if self.parent.name in self.folders_name_list:
3432
self.parent = self.parent.parent
3533

0 commit comments

Comments
 (0)