Skip to content

Json files larger than 2Mb can't be parsed #6

@Danielg75

Description

@Danielg75

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions