Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
zamgi authored and zamgi committed Nov 25, 2023
1 parent b5239bd commit 5ce49b8
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ Temporary Items
.apdisk

*.suo
/.vs/*
.vs
6 changes: 3 additions & 3 deletions captcha/AntiBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ namespace captcha
/// </summary>
public interface IAntiBotConfig
{
public const int SAME_IP_BANNED_INTERVAL_IN_SECONDS = 120;
public const int SAME_IP_INTERVAL_REQUEST_IN_SECONDS = 10;
public const int SAME_IP_MAX_REQUEST_IN_INTERVAL = 3;
public const int SAME_IP_BANNED_INTERVAL_IN_SECONDS = 120;
public const int SAME_IP_INTERVAL_REQUEST_IN_SECONDS = 10;
public const int SAME_IP_MAX_REQUEST_IN_INTERVAL = 3;

public int? SameIpBannedIntervalInSeconds { get; }
public int? SameIpIntervalRequestInSeconds { get; }
Expand Down
3 changes: 3 additions & 0 deletions captcha/Controllers/CaptchaController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace captcha
{
/// <summary>
///
/// </summary>
public sealed class CaptchaController : Controller
{
#region [.ctor().]
Expand Down
2 changes: 1 addition & 1 deletion captcha/Models/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public sealed class CaptchaVM
public string CaptchaPageTitle { get; init; }

public string ErrorMessage { get; init; }
public bool HasError => (ErrorMessage != null);
public bool HasError => (ErrorMessage != null);
}

/// <summary>
Expand Down
12 changes: 0 additions & 12 deletions captcha/Properties/launchSettings.json

This file was deleted.

4 changes: 1 addition & 3 deletions captcha/Views/Captcha.cshtml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
@using captcha
@model CaptchaVM

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<title>@(Model.CaptchaPageTitle ?? "Captcha")</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
Expand Down
4 changes: 0 additions & 4 deletions captcha/captcha.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup>
<DefineConstants>$(DefineConstants)TRACE; XLAT_WHITESPACE_CHARS; XLAT_UPPER_INVARIANT_MAP; XLAT_CHARTYPE_MAP;</DefineConstants>
</PropertyGroup>

<ItemGroup>
<None Remove=".gitignore" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions classify.console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static IEnumerable< T > SafeWalk< T >( this IEnumerable< T > source )
{
using ( var enumerator = source.GetEnumerator() )
{
for ( ; ; )
for (; ; )
{
try
{
Expand All @@ -120,7 +120,7 @@ public static IEnumerable< T > SafeWalk< T >( this IEnumerable< T > source )
}
catch ( Exception ex )
{
Debug.WriteLine( ex.GetType().Name + ": '" + ex.Message + '\'' );
Debug.WriteLine( $"{ex.GetType().Name}: '{ex.Message}'" );
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion classify.webService/Startup/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private static void OpenBrowserIfRunAsConsole( IApplicationBuilder app )
address = address.Replace( "/*:", "/localhost:" );

using ( Process.Start( new ProcessStartInfo( address.TrimEnd( '/' ) + INDEX_PAGE_PATH ) { UseShellExecute = true } ) ) { };
}
}
}
#endregion
}
Expand Down

0 comments on commit 5ce49b8

Please sign in to comment.