Add link labyrinth, static robots.txt and robots bait paths
Build and deploy / build (push) Successful in 1m28s
Build and deploy / deploy (push) Successful in 20s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
TomandClaude Opus 5.5 committed 2026-11-16 23:57:52 +01:00
1 parent b7027e2a72
commit a25072e6fb
29 files changed
+774 -34

No files matched your search

+1 -14
View File
@@ -11,12 +11,9 @@ public sealed record FileProfile(
public static class FileContent
{
private static readonly string[] Sections = ["docs", "blog", "wiki", "support", "products", "archive", "news", "help", "files"];
public static readonly IReadOnlyList<FileProfile> Profiles =
[
new("git-drip", "text/plain; charset=utf-8", path => path.Contains("/.git/", StringComparison.Ordinal), GitConfig),
new("robots-drip", "text/plain; charset=utf-8", path => LastSegment(path) == "robots.txt", Robots),
new("wordpress-drip", "text/html; charset=UTF-8", path => LastSegment(path) == "wp-login.php", WordPressLogin),
new("hikvision-drip", "application/xml", path => path.StartsWith("/sdk/", StringComparison.Ordinal) || path.StartsWith("/isapi/", StringComparison.Ordinal), Hikvision),
new("env-drip", "text/plain; charset=utf-8", path => IsEnv(LastSegment(path)), Env),
@@ -131,7 +128,7 @@ public static class FileContent
while (true)
{
var date = string.Create(CultureInfo.InvariantCulture, $"2026-{random.Next(1, 13):00}-{random.Next(1, 29):00}");
yield return $" <url>\n <loc>https://example.com/{Pick(random, Sections)}/{LoremText.Phrase(random, 2).Replace(' ', '-')}</loc>\n <lastmod>{date}</lastmod>\n </url>\n";
yield return $" <url>\n <loc>https://example.com/{Pick(random, MazeContent.Roots)}/{LoremText.Phrase(random, 2).Replace(' ', '-')}</loc>\n <lastmod>{date}</lastmod>\n </url>\n";
}
}
@@ -170,16 +167,6 @@ public static class FileContent
}
}
private static IEnumerable<string> Robots(IRandomSource random)
{
yield return "User-agent: *\nCrawl-delay: 2\nSitemap: https://example.com/sitemap.xml\n";
while (true)
{
yield return $"Disallow: /{Pick(random, Sections)}/{LoremText.Word(random)}/\n";
}
}
private static string Hex(IRandomSource random, int length)
{
var chars = new char[length];