An algorithm to detect Selective Gray Hole Attack(SGHA) in a multi-hop network implemented using OMNET++/INET. SGHA is a type of gray hole attack targeted at certain data flows say data flows originating from a Source node or going to a particular destination node or passing through some targetted node. Read more about it in the paper https://ieeexplore.ieee.org/document/8299958.