Skip to content

Commit

Permalink
Log found URLs, add more hub blacklist urls
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden committed Feb 29, 2024
1 parent a421f41 commit bea17ee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Refresher/Patching/EbootPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ public EbootPatcher(Stream stream)
/// <summary>
/// A list of URLs to ignore when finding patchable URLs.
/// </summary>
private static FrozenSet<string> _ignoredUrls = new List<string>
private static readonly FrozenSet<string> _ignoredUrls = new List<string>
{
"http://sdev-hub.dev.lbp.me:8080/",
"http://lbp.me/img/sackboy.png",
"https://api.twitter.com/oauth/access_token",
"https://graph.facebook.com/",
"https://api.twitter.com/1.1/statuses/update.json",
}.ToFrozenSet();

/// <summary>
Expand Down Expand Up @@ -231,13 +233,16 @@ private static void FilterValidUrls(BinaryReader reader, List<long> foundPossibl
if(_ignoredUrls.Contains(str)) continue; // Ignore explicitly blacklisted URLs

if (UrlMatch().Matches(str).Count != 0)
{
Console.WriteLine($"Found URL at offset {foundPosition}: '{str}'");
foundItems.Add(new PatchTargetInfo
{
Length = len,
Offset = foundPosition,
Data = str,
Type = PatchTargetType.Url,
});
}
}
}

Expand Down

0 comments on commit bea17ee

Please sign in to comment.