1
0
This commit is contained in:
Andrew Woodlee 2022-12-05 22:01:42 -06:00
parent d61e25e18f
commit 358fb65d22

View File

@ -308,6 +308,7 @@ void myHandler(
{ {
scansInFile.null++; scansInFile.null++;
scansInFile.totalPacketsPerAttack++; scansInFile.totalPacketsPerAttack++;
// printf("\n\nDST port: %d\n", dstPort);
currentTCPPacket.port = dstPort; currentTCPPacket.port = dstPort;
currentTCPPacket.packetNumInGroup = 1; currentTCPPacket.packetNumInGroup = 1;
addToTable(currentTCPPacket.port, &currentTCPPacket); addToTable(currentTCPPacket.port, &currentTCPPacket);
@ -323,13 +324,13 @@ void myHandler(
{ {
search = seachTable(i); search = seachTable(i);
if (currentTCPPacket.dstPort == 1029 && search != NULL) if (dstPort == 1029 && search != NULL)
{ {
printf("\nSYN ACK flag"); // printf("\nSYN ACK flag");
printf("\n\nDST port: %d\n", currentTCPPacket.dstPort); // printf("\n\nDST port: %d\n", currentTCPPacket.dstPort);
printf("\nSRC port: %d\n", currentTCPPacket.srcPort); // printf("\nSRC port: %d\n", currentTCPPacket.srcPort);
} }
if (search != NULL && i == currentTCPPacket.dstPort) if (search != NULL && i == dstPort)
{ {
prevPacket = search->data; prevPacket = search->data;
@ -381,7 +382,7 @@ void myHandler(
{ {
search = seachTable(i); search = seachTable(i);
if (search != NULL && i == currentTCPPacket.dstPort) if (search != NULL && i == dstPort)
{ {
prevPacket = search->data; prevPacket = search->data;
@ -447,11 +448,11 @@ void myHandler(
if (currentTCPPacket.dstPort == 1029 && search != NULL) if (currentTCPPacket.dstPort == 1029 && search != NULL)
{ {
printf("\nACK flag"); // printf("\nACK flag");
printf("\n\nDST port: %d\n", currentTCPPacket.dstPort); // printf("\n\nDST port: %d\n", currentTCPPacket.dstPort);
printf("\nSRC port: %d\n", currentTCPPacket.srcPort); // printf("\nSRC port: %d\n", currentTCPPacket.srcPort);
} }
if (search != NULL && i == currentTCPPacket.dstPort) if (search != NULL && i == dstPort)
{ {
printf("\nFound port: %d\n", currentTCPPacket.srcPort); printf("\nFound port: %d\n", currentTCPPacket.srcPort);