C# Class StopGuessing.Models.IpHistory

This class keeps track of recent login successes and failures for a given client IP so that we can try to determine if this client should be blocked due to likely-password-guessing behaviors.
ファイルを表示 Open project: Microsoft/StopGuessing Class Usage Examples

Public Properties

Property Type Description
Address System.Net.IPAddress
CurrentBlockScore StopGuessing.DataStructures.DecayingDouble
RecentPotentialTypos SmallCapacityConstrainedSet

Public Methods

Method Description
IpHistory ( IPAddress address, BlockingAlgorithmOptions options ) : System

Method Details

IpHistory() public method

public IpHistory ( IPAddress address, BlockingAlgorithmOptions options ) : System
address System.Net.IPAddress
options BlockingAlgorithmOptions
return System

Property Details

Address public_oe property

The IP address being tracked.
public IPAddress,System.Net Address
return System.Net.IPAddress

CurrentBlockScore public_oe property

The current block score for this IP, in the form of a number that decays with time.
public DecayingDouble,StopGuessing.DataStructures CurrentBlockScore
return StopGuessing.DataStructures.DecayingDouble

RecentPotentialTypos public_oe property

A set of recent login attempts that have failed due to incorrect passwords that are kept around so that, when the correct password is provided, we can see if those passwords were typos and adjust the block score to reduce past penalities given to failed logins that were typos. This is implemented as a capacity constrained set, similar to a cache, where newer values push out old values.
public SmallCapacityConstrainedSet RecentPotentialTypos
return SmallCapacityConstrainedSet