示例#1
0
 public void handler(object source, ToolSpecificEventargs arg)
 {
     this.WriteToNTEventLog(
         String.Format("Suspicious popup posted by Process  {0}\n{1}\nDialog Text:{2}\nWindow Title:{3}\nMore Info: {4}",
                   arg.processID,
                   arg.CommandLine,
                   arg.DialogText,
                   arg.WindowTitle,
                   arg.MoreData));
 }
示例#2
0
 public void handler(object source, ToolSpecificEventargs arg)
 {
     this.WriteToNTEventLog(
         String.Format("Suspicious popup posted by Process  {0}\n{1}\nDialog Text:{2}\nWindow Title:{3}\nMore Info: {4}",
                       arg.processID,
                       arg.CommandLine,
                       arg.DialogText,
                       arg.WindowTitle,
                       arg.MoreData));
 }
示例#3
0
    public void FireToolSpecificEvent(int value)
    {
        ToolSpecificEventargs arg = new ToolSpecificEventargs();

        if (ActionEvent != null)
        {
            arg.processID = value;
            ActionEvent(this, arg);
        }
    }
示例#4
0
    public void FireToolSpecificEvent()
    {
        ToolSpecificEventargs arg = new ToolSpecificEventargs();

        if (ActionEvent != null)
        {
            arg.processID = count++;

            arg.processID   = -1;
            arg.CommandLine = String.Empty;
            arg.WindowTitle = String.Empty;
            arg.DialogText  = String.Empty;
            ActionEvent(this, arg);
        }
    }
示例#5
0
    //  [Conditional("Debug")]
    private void Action(ToolSpecificEventargs arg)
    {
        // Create a new NameValueCollection instance to hold some custom parameters to be posted to the URL.
        NameValueCollection myNameValueCollection = new NameValueCollection();

        string BuildMachine = System.Environment.GetEnvironmentVariable("COMPUTERNAME");
        string UserName     = System.Security.Principal.WindowsIdentity.GetCurrent().Name;

#if DEBUG
        // Maintain VBLMonitor and VBLManager
        Console.WriteLine("I see you.");
        //        if (DEBUG ) {
        Console.WriteLine("\nUploading to {0} ...", uriString);
        Console.WriteLine("\nComputer {0}", BuildMachine);
        Console.WriteLine("\nApplication {0}", arg.CommandLine);
        Console.WriteLine("\nWindow Title {0}", arg.WindowTitle);
        Console.WriteLine("\nDialog Text {0}", arg.DialogText);
        Console.WriteLine("\nMore Info: {0}", arg.MoreData);

        //         }

        System.Diagnostics.Debug.Assert(uriString != null);
#else
        byte[] responseArray = null;
        // Add necessary parameter/value pairs to the name/value container.
        myNameValueCollection.Add("Computer", BuildMachine);
        myNameValueCollection.Add("Application", arg.CommandLine);  // command line
        myNameValueCollection.Add("Window Title", arg.WindowTitle);
        myNameValueCollection.Add("Dialog Text", arg.DialogText);
        myNameValueCollection.Add("More Info", String.Format("{0} {1}", "Drive", arg.MoreData));

        try {
            // Upload the NameValueCollection.
            responseArray = myWebClient.UploadValues(uriString, "POST", myNameValueCollection);
            // Decode and display the response.
            if (DEBUG)
            {
                Console.WriteLine("\nResponse received was:\n{0}", Encoding.ASCII.GetString(responseArray));
            }
        } catch (Exception e) {
            Console.WriteLine(e.ToString());
        }
#endif
        return;
    }
示例#6
0
    public void FireToolSpecificEvent(int ProcessID, string CommandLine, string WindowTitle, string DialogText)
    {
        // More Info not Passed !
        ToolSpecificEventargs arg = new ToolSpecificEventargs();

        if (ActionEvent != null)
        {
            arg.processID   = ProcessID;
            arg.CommandLine = CommandLine;
            arg.WindowTitle = WindowTitle;
            arg.DialogText  = DialogText;

            DosDriveInventory DosDI = new DosDriveInventory();
            DosDI.Execute();
            arg.MoreData = DosDI.ReportMappedDosDrives(CommandLine);
            ActionEvent(this, arg);
        }
    }
    public void FireToolSpecificEvent(int ProcessID, string CommandLine, string WindowTitle, string DialogText)
    {
        // More Info not Passed !
        ToolSpecificEventargs arg = new ToolSpecificEventargs();
        if (ActionEvent != null)
        {
            arg.processID = ProcessID;
            arg.CommandLine = CommandLine;
            arg.WindowTitle = WindowTitle;
            arg.DialogText = DialogText;

            DosDriveInventory DosDI = new DosDriveInventory();
            DosDI.Execute();
            arg.MoreData = DosDI.ReportMappedDosDrives(CommandLine);
            ActionEvent(this, arg);
        }
    }
 public void FireToolSpecificEvent(int value)
 {
     ToolSpecificEventargs arg = new ToolSpecificEventargs();
     if (ActionEvent != null)
     {
         arg.processID = value;
         ActionEvent(this, arg);
     }
 }
    public void FireToolSpecificEvent()
    {
        ToolSpecificEventargs arg = new ToolSpecificEventargs();
        if (ActionEvent != null)
        {
            arg.processID = count++;

            arg.processID = -1;
            arg.CommandLine = String.Empty;
            arg.WindowTitle = String.Empty;
            arg.DialogText = String.Empty;
            ActionEvent(this, arg);
        }
    }
示例#10
0
 public void handler(object source, ToolSpecificEventargs arg)
 {
     Console.WriteLine(String.Format("Event received by an X object\n{0}\n{1}\n{2}\n{3}\n", arg.processID, arg.CommandLine, arg.DialogText, arg.WindowTitle));
 }
示例#11
0
 public void handler(object source, ToolSpecificEventargs arg)
 {
     Action(arg);
 }
示例#12
0
 public void handler(object source, ToolSpecificEventargs arg)
 {
     Console.WriteLine(String.Format("Event received by an X object\n{0}\n{1}\n{2}\n{3}\n", arg.processID, arg.CommandLine, arg.DialogText, arg.WindowTitle));
 }
示例#13
0
    //  [Conditional("Debug")]
    private void Action(ToolSpecificEventargs arg)
    {
        // Create a new NameValueCollection instance to hold some custom parameters to be posted to the URL.
        NameValueCollection myNameValueCollection = new NameValueCollection();

        string BuildMachine = System.Environment.GetEnvironmentVariable("COMPUTERNAME");
        string UserName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;

        #if DEBUG
        // Maintain VBLMonitor and VBLManager
        Console.WriteLine("I see you.");
        //        if (DEBUG ) {
        Console.WriteLine("\nUploading to {0} ...", uriString);
        Console.WriteLine("\nComputer {0}", BuildMachine);
        Console.WriteLine("\nApplication {0}", arg.CommandLine);
        Console.WriteLine("\nWindow Title {0}", arg.WindowTitle);
        Console.WriteLine("\nDialog Text {0}", arg.DialogText);
        Console.WriteLine("\nMore Info: {0}", arg.MoreData);

        //         }

        System.Diagnostics.Debug.Assert(uriString != null);
        #else
        byte[] responseArray = null;
        // Add necessary parameter/value pairs to the name/value container.
        myNameValueCollection.Add("Computer", BuildMachine );
        myNameValueCollection.Add("Application", arg.CommandLine ); // command line
        myNameValueCollection.Add("Window Title", arg.WindowTitle);
        myNameValueCollection.Add("Dialog Text", arg.DialogText);
        myNameValueCollection.Add("More Info",  String.Format("{0} {1}",  "Drive", arg.MoreData) );

        try {
        // Upload the NameValueCollection.
        responseArray =  myWebClient.UploadValues(uriString, "POST", myNameValueCollection);
        // Decode and display the response.
        if (DEBUG )
            Console.WriteLine("\nResponse received was:\n{0}", Encoding.ASCII.GetString(responseArray));
        } catch (Exception e) {
        Console.WriteLine(e.ToString());
        }
        #endif
        return;
    }
示例#14
0
 public void handler(object source, ToolSpecificEventargs arg)
 {
     Action(arg);
 }