vortex.labs.overthewire.org의 5842포트에 접속해서 4개의 unsigned integer를 받은 다음 그 값을 더해서 다시 보내면 계정과 비밀번호를 준다는 아주 쉬운 문제다.
python의 소켓을 이용하면 된다.
from socket import *
import struct
host = "vortex.labs.overthewire.org"
port = 5842
s = socket(AF_INET, SOCK_STREAM)
s.connect((host, port))
solve = int()
for i in range(0, 4):
res = s.recv(4)
print struct.unpack('<I', res)[0]
solve += struct.unpack('<I', res)[0]
print "solve : " + str(solve)
s.send(struct.pack('<I', solve))
print s.recv(100)
s.close()
문제 클리어
'Wargame > OverTheWire:vortex' 카테고리의 다른 글
| Vortex Level 1 → Level 2 (0) | 2018.03.27 |
|---|