Skip to content

Commit

Permalink
Update honeyport.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwdrkeg committed Feb 4, 2013
1 parent 39b68db commit 986b33a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions honeyport.ps1
@@ -1,4 +1,3 @@

<#
.Synopsis
Block IP Addresses that connect to a specified port.
Expand Down Expand Up @@ -96,7 +95,7 @@ Check-HoneyPortEvent
if (Check-IsAdmin) {
foreach($port in $Ports) {
$log = "HoneyPort has started listening for connections on port $port"
write-eventlog -logname HoneyPort -source BlueKit -eventID 1001 -entrytype Information -message $log
write-eventlog -logname HoneyPort -source BlueKit -eventID 1001 -entrytype Information -message $log
Write "Starting job that will listen for connections on port $port"
Start-Job -ScriptBlock {
param($port, $whitelist)
Expand Down Expand Up @@ -129,8 +128,8 @@ if (Check-IsAdmin) {
$rule.Enabled = $True
$firewall.Rules.Add($rule)
write "Host has been blocked."
$logIP = "$IP has been blocked on port $port"
write-eventlog -logname HoneyPort -source BlueKit -eventID 1002 -entrytype Information -message $logIP
$logIP = "$IP has been blocked on port $port"
write-eventlog -logname HoneyPort -source BlueKit -eventID 1002 -entrytype Information -message $logIP
$client.Close()
$listener.stop()
Write "Connection closed"
Expand Down

0 comments on commit 986b33a

Please sign in to comment.