MAD pages Volume 1 | Issue 1 | August 2013 | Page 24

cyber soldiers

Vaibhav Singh Director , ztreLa Knowledge Solutions pvt ltd . www . ztrela . com
mespace HelperClasses
public class UnhookSystemEventUserPreferenceChangedEvent {
// we ' ll use a static List to cache a reference to the internal list of erPreferenceChangedEvent listeners so that // we do not need to search for it every time . static System . Collections . IList _ UserPreferenceChangedList = null ;
static public void UnhookObject ( object pObjectToUnhook ) {
// First check for null and get a ref to the erPreferenceChangedEvent ' s internal list of listeners if needed . if (_ UserPreferenceChangedList == null ) tUserPreferenceChangedList (); // then , scan that list for any delegates that point to pObjectToUnhook . SearchListAndRemoveEventHandlers ( pObjectToUnhook );
}
static private void GetUserPreferenceChangedList ()
{ Type oSystemEventsType = typeof ( SystemEvents ); // Using reflection , get the FieldInfo object for the internal collection of ndlers // we will use this collection to find the handler we want to unhook and move it . // as you can guess by the naming convention it is a private member . System . Reflection . FieldInfo oFieldInfo = ystemEventsType . GetField ("_ handlers ", System . Reflection . BindingFlags . Static | System . Reflection . BindingFlags . GetField | System . Reflection . BindingFlags . FlattenHierarchy | System . Reflection . BindingFlags . NonPublic );
// now , get a reference to the value of this field so that you can anipulate it . // pass null to GetValue () because we are working with a static member . object oFieldInfoValue = oFieldInfo . GetValue ( null );
// the returned object is of type Dictionary < object , t < SystemEventInvokeInfo >>
// each of the Lists <> in the Dictionary <> is used to maintain a different ent implementation .
// It may be more efficient to figure out how the UserPreferenceChanged ent is keyed here but a quick-and-dirty
// method is to just scan them all the first time and then cache the t <> object once it ' s found .

One of the curious privilege in the world is being entirely different from the rest . That ' s what being a hacker is ! Hacking is an art of exploring various security breaches which basically means there is a solution to every problem .

However , often from the phrase ' ethical hacker ' we always conceive them being the bad guys but , as a matter of fact , they are actually the good guys professionally trained and hired in companies in order to seek vulnerabilities that a malicious hacker could exploit . To test a security system , ethical hackers use the same methods and tricks as the malicious hackers do but for determining flaws and loopholes instead of taking advantages which is similar to weapons given to armies and terrorists but it depends upon their mentality how they make use of them . But apart form this , the actual fun of being a hacker is building awareness among people , dealing with new technologies , playing with digitalization on fingertips and preventing frauds from coming alive . With the rapid development of information technology , the world is becoming more and more reliant on computers . Being a hacker has become a deep profession these days as security concerns are coming up wildly enhancing hiring ethical hackers . Since , security is important as it goes with the saying prevention is better than cure .
Just check out with the world how unsafe people are , how because of lack of good security system , information is misused , hackers are not just the bad part of someone but a helping hand to our security , so don ' t hate hackers or the technology that gave birth to them instead feel free and socialized with the world . If there ' s one who can leak your information for the wrong then there is other one as well who can protect it .
Be a part of hacking ! As Technology is getting advanced every now and then . Be a part of socialism and play your part of helping people in many fields and contribute to your country for we want a day where we can proudly say " Yes We Are Hackers ”.
System . Collections . IDictionary dictFieldInfoValue = oFieldInfoValue as stem . Collections . IDictionary ; foreach ( object oEvent in dictFieldInfoValue ) {
System . Collections . DictionaryEntry deEvent = ystem . Collections . DictionaryEntry ) oEvent ;
System . Collections . IList listEventListeners = deEvent . Value as stem . Collections . IList ;
// unfortunately , SystemEventInvokeInfo is a private class so we can ' t clare a reference of that type . // we will use object and then use reflection to get what we need ... List < Delegate > listDelegatesToRemove = new List < Delegate >(); e type ...

24

// we need to take the first item in the list , get it ' s delegate and check if ( listEventListeners . Count > 0 && listEventListeners [ 0 ] != null )