Changed GET to HEAD for checking robots txt.
This commit is contained in:
@@ -229,7 +229,7 @@ public class ContentFilter
|
||||
private void StartProcess(Ip ip, int port)
|
||||
{
|
||||
string fileName = port == 80 ? _getDomainPort80 : _getDomainPort443;
|
||||
//Console.WriteLine($"{ip.Ip1}.{ip.Ip2}.{ip.Ip3}.{ip.Ip4}");
|
||||
|
||||
Process proc = new();
|
||||
proc.StartInfo = new()
|
||||
{
|
||||
|
||||
@@ -205,13 +205,11 @@ public class IpScanner
|
||||
|
||||
private static Discarded CreateDiscardedQueueItem(Ip ip, int responseCode)
|
||||
{
|
||||
Discarded discarded = new()
|
||||
return new()
|
||||
{
|
||||
Ip = ip,
|
||||
ResponseCode = responseCode
|
||||
};
|
||||
|
||||
return discarded;
|
||||
}
|
||||
|
||||
private static QueueItem CreateUnfilteredQueueItem(Ip ip, (int, int) ports)
|
||||
@@ -224,14 +222,12 @@ public class IpScanner
|
||||
Filtered = false
|
||||
};
|
||||
|
||||
QueueItem superUnfilteredObject = new()
|
||||
return new()
|
||||
{
|
||||
Unfiltered = unfiltered,
|
||||
Operations = Operations.Insert,
|
||||
DbType = DbType.Unfiltered
|
||||
};
|
||||
|
||||
return superUnfilteredObject;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
|
||||
@@ -28,22 +28,22 @@ public class ThreadHandler
|
||||
|
||||
public void Start()
|
||||
{
|
||||
Thread scanner = new(StartScanner);
|
||||
//Thread scanner = new(StartScanner);
|
||||
Thread indexer = new(StartContentFilter);
|
||||
Thread database = new(StartDbHandler);
|
||||
Thread discarded = new(StartDiscardedDbHandler);
|
||||
//Thread discarded = new(StartDiscardedDbHandler);
|
||||
Thread communication = new(StartCommunicationHandler);
|
||||
|
||||
scanner.Start();
|
||||
//scanner.Start();
|
||||
indexer.Start();
|
||||
database.Start();
|
||||
discarded.Start();
|
||||
//discarded.Start();
|
||||
communication.Start();
|
||||
|
||||
scanner.Join();
|
||||
//scanner.Join();
|
||||
indexer.Join();
|
||||
database.Join();
|
||||
discarded.Join();
|
||||
//discarded.Join();
|
||||
communication.Join();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user