Skip to content

Commit

Permalink
Removed try from NBNS spoofer startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin-Robertson committed Oct 18, 2016
1 parent 841bc15 commit bbac363
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions Scripts/Inveigh-Unprivileged.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1330,20 +1330,10 @@ $NBNS_spoofer_scriptblock =
$NBNS_UDP_client = New-Object System.Net.Sockets.UdpClient 137
$NBNS_UDP_client.Client.ReceiveTimeout = 5000

:NBNS_spoofer_loop while($inveigh.unprivileged_running)
while($inveigh.unprivileged_running)
{

try
{
$NBNS_request_data = $NBNS_UDP_client.Receive([Ref]$NBNS_listener_endpoint) # need to switch to async
}
catch
{
$inveigh.console_queue.Add("$(Get-Date -format 's') - Error starting NBNS spoofer")
$inveigh.log.Add($inveigh.log_file_queue[$inveigh.log_file_queue.Add("$(Get-Date -format 's') - Error starting NBNS spoofer")])
break NBNS_spoofer_loop
}

$NBNS_request_data = $NBNS_UDP_client.Receive([Ref]$NBNS_listener_endpoint) # need to switch to async

if([System.BitConverter]::ToString($NBNS_request_data[10..11]) -ne '00-01')
{
Expand Down

0 comments on commit bbac363

Please sign in to comment.