public Travian(Data TravianData, Dictionary <string, string> Options) { TD = TravianData; //DB.Instance.Initialize(TravianData.Server); //DB.Instance.Initialize(TravianData.key); this.pageQuerier = this; int StdSpeed = 24; if (TD.Tribe != 0) { StdSpeed = Buildings.BaseSpeed[TD.Tribe][10]; } //if(TD.Tribe == 1) // StdSpeed = 16; //else if(TD.Tribe == 2) // StdSpeed = 12; //else // StdSpeed = 24; int MarketSpeedX = 1; TD.MarketSpeed = StdSpeed * MarketSpeedX; LoadOptions(Options); TD.Dirty = true; AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); Thread.GetDomain().UnhandledException += new UnhandledExceptionEventHandler(UnhandledException); }
public Travian(Data TravianData, Dictionary<string, string> Options) { TD = TravianData; //DB.Instance.Initialize(TravianData.Server); //DB.Instance.Initialize(TravianData.key); this.pageQuerier = this; int StdSpeed = 24; if (TD.Tribe != 0) { StdSpeed = Buildings.BaseSpeed[TD.Tribe][10]; } //if(TD.Tribe == 1) // StdSpeed = 16; //else if(TD.Tribe == 2) // StdSpeed = 12; //else // StdSpeed = 24; int MarketSpeedX = 1; TD.MarketSpeed = StdSpeed * MarketSpeedX; LoadOptions(Options); TD.Dirty = true; AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); Thread.GetDomain().UnhandledException += new UnhandledExceptionEventHandler(UnhandledException); }
private static string FilterDummyParams(string PageData, string str, IPageQuerier PQ) { return str .Replace("'+escape(Browser.Engine.name)+'", "trident") .Replace("'+escape(Browser.Platform.name)+'", "win") .Replace("'+escape(screen.width)+'", ScreenWidth.ToString()) .Replace("'+escape(screen.height)+'", ScreenHeight.ToString()) .Replace("'+escape(document.referrer)+'", GlobalObject.escape(PQ.Referer)) .Replace("'+escape(navigator.userAgent)+'", GlobalObject.escape(UA)) .Replace("+CountRec1(mtop),", CountRec1(PageData, "mtop").ToString()); }
public static bool DummyCheck(string PageData, IPageQuerier PQ) { // Check stats.php var mc = Regex.Matches(PageData, @"""(stats\.php\?p=[^""]+)""(\+.*)*"); if (mc.Count == 0) return false; // File.WriteAllText("PAGEDUMP_" + DateTime.Now.Ticks + ".htm", PageData); foreach (Match mm in mc) { var uri = mm.Groups[1].Value; if (mm.Groups[2].Success) uri += mm.Groups[2].Value; uri = FilterDummyParams(PageData, uri, PQ); PQ.PageQuery(0, uri, null, false, true); } return true; }
public Travian() { this.pageQuerier = this; Thread.GetDomain().UnhandledException += new UnhandledExceptionEventHandler(UnhandledException); }
public Travian() { this.pageQuerier = this; Thread.GetDomain().UnhandledException += new UnhandledExceptionEventHandler(UnhandledException); }