Add link labyrinth, static robots.txt and robots bait paths
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b7027e2a72
commit
a25072e6fb
29 files changed
+774
-34
No files matched your search
@@ -22,13 +22,13 @@ public abstract class DripStrategy(
|
||||
var head = current.HeadStartSize > 0 ? $" head {current.HeadStartSize}B" : "";
|
||||
return string.Create(
|
||||
CultureInfo.InvariantCulture,
|
||||
$"{Name} {current.MinDelay.TotalMilliseconds:0}-{current.MaxDelay.TotalMilliseconds:0}ms {current.MinChunkSize}-{current.MaxChunkSize}B{head}");
|
||||
$"{Name} {current.MinDelay.TotalMilliseconds:0}-{current.MaxDelay.TotalMilliseconds:0}ms {current.MinChunkSize}-{current.MaxChunkSize}B{head}{Extra(current)}");
|
||||
}
|
||||
|
||||
public async Task RunAsync(ITrapChannel channel, CancellationToken ct)
|
||||
{
|
||||
var current = options.CurrentValue;
|
||||
using var fragments = Content(random).GetEnumerator();
|
||||
using var fragments = Content(random, channel, current).GetEnumerator();
|
||||
|
||||
var head = DripSchedule.TakeHead(fragments, current.HeadStartSize);
|
||||
if (head.Length > 0)
|
||||
@@ -44,5 +44,7 @@ public abstract class DripStrategy(
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract IEnumerable<string> Content(IRandomSource random);
|
||||
protected virtual string Extra(DripOptions options) => "";
|
||||
|
||||
protected abstract IEnumerable<string> Content(IRandomSource random, ITrapChannel channel, DripOptions options);
|
||||
}
|
||||
Reference in new issue
Block a user