public IntPtr[] PatternScan(string processName, IntPtr baseAddress, string pattern)
 {
     using (var extensionWrapper = new ExtensionWrapper(processName))
     {
         return(extensionWrapper.PatternScan(baseAddress, pattern));
     }
 }
Exemplo n.º 2
0
 public bool UnlinkDllFromPeb(int processId, byte[] dllBytes)
 {
     using (var extensionWrapper = new ExtensionWrapper(processId, dllBytes, RandomiseDllName))
     {
         return(extensionWrapper.UnlinkDllFromPeb());
     }
 }
Exemplo n.º 3
0
 public bool EraseDllHeaders(string processName, byte[] dllBytes)
 {
     using (var extensionWrapper = new ExtensionWrapper(processName, dllBytes, RandomiseDllName))
     {
         return(extensionWrapper.EraseDllHeaders());
     }
 }
Exemplo n.º 4
0
 public bool EraseDllHeaders(int processId, string dllPath)
 {
     using (var extensionWrapper = new ExtensionWrapper(processId, dllPath, RandomiseDllName))
     {
         return(extensionWrapper.EraseDllHeaders());
     }
 }
Exemplo n.º 5
0
 public bool EjectDll(string processName, string dllPath)
 {
     using (var extensionWrapper = new ExtensionWrapper(processName, dllPath, RandomiseDllName))
     {
         return(extensionWrapper.EjectDll());
     }
 }
Exemplo n.º 6
0
 public bool EjectDll(int processId, byte[] dllBytes)
 {
     using (var extensionWrapper = new ExtensionWrapper(processId, dllBytes, RandomiseDllName))
     {
         return(extensionWrapper.EjectDll());
     }
 }
Exemplo n.º 7
0
 public bool UnlinkDllFromPeb(string processName, string dllPath)
 {
     using (var extensionWrapper = new ExtensionWrapper(processName, dllPath, RandomiseDllName))
     {
         return(extensionWrapper.UnlinkDllFromPeb());
     }
 }
 public IntPtr[] PatternScan(int processId, IntPtr baseAddress, byte[] patternBytes)
 {
     using (var extensionWrapper = new ExtensionWrapper(processId))
     {
         return(extensionWrapper.PatternScan(baseAddress, patternBytes));
     }
 }
Exemplo n.º 9
0
        public bool EraseHeaders(int processId, string dllPath)
        {
            var extensionWrapper = new ExtensionWrapper(processId, dllPath);

            return(extensionWrapper.EraseHeaders());
        }
Exemplo n.º 10
0
        public bool EjectDll(int processId, byte[] dllBytes)
        {
            var extensionWrapper = new ExtensionWrapper(processId, dllBytes);

            return(extensionWrapper.EjectDll());
        }
Exemplo n.º 11
0
        public bool EjectDll(string processName, byte[] dllBytes)
        {
            var extensionWrapper = new ExtensionWrapper(processName, dllBytes);

            return(extensionWrapper.EjectDll());
        }
Exemplo n.º 12
0
        public bool EjectDll(int processId, string dllPath)
        {
            var extensionWrapper = new ExtensionWrapper(processId, dllPath);

            return(extensionWrapper.EjectDll());
        }
Exemplo n.º 13
0
        public bool EjectDll(string processName, string dllPath)
        {
            var extensionWrapper = new ExtensionWrapper(processName, dllPath);

            return(extensionWrapper.EjectDll());
        }
Exemplo n.º 14
0
        public bool UnlinkFromPeb(int processId, string dllPath)
        {
            var extensionWrapper = new ExtensionWrapper(processId, dllPath);

            return(extensionWrapper.UnlinkFromPeb());
        }
Exemplo n.º 15
0
        public bool RandomiseHeaders(string processName, string dllPath)
        {
            var extensionWrapper = new ExtensionWrapper(processName, dllPath);

            return(extensionWrapper.RandomiseHeaders());
        }
Exemplo n.º 16
0
        public bool EraseHeaders(string processName, byte[] dllBytes)
        {
            var extensionWrapper = new ExtensionWrapper(processName, dllBytes);

            return(extensionWrapper.EraseHeaders());
        }
Exemplo n.º 17
0
        public bool EraseHeaders(int processId, byte[] dllBytes)
        {
            var extensionWrapper = new ExtensionWrapper(processId, dllBytes);

            return(extensionWrapper.EraseHeaders());
        }
Exemplo n.º 18
0
        public bool UnlinkFromPeb(string processName, byte[] dllBytes)
        {
            var extensionWrapper = new ExtensionWrapper(processName, dllBytes);

            return(extensionWrapper.UnlinkFromPeb());
        }
Exemplo n.º 19
0
        public bool UnlinkFromPeb(int processId, byte[] dllBytes)
        {
            var extensionWrapper = new ExtensionWrapper(processId, dllBytes);

            return(extensionWrapper.UnlinkFromPeb());
        }
Exemplo n.º 20
0
        protected override bool UpdateTarget(ReceiveContext context)
        {
            bool            naviChanged = false;
            InstructorModel role        = this.Target as InstructorModel;

            if (role == null)
            {
                this.Target = role = new InstructorModel(((Guid)this.TargetId));
            }

            using (Synchronizer.Lock(role.SyncRoot)) {
                role.AcceptingStudentSubmissions = this.AcceptingStudentSubmissions;
                // Deserialize the extension
                ExtensionWrapper extension = this.Extension as ExtensionWrapper;
                if (extension != null)
                {
                    try {
                        if (extension.ContainsKey(new Guid("{65A946F4-D1C5-426b-96DB-7AF4863CE296}")) || extension.ContainsKey(new Guid("{4795707C-9F85-CA1F-FEBA-5E851CF9E1DE}")))
                        {
                            bool acceptingQuickPollSubmissions = (bool)extension.GetExtension(new Guid("{65A946F4-D1C5-426b-96DB-7AF4863CE296}")).ExtensionObject;
                            this.AcceptingQuickPollSubmissions = acceptingQuickPollSubmissions;
                            LinkedDeckTraversalModel.NavigationSelector studentNavigationType = (LinkedDeckTraversalModel.NavigationSelector)extension.GetExtension(new Guid("{4795707C-9F85-CA1F-FEBA-5E851CF9E1DE}")).ExtensionObject;
                            this.StudentNavigationType = studentNavigationType;
                            using (Synchronizer.Lock(context.Model.ViewerState)) {
                                context.Model.ViewerState.StudentNavigationType = studentNavigationType;
                            }
                        }
                        else
                        {
                            Trace.WriteLine("Unknown Extension id=" + extension.ExtensionType.ToString());
                        }
                    }
                    catch (Exception) {
                        if (extension.ExtensionType.Equals(new Guid("{65A946F4-D1C5-426b-96DB-7AF4863CE296}")))
                        {
                            bool acceptingQuickPollSubmissions = (bool)extension.ExtensionObject;
                            this.AcceptingQuickPollSubmissions = acceptingQuickPollSubmissions;
                        }
                        else
                        {
                            Trace.WriteLine("Unknown Extension id=" + extension.ExtensionType.ToString());
                        }
                    }
                }
                else
                {
                    Trace.WriteLine("Unknown Extension id=" + this.Extension.GetType().ToString());
                }
                role.AcceptingQuickPollSubmissions = this.AcceptingQuickPollSubmissions;
                role.ForcingStudentNavigationLock  = this.ForcingStudentNavigationLock;
                if (this.StudentNavigationType == LinkedDeckTraversalModel.NavigationSelector.None)
                {
                    role.ForcingStudentNavigationLock = true;
                }
                if (role.StudentNavigationType != this.StudentNavigationType)
                {
                    naviChanged = true;
                }
                role.StudentNavigationType = this.StudentNavigationType;
            }

            //if StudentNavigationType changed, refresh FilmStrip region
            if (naviChanged)
            {
                using (Synchronizer.Lock(context.Model.ViewerState.SyncRoot)) {
                    bool oldShowFilmStrip = context.Model.ViewerState.FilmStripEnabled;
                    context.Model.ViewerState.FilmStripEnabled = false;
                    context.Model.ViewerState.FilmStripEnabled = oldShowFilmStrip;
                }
            }

            // Update the clock skew from our current value.
            using (Synchronizer.Lock(context.Model.ViewerState.Diagnostic.SyncRoot)) {
                context.Model.ViewerState.Diagnostic.AddSkewEntry(this.InstructorClockTicks);
            }

            base.UpdateTarget(context);

            return(true);
        }