DRPGAC: DETECTING AND PREVENTING MALICIOUS ACTIVITIES IN WIRELESS SENSOR NETWORKS