Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malformed string. #31

Open
orencio opened this issue Oct 7, 2022 · 0 comments
Open

Malformed string. #31

orencio opened this issue Oct 7, 2022 · 0 comments

Comments

@orencio
Copy link

orencio commented Oct 7, 2022

Version: Winusers-4.0.

In line 66 of agent/winusers.ps1 file, there is:

$path = "C:\Users\"+ $user.Name

but the combinatio \" is escaping " char.

This produces errors in some machines (in Windows):

$ echo '$path = "C:\Users\"; print($path);' | perl
Can't find string terminator '"' anywhere before EOF at - line 1.

This line should be:

$path = "C:\\Users\\"+ $user.Name

This occurs in multiples lines in the file:

$ grep -nE '\\' winusers.ps1 | grep -v '\\\\'
56:$pathUsers = "C:\Users"
66:		$path = "C:\Users\"+ $user.Name
112:$Dsregcmd = New-Object PSObject ; Dsregcmd /status | Where {$_ -match ' : '} | ForEach { $Item = $_.Trim() -split '\s:\s'; $Dsregcmd | Add-Member -MemberType NoteProperty -Name $($Item[0] -replace '[:\s]','') -Value $Item[1] -EA SilentlyContinue }
114:$profileListPath =  @("Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\*")
127:	$path = "C:\Users\"+ $userAd

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant