cycle 2 program4,5
cycle 2 program4,5
Theory: The Address Resolution Protocol (ARP) is a communication protocol that matches
IP addresses to MAC addresses. It's part of the Internet protocol suite.
Program:
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.Scanner;
try
System.out.println("address = "+address);
NetworkInterface ni = NetworkInterface.getByInetAddress(address);
if (ni!=null)
if (mac != null)
¾ B.TECH – CS&SE AND IT&CA CNS LAB
@ksaucew
else
else
catch(UnknownHostException | SocketException e)
}
¾ B.TECH – CS&SE AND IT&CA CNS LAB
@ksaucew
Output:
¾ B.TECH – CS&SE AND IT&CA CNS LAB
@ksaucew
Theory: Snort is the foremost Open-Source Intrusion Prevention System (IPS) in the world.
Snort IPS uses a series of rules that help define malicious network activity and uses those rules
to find packets that match against them and generates alerts for users. Snort can be deployed
inline to stop these packets, as well. Snort has three primary uses: As a packet sniffer like
tcpdump, as a packet logger — which is useful for network traffic debugging, or it can be used
as a full-blown network intrusion prevention system. Snort can be downloaded and configured
for personal and business use alike.
Procedure:
Result: The outputs are noted by executing snort commands in Windows OS.
Reference: https://www.snort.org/
¾ B.TECH – CS&SE AND IT&CA CNS LAB
@ksaucew
Outputs: