Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
nneeo authored and nneeo committed Feb 9, 2022
1 parent b932872 commit 6238def
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
# Change log

### 1.0.1
### 1.0.4

- Add binary modules
- Protect-FromBruteforce - do nothing if no network logons was found
- Add warnings if cmdlet did nothing
- Write warnings if one of the steps fails
- Update module manifest

### 1.0.3

- fix error when input array is empty
- Move unnecessary messages to verbose

### 1.0.2

- Add binary modules

### 1.0.1

- Better naming for modules
- Remove redundant type casting


## 1.0.0

- Initial Commit
14 changes: 7 additions & 7 deletions StopBruteforce/Cmdlets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ type public StopBruteforce() =

(ErrorRecord(exn, "1", ErrorCategory.InvalidResult, "Stop-Bruteforce")) |> this.WriteError

| _ -> this.WriteVerbose "Nobody to block."
| _ -> this.WriteWarning "No failed network logons was detected. Cmdlet did nothing."

| _ ->
let exn = exn "To use Protect-FromBruteforce, you need administrator rights"
Expand Down Expand Up @@ -199,7 +199,7 @@ type public ProtectFromBruteforce() =
| principal when principal.IsInRole WindowsBuiltInRole.Administrator ->
match EventLog.getSuccessAudit last with
| report when report <> [||] ->
let addresses = report |> Seq.map (fun i -> i.ToString()) |> String.concat ","
let addresses = report |> Array.map (fun i -> i.ToString()) |> String.concat ","

if rdp.IsPresent then
match @"Set-NetFirewallRule -PassThru -Name 'RemoteDesktop-UserMode-In-TCP' -RemoteAddress "
Expand Down Expand Up @@ -228,7 +228,7 @@ type public ProtectFromBruteforce() =

report |> Array.iter this.WriteObject
| _ -> this.WriteWarning "No successful network logons was detected. Cmdlet did nothing."

| _ ->
let exn = exn "To use Protect-FromBruteforce, you need administrator rights"

Expand Down Expand Up @@ -280,21 +280,21 @@ type public UnprotectFromBruteforce() =
if rdp.IsPresent then
match @"Set-NetFirewallRule -Name 'RemoteDesktop-UserMode-In-TCP' -RemoteAddress ANY" |> Pwsh.invoke with
| Some _ -> this.WriteVerbose "Standard firewall rule was reset for RDP TCP"
| _ -> ()
| _ -> this.WriteWarning "RemoteDesktop-UserMode-In-TCP rule was not found"

match @"Set-NetFirewallRule -Name 'RemoteDesktop-UserMode-In-UDP' -RemoteAddress ANY" |> Pwsh.invoke with
| Some _ -> this.WriteVerbose "Standard firewall rule was reset for RDP UDP"
| _ -> ()
| _ -> this.WriteWarning "RemoteDesktop-UserMode-In-UDP rule was not found"

if smb.IsPresent then
match @"Set-NetFirewallRule -Name 'FPS-SMB-In-TCP' -RemoteAddress ANY" |> Pwsh.invoke with
| Some _ -> this.WriteVerbose "Standard firewall rule was reset for SMB"
| _ -> ()
| _ -> this.WriteWarning "FPS-SMB-In-TCP rule was not found"

if winRM.IsPresent then
match @"Set-NetFirewallRule -Name 'WINRM-HTTP-In-TCP-PUBLIC' -RemoteAddress ANY" |> Pwsh.invoke with
| Some _ -> this.WriteVerbose "Standard firewall rule was reset for WINRM"
| _ -> ()
| _ -> this.WriteWarning "WINRM-HTTP-In-TCP-PUBLIC rule was not found"
| _ ->
let exn = exn "To use Protect-FromBruteforce, you need administrator rights"

Expand Down
Binary file modified StopBruteforce/StopBruteforce.psd1
Binary file not shown.

0 comments on commit 6238def

Please sign in to comment.