In the previous article we researched MySQL Client / Server Protocol using WireShark. Now lets start to write our codes in python to simulate MySQL native client. Ready codes are here: Github repo
First of all we have to create MYSQL_PACKAGE class. MYSQL_PACKAGE class is the parent of all other package classes (HANDSHAKE_PACKAGE, LOGIN_PACKAGE, OK_PACKAGE and etc.)
class MYSQL_PACKAGE: “””Data between client and server is exchanged in packages of max 16MByte size.””” def __init__(self, resp= b”): self.resp = resp self.start =0 …
[Read more]