Skip to content

Instantly share code, notes, and snippets.

@khr0x40sh
Created October 28, 2022 12:42
Show Gist options
  • Select an option

  • Save khr0x40sh/d0475a1bafcdaefe9801ee710d427f7f to your computer and use it in GitHub Desktop.

Select an option

Save khr0x40sh/d0475a1bafcdaefe9801ee710d427f7f to your computer and use it in GitHub Desktop.
HTB HacktheBoo whole lotta candy solve output
crypto_whole_lotta_candy/solve.py
[x] Opening connection to 127.0.0.1 on port 1337
[x] Opening connection to 127.0.0.1 on port 1337: Trying 127.0.0.1
[+] Opening connection to 127.0.0.1 on port 1337: Done
Please interact with the server using json data!
Selected mode is ECB.
Options:
1.Encrypt flag
2.Encrypt plaintext
3.Change mode
4.Exit
ECB.
solve.py:23: BytesWarning: Text is not bytes; assuming ASCII, no guarantees. See https://docs.pwntools.com/#bytes
r.sendline(payload)
> These are the supported modes
{"modes": ["ECB", "CBC", "CFB", "OFB", "CTR"]}
solve.py:30: BytesWarning: Text is not bytes; assuming ASCII, no guarantees. See https://docs.pwntools.com/#bytes
r.sendline(payload)
Expecting modes:
Expecting modes:
Please interact with the server using json data!
Selected mode is CTR.
Options:
1.Encrypt flag
2.Encrypt plaintext
3.Change mode
4.Exit
CTR.
solve.py:38: BytesWarning: Text is not bytes; assuming ASCII, no guarantees. See https://docs.pwntools.com/#bytes
r.sendline(payload)
solve.py:57: BytesWarning: Text is not bytes; assuming ASCII, no guarantees. See https://docs.pwntools.com/#bytes
r.sendline(payload)
>
{"response": "encrypted", "ciphertext": "5fcb00fb75e24c7232dcbe25561b55a15c096a5f50c1552a7efb96921d3991b230119ce8be0f558c7dcded3f980157f24ac2e43337f2c20616855c2f3b9a7b95"}
Please interact with the server using json data!
Selected mode is CTR.
Options:
1.Encrypt flag
2.Encrypt plaintext
3.Change mode
4.Exit
solve.py:63: BytesWarning: Text is not bytes; assuming ASCII, no guarantees. See https://docs.pwntools.com/#bytes
r.sendline(payload)
> Enter plaintext:
{"response": "encrypted", "ciphertext": "63f72bf31ee570051da3ba2c445e37b61d5b620d6ed44e3d6bd094be5161dbfa6604b7ba854826db48fcdb7bd01a4b8712aacf3b05c89779298f4879209355b7f67bb1daecfcda63cfd8645bd66bfc59"}
b'HTB{KnOWN_pla1N737x7_a77aCk_l19h75_7H3_wAY_7hroU9H_mANy_Mod3z}\x02\x02\xdd\xd8\xd8R\xb9w\xe51\x9c$\xae\x1b\xf3\x04\xdd\x90'
[*] Closed connection to 127.0.0.1 port 1337
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment