Initial commit

This commit is contained in:
2024-11-24 12:40:51 +01:00
parent 9819604110
commit f3c6338a6a
323 changed files with 11769 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
using MessagePack;
namespace Models.Model.Backend;
[MessagePackObject]
public struct DatabaseSizes
{
[Key(0)]
public double DiscardedDbSize { get; set; }
[Key(1)]
public double FilteredDbSize { get; set; }
[Key(2)]
public double MyDbSize { get; set; }
}
+7
View File
@@ -0,0 +1,7 @@
namespace Models.Model.Backend;
public class Discarded
{
public string Ip { get; set; } = "";
public int ResponseCode { get; set; }
}
@@ -0,0 +1,7 @@
namespace Models.Model.Backend;
public class DiscardedDbHandlerSetting
{
public EventWaitHandle? Handle { get; set; }
public int ThreadId { get; set; }
}
+35
View File
@@ -0,0 +1,35 @@
namespace Models.Model.Backend;
public class Filtered
{
public string Ip { get; set; } = "";
public string Title1 { get; set; } = "";
public string Title2 { get; set; } = "";
public string Description1 { get; set; } = "";
public string Description2 { get; set; } = "";
public string Url1 { get; set; } = "";
public string Url2 { get; set; } = "";
public int Port1 { get; set; }
public int Port2 { get; set; }
public string ServerType1 { get; set; } = "";
public string ServerType2 { get; set; } = "";
public bool RobotsTXT1 { get; set; }
public bool RobotsTXT2 { get; set; }
public string HttpVersion1 { get; set; } = "";
public string HttpVersion2 { get; set; } = "";
public string ALPN { get; set; } = ""; // Application Layer Protocol Negotiation, which allows clients and servers
// to agree on a common application layer protocol during the TLS handshake process.
public string CertificateIssuerCountry { get; set; } = "";
public string CertificateOrganizationName { get; set; } = "";
public string IpV6 { get; set; } = "";
public string TlsVersion { get; set; } = "";
public string CipherSuite { get; set; } = "";
public string KeyExchangeAlgorithm { get; set; } = "";
public string PublicKeyType1 { get; set; } = "";
public string PublicKeyType2 { get; set; } = "";
public string PublicKeyType3 { get; set; } = "";
public string AcceptEncoding1 { get; set; } = "";
public string AcceptEncoding2 { get; set; } = "";
public string Connection1 { get; set; } = ""; // Fx: keep-alive
public string Connection2 { get; set; } = "";
}
+8
View File
@@ -0,0 +1,8 @@
namespace Models.Model.Backend;
public enum Operations
{
Insert,
Update,
Optimize,
}
+9
View File
@@ -0,0 +1,9 @@
namespace Models.Model.Backend;
public class QueueItem
{
public Unfiltered? Unfiltered { get; init; }
public Filtered? Filtered { get; init; }
public ScannerResumeObject? ResumeObject { get; init; }
public Operations Operations { get; init; }
}
@@ -0,0 +1,12 @@
namespace Models.Model.Backend;
public class ScannerResumeObject
{
public int StartRange { get; set; }
public int EndRange { get; set; }
public int FirstByte { get; set; }
public int SecondByte { get; set; }
public int ThirdByte { get; set; }
public int FourthByte { get; set; }
public int ThreadNumber { get; set; }
}
+8
View File
@@ -0,0 +1,8 @@
namespace Models.Model.Backend;
public enum SizeUnits
{
Byte,
KB,
MB,
GB,
}
+16
View File
@@ -0,0 +1,16 @@
namespace Models.Model.Backend;
public class Unfiltered
{
public int Id { get; set; }
public string Ip { get; set; } = "";
public int ResponseCode { get; init; }
public int Port1 { get; set; }
public int Port2 { get; set; }
public int Filtered { get; set; }
}
+11
View File
@@ -0,0 +1,11 @@
namespace Models.Model.External;
public enum CommunicationCommand
{
GetScanningProgress,
GetSearches,
StopScanning,
GarbageCollect,
DbReindex,
DbVacuum,
}
+13
View File
@@ -0,0 +1,13 @@
using MessagePack;
namespace Models.Model.External;
[MessagePackObject]
public class CommunicationObject
{
[Key(0)]
public CommunicationCommand Command { get; set; }
[Key(1)]
public string? SearchTerm { get; set; }
}
+13
View File
@@ -0,0 +1,13 @@
using MessagePack;
namespace Models.Model.External;
[MessagePackObject]
public class CommunicationResult
{
[Key(0)]
public List<SearchResult?>? Result { get; set; }
[Key(1)]
public ScanningStatus? Status { get; set; }
}
+29
View File
@@ -0,0 +1,29 @@
using MessagePack;
using Models.Model.Backend;
namespace Models.Model.External;
[MessagePackObject]
public struct ScanningStatus
{
[Key(0)]
public float PercentageOfIpv4Scanned { get; set; }
[Key(1)]
public long TotalFiltered { get; set; }
[Key(2)]
public long AmountOfIpv4Left { get; set; }
[Key(3)]
public long TotalDiscarded { get; set; }
[Key(4)]
public double DiscardedDbSize { get; set; }
[Key(5)]
public double FilteredDbSize { get; set; }
[Key(6)]
public double MyDbSize { get; set; }
}
+8
View File
@@ -0,0 +1,8 @@
namespace Models.Model.External;
public class SearchResult
{
public string? Title { get; set; } = "";
public string? Url { get; set; } = "";
public string? Description { get; set; } = "";
}
+6
View File
@@ -0,0 +1,6 @@
namespace Models.Model.External;
public class SearchResults
{
public List<SearchResult?>? Results { get; set; }
}