Class UnsafeThreat
Unsafe Threat.
Inheritance
Inherited Members
Namespace: Gee.External.Browsing
Assembly: Gee.External.Browsing.dll
Syntax
public sealed class UnsafeThreat
Constructors
UnsafeThreat(String, ThreatListDescriptor, DateTime)
Create an Unsafe Threat.
Declaration
public UnsafeThreat(string sha256Hash, ThreatListDescriptor associatedThreatListDescriptor, DateTime expirationDate)
Parameters
Type | Name | Description |
---|---|---|
System.String | sha256Hash | A full SHA256 hash, formatted as a hexadecimal encoded string, identifying the threat. |
ThreatListDescriptor | associatedThreatListDescriptor | A ThreatListDescriptor identifying the ThreatList the threat is associated with. |
System.DateTime | expirationDate | The date, in Coordinated Universal Time (UTC), the threat should be considered unsafe to. If the date is not in UTC, it is converted to it. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
System.FormatException | Thrown if |
Properties
AssociatedThreatListDescriptor
Get Threat's Associated Threat List Descriptor.
Declaration
public ThreatListDescriptor AssociatedThreatListDescriptor { get; }
Property Value
Type |
---|
ThreatListDescriptor |
Remarks
Represents the ThreatListDescriptor identifying the ThreatList the threat is associated with.
ExpirationDate
Get Threat's Expiration Date.
Declaration
public DateTime ExpirationDate { get; }
Property Value
Type |
---|
System.DateTime |
Remarks
Represents the date, in Coordinated Universal Time (UTC), the threat should be considered unsafe to.
Expired
Determine if Threat Has Expired.
Declaration
public bool Expired { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
Determines if the threat has expired and should no longer be considered unsafe. The threat is expired if ExpirationDate has elapsed.
IsMalware
Determine if Threat is Malware.
Declaration
public bool IsMalware { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
Determines if the threat is malware. The threat is malware if AssociatedThreatListDescriptor is identified by Malware.
IsPotentiallyHarmfulApplication
Determine if Threat is a Potentially Harmful Application.
Declaration
public bool IsPotentiallyHarmfulApplication { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
Determines if the threat is a potentially harmful application (PHA). The threat is a PHA if AssociatedThreatListDescriptor is identified by PotentiallyHarmfulApplication.
IsSocialEngineering
Determine if Threat is Social Engineering.
Declaration
public bool IsSocialEngineering { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
Determines if the threat is social engineering. The threat is social engineering if AssociatedThreatListDescriptor is identified by SocialEngineering.
IsUnwantedSoftware
Determine if Threat is Unwanted Software.
Declaration
public bool IsUnwantedSoftware { get; }
Property Value
Type |
---|
System.Boolean |
Remarks
Determines if the threat is unwanted software. The threat is unwanted software if AssociatedThreatListDescriptor is identified by UnwantedSoftware.
Metadata
Get Threat's Metadata.
Declaration
public IReadOnlyDictionary<string, string> Metadata { get; set; }
Property Value
Type |
---|
System.Collections.Generic.IReadOnlyDictionary<System.String, System.String> |
Remarks
Represents the threat's metadata.
Sha256Hash
Get Threat's SHA256 Hash.
Declaration
public string Sha256Hash { get; }
Property Value
Type |
---|
System.String |
Remarks
Represents the full SHA256 hash, formatted as a hexadecimal encoded string, identifying the threat.
Methods
Equals(Object)
Determine if Object is Equal to Another Object.
Declaration
public override bool Equals(object object)
Parameters
Type | Name | Description |
---|---|---|
System.Object | object | An object to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | A boolean true if the object is equal to |
Overrides
GetHashCode()
Get Object's Hash Code.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The object's hash code. |
Overrides
ToString()
Get Object's String Representation.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | The object's string representation. |