Invoke-ACLPwn icon indicating copy to clipboard operation
Invoke-ACLPwn copied to clipboard

Json files larger than 2Mb can't be parsed

Open Danielg75 opened this issue 6 years ago • 0 comments

Problem

The new functionality allowing the use of Bloodhound 2.0 Json output to be parsed fails silently if sharphound.exe produces Json files larger than 2Mb. ConvertFrom-Json has a hardcoded 2Mb input limit.

Possible Solution

replace the Json parse line 1489: $tmp = ConvertFrom-Json $content -ErrorAction SilentlyContinue with:

[void][System.Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions")        
$jsonserial= New-Object -TypeName System.Web.Script.Serialization.JavaScriptSerializer 
$jsonserial.MaxJsonLength  = 67108864 #64Mb
$tmp = $jsonserial.DeserializeObject($content)

Danielg75 avatar Dec 05 '18 12:12 Danielg75