이한솔

주간보고서

No preview for this file type
#from hopCountFiltering import HCFStateManager
from HCF import *
from struct import *
import sys
import socket
def PacketMonitoring():
def DetectingPacket():
IP = []
for i in range(1, 10):
ip = '10.0.'+str(i+1)+'.100'
IP.append(ip)
packetManager = HCF(IP)
packetHCF = HCF(IP)
# set up the socket
try:
sock = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.ntohs(0x0003))
......@@ -44,10 +42,10 @@ def PacketMonitoring():
print("TTL: ", ttl)
try :
packetTest = packetManager.IsSpoofed({'ttl':ttl, 'src':source_addr})
packetTest = packetManagerHCF.IsSpoofed({'ttl':ttl, 'src':source_addr})
except Exception as e :
print(e)
continue
if __name__ == "__main__":
PacketMonitoring()
DetectingPacket()
......