Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

dump_data -> get_data_dump #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions durator/auth/login_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from durator.common.networking.connection_automaton import ConnectionAutomaton
from durator.common.log import LOG
from durator.config import DEBUG
from pyshgck.format import dump_data
from pyshgck.format import get_data_dump


class LoginConnection(ConnectionAutomaton):
Expand Down Expand Up @@ -54,7 +54,7 @@ def _recv_packet(self):
try:
data = self.socket.recv(1024)
if data and DEBUG:
print(dump_data(data), end = "")
print(get_data_dump(data), end = "")
return data or None
except ConnectionError:
LOG.info("Lost connection.")
Expand Down
6 changes: 3 additions & 3 deletions durator/world/world_packet.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from durator.common.log import LOG
from durator.config import DEBUG
from durator.world.opcodes import OpCode
from pyshgck.format import dump_data
from pyshgck.format import get_data_dump


class WorldPacket(object):
Expand All @@ -22,7 +22,7 @@ def to_socket(self, session_cipher = None):
""" Return ready-to-send bytes, possibly encrypted, from the packet. """
if DEBUG:
print(">>>", self.opcode)
print(dump_data(self.data), end = "")
print(get_data_dump(self.data), end = "")

opcode_bytes = self.OUTGOING_OPCODE_BIN.pack(self.opcode.value)
packet = opcode_bytes + self.data
Expand Down Expand Up @@ -64,7 +64,7 @@ def get_next_packet(self):
if DEBUG:
if self.opcode is not None:
print("<<<", self.opcode)
print(dump_data(self.content), end = "")
print(get_data_dump(self.content), end = "")

packet = WorldPacket(self.opcode, self.content)
self.clean()
Expand Down