rverton / webanalyze

Port of Wappalyzer (uncovers technologies used on websites) to automate mass scanning.
MIT License
955 stars 137 forks source link

unable to unmarshal: wappalyzer schema definition file changed #7

Closed francisco-sec closed 7 years ago

francisco-sec commented 7 years ago

I installed your tool like described in the README (in Arch Linux) and it keeps giving this error below:

$ go run cmd/webanalyze/main.go -host https://host/path/ 
2017/08/10 16:24:18 error initializing: json: cannot unmarshal number into Go struct field App.cats of type string

Is this normal? After the previous error the execution seems to proceed but hang.

2017/08/10 16:24:18 Scanning with 4 workers.
rverton commented 7 years ago

Thanks for the notice. It looks like the schema of the apps.json file from webanalyze changed again. I will check this.

rverton commented 7 years ago

So the problem is that wappalyzer is not very .. strict on their apps.json schema. Have a look at how the usually define their categories, for example:

"cats": [
    "20",
    "51"
],

And now look at this:

"cats": [
    1
],

This fails to unmarshal, because I am expecting a string, and not a number. To fix this you can do this by hand (change 1 to "1"). I will also prepare a PR for the wappalyzer repository.

Update: You can track the PR here.

francisco-sec commented 7 years ago

Many thanks you for your quick answer. I made that change in my local apps.json and it works now.