R4yGM / dorkscout

DorkScout - Golang tool to automate google dork scan against the entiere internet or specific targets
https://r4ygm.github.io/dorkscout/
Apache License 2.0
231 stars 26 forks source link

Segfault when attempting to generate HTML report #2

Open Sirbu opened 2 years ago

Sirbu commented 2 years ago

Hi. Here is my error message :

$ ./dorkscout scan  -d ../osint/dork_documents_pdf.txt -H results           
../osint/dork_documents_pdf.txt  nothing found
=====================================
Results for :  site:domainedelacadene.fr filetype:pdf
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x577dd9]

goroutine 1 [running]:
text/template.errRecover(0xc0001c9378)
        /usr/lib/go-1.17/src/text/template/exec.go:163 +0x15b
panic({0x8eee00, 0xe6d360})
        /usr/lib/go-1.17/src/runtime/panic.go:1038 +0x215
text/template.(*Template).execute(0x0, {0xa34380, 0x0}, {0x8e98a0, 0xc000306b70})
        /usr/lib/go-1.17/src/text/template/exec.go:214 +0x239
text/template.(*Template).Execute(...)
        /usr/lib/go-1.17/src/text/template/exec.go:200
github.com/R4yGM/dorkscout/results.HTMLInject({0xc0000283c0, 0xc000010018}, 0xf8, {0x9835ba, 0x2}, {0x7ffface643e1, 0x7}, 0x0)
        /home/scassi/cadene/dorkscout/results/results.go:239 +0x9b5
github.com/R4yGM/dorkscout/cmd.scan(0x1)
        /home/scassi/cadene/dorkscout/cmd/scan.go:129 +0x596
github.com/R4yGM/dorkscout/cmd.scan(0x0)
        /home/scassi/cadene/dorkscout/cmd/scan.go:193 +0xa8d
github.com/R4yGM/dorkscout/cmd.google_scan()
        /home/scassi/cadene/dorkscout/cmd/scan.go:242 +0x66
github.com/R4yGM/dorkscout/cmd.glob..func3(0xe7a120, {0x97db15, 0x4, 0x4})
        /home/scassi/cadene/dorkscout/cmd/scan.go:51 +0x91
github.com/spf13/cobra.(*Command).execute(0xe7a120, {0xc0002d40c0, 0x4, 0x4})
        /home/scassi/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:860 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0xe79ea0)
        /home/scassi/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
        /home/scassi/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:902
github.com/R4yGM/dorkscout/cmd.Execute(...)
        /home/scassi/cadene/dorkscout/cmd/root.go:14
main.main()
        /home/scassi/cadene/dorkscout/main.go:6 +0x25

The content of my dork file is the following : site:[domain] filetype:pdf

With [domain] being an actual domain obviously ;)

R4yGM commented 2 years ago

it looks like that it can't write the results, try to check if dorkscout has enough permissions to write and read files

m-raheem commented 1 year ago

you have to use ./results.html for complete result i solved this issue by this