[length : 4 bytes][type : 1byte][message : length - 1][null]
와 같은 포맷을 같는 프로토콜을 생성하는 파이썬 코드를 만들어서 dissector를 테스트 하였다.
AMIN_Server.py
AMIN_Client.py
와 같은 포맷을 같는 프로토콜을 생성하는 파이썬 코드를 만들어서 dissector를 테스트 하였다.
AMIN_Server.py
from socket import *
def AMIN_Server():
svrsock = socket(AF_INET, SOCK_DGRAM)
print "haha"
svrsock.bind(('', 999))
while True:
print "Waiting ..."
s, addr = svrsock.recvfrom(1024)
print s
print addr
if __name__ == "__main__":
AMIN_Server()
def AMIN_Server():
svrsock = socket(AF_INET, SOCK_DGRAM)
print "haha"
svrsock.bind(('', 999))
while True:
print "Waiting ..."
s, addr = svrsock.recvfrom(1024)
print s
print addr
if __name__ == "__main__":
AMIN_Server()
AMIN_Client.py
import struct
from socket import *
def AMIN_Client():
clnsock = socket(AF_INET, SOCK_DGRAM)
for i in range(0,100):
t_str = "Hello World"
t_pattern = "IB%ds" %(len(t_str) + 1)
t_packet = struct.pack(t_pattern, len(t_str), 1, t_str)
clnsock.sendto(t_packet, ("10.29.4.143", 999))
if __name__ == "__main__":
AMIN_Client()
from socket import *
def AMIN_Client():
clnsock = socket(AF_INET, SOCK_DGRAM)
for i in range(0,100):
t_str = "Hello World"
t_pattern = "IB%ds" %(len(t_str) + 1)
t_packet = struct.pack(t_pattern, len(t_str), 1, t_str)
clnsock.sendto(t_packet, ("10.29.4.143", 999))
if __name__ == "__main__":
AMIN_Client()