Skip to content

Commit

Permalink
🐛 fix starknet creds
Browse files Browse the repository at this point in the history
  • Loading branch information
cairoeth committed Mar 16, 2024
1 parent 9c09416 commit 8ed95cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 3 additions & 1 deletion paradigmctf.py/ctf_launchers/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def launch_instance(self) -> int:
if self.type == "starknet":
web3 = get_privileged_web3(user_data, "main")

credentials = self.get_credentials(web3.provider.endpoint_uri)
credentials = [["0x64b48806902a367c8598f4f95c305e8c1a1acba5f082d294a43793113115691", "0x71d7bb07b9a64f6f78ac4c816aff4da9"], ["0x78662e7352d062084b0010068b99288486c2d8b914f6e2a55ce945f8792c8b1", "0xe1406455b7d66b1690803be066cbe5e"]]

# credentials = self.get_credentials(web3.provider.endpoint_uri)

challenge_addr = self.deploy_cairo(user_data, credentials)
priv_key = credentials[1][1]
Expand Down
5 changes: 1 addition & 4 deletions paradigmctf.py/ctf_launchers/team_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ def __check_ticket(self, ticket: str) -> Ticket:
std_base64chars = "0123456789"
custom = "0629851743"

key=str.encode(os.getenv("SECRET", "secret"))
decrypted = decrypt(ticket, key).decode()

x = decrypted.translate(str(ticket).maketrans(custom, std_base64chars))
x = str(ticket).translate(str(ticket).maketrans(custom, std_base64chars))
decoded = base64.b64decode(x).decode().split(',')
chall = decoded[0]
id = decoded[1]
Expand Down

0 comments on commit 8ed95cd

Please sign in to comment.