rverton / webanalyze

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

error: can not open host file : open : no such file or directory #16

Closed Den1al closed 5 years ago

Den1al commented 5 years ago

Apparently the command line binary tries to read the hosts file when using the "update" flag. When using this flag, the check should stop right after the update:

if update {
        err = webanalyze.DownloadFile(webanalyze.WappalyzerURL, "apps.json")
        if err != nil {
            log.Fatalf("error: can not update apps file: %v", err)
        }

        log.Println("app definition file updated from ", webanalyze.WappalyzerURL)

    }

// DEN1AL - this should not run!
    // check single host or hosts file
    if host != "" {
rverton commented 5 years ago

Hi @Den1al, I implemented this so you can always append -update and have a fresh version of apps.json. It should not force the program to exit here, so thats the purpose. Does this make a problem for your usecase? If yes let me know and we can add a return here.

Greetings, robin

Den1al commented 5 years ago

I think it would be more elegant, that if you wish only to update, to suppress other messages regarding other operations.

rverton commented 5 years ago

The latest commit should fix this.