diff options
author | Kevin Robertson <robertsonk@gmail.com> | 2016-08-21 22:49:56 -0400 |
---|---|---|
committer | Kevin Robertson <robertsonk@gmail.com> | 2016-08-21 22:49:56 -0400 |
commit | 11b77b4153f6054aa9a7dc2651cf6a2447275e34 (patch) | |
tree | bb72bae587bd857e021b9f090f427d8f25e1b978 /Scripts/Inveigh.ps1 | |
parent | a991da593917b5b9ea282a32abea890c989ee2bd (diff) | |
download | Inveigh-11b77b4153f6054aa9a7dc2651cf6a2447275e34.tar.gz Inveigh-11b77b4153f6054aa9a7dc2651cf6a2447275e34.zip |
Bug fixes
Hostname parsing and UDP client fixes.
Diffstat (limited to 'Scripts/Inveigh.ps1')
-rw-r--r-- | Scripts/Inveigh.ps1 | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Scripts/Inveigh.ps1 b/Scripts/Inveigh.ps1 index ce67d6d..907a8e3 100644 --- a/Scripts/Inveigh.ps1 +++ b/Scripts/Inveigh.ps1 @@ -1621,8 +1621,20 @@ $sniffer_scriptblock = $LLMNR_query = [System.BitConverter]::ToString($payload_bytes[13..($payload_bytes.Length - 4)]) $LLMNR_query = $LLMNR_query -replace "-00","" - $LLMNR_query = $LLMNR_query.Split("-") | ForEach-Object{[Char][System.Convert]::ToInt16($_,16)} - $LLMNR_query_string = New-Object System.String($LLMNR_query,0,$LLMNR_query.Length) + + if($LLMNR_query.Length -eq 2) + { + $LLMNR_query = [Char][System.Convert]::ToInt16($LLMNR_query,16) + $LLMNR_query_string = New-Object System.String($LLMNR_query) + } + else + { + $LLMNR_query = $LLMNR_query.Split("-") | ForEach-Object{[Char][System.Convert]::ToInt16($_,16)} + $LLMNR_query_string = New-Object System.String($LLMNR_query,0,$LLMNR_query.Length) + } + + + $inveigh.console_queue.Add($LLMNR_query_string) if($LLMNR -eq 'Y') { |