g0ldencybersec / EasyEASM

Zero-dollar attack surface management tool
MIT License
249 stars 35 forks source link

panic: exec: "subfinder": executable file not found in $PATH #7

Closed aburroughs closed 1 year ago

aburroughs commented 1 year ago

After running ./easyeasm I get the following:

subfinder is not installed 2023/08/15 13:11:40 Successfully installed the package: github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest dnsx is not installed 2023/08/15 13:11:41 Successfully installed the package: github.com/projectdiscovery/dnsx/cmd/dnsx@latest alterx is not installed 2023/08/15 13:11:47 Successfully installed the package: github.com/projectdiscovery/alterx/cmd/alterx@latest All needed tools installed!

No previous run data found Running Passive Sources Finding domains for example.com Runing Subfinder on example.com Running Amass on example.com panic: exec: "subfinder": executable file not found in $PATH

goroutine 20 [running]: github.com/g0ldencybersec/EasyEASM/pkg/passive/subfinder.RunSubfinder({0xc000190300, 0xd}, 0x0?, 0x0?) /home/kali/go/pkg/mod/github.com/g0ldencybersec/!easy!e!a!s!m@v1.0.4/pkg/passive/subfinder/subfinder.go:21 +0x33e created by github.com/g0ldencybersec/EasyEASM/pkg/passive.(*PassiveRunner).RunPassiveEnum /home/kali/go/pkg/mod/github.com/g0ldencybersec/!easy!e!a!s!m@v1.0.4/pkg/passive/passive.go:26 +0x1ee

All exes are present in the /go/bin dir

g0ldencybersec commented 1 year ago

Ah yes during Go installation you want to make sure that you add your binary directory for downloaded tools to your PATH. The above error shows that go binaries are not in your $PATH yet.

export PATH=$PATH:$(go env GOPATH)/bin

I would recommend adding this to your ~/.profile or ~/.bashrc file so that this happens automatically!

g0ldencybersec commented 1 year ago

This should put that /go/bin directory in your path! Running easyeasm again should work after your PATH is set!

oliviagallucci commented 1 year ago

Should I close this issue?

aburroughs commented 1 year ago

Yes thank you!

I did have a general question not really an issue. I could not find the CSV file generated only a text file is generated in the go/bin directory.

Am I missing something? Or is it generated elsewhere?

On Wed, Aug 16, 2023, 10:26 AM Olivia Gallucci @.***> wrote:

Should I close this issue?

— Reply to this email directly, view it on GitHub https://github.com/g0ldencybersec/EasyEASM/issues/7#issuecomment-1680917856, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIPO25IQ3GMXMQVVJYGCHP3XVTYEJANCNFSM6AAAAAA3RLLT2A . You are receiving this because you authored the thread.Message ID: @.***>

g0ldencybersec commented 1 year ago

Assuming the tool finishes a run, then there should be a CSV file called "EasyEASM.csv" in whatever directory you ran the tool from!

aburroughs commented 1 year ago

Yes it runs and outputs on screen but only generates a txt file that I can cat but nothing of csv file type. Should I be importing some module to do this?

On Wed, Aug 16, 2023, 12:14 PM g0lden @.***> wrote:

Assuming the tool finishes a run, then there should be a CSV file called "EasyEASM.csv" in whatever directory you ran the tool from!

— Reply to this email directly, view it on GitHub https://github.com/g0ldencybersec/EasyEASM/issues/7#issuecomment-1681071297, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIPO25PNWCEIE7IA432LTBTXVUEZRANCNFSM6AAAAAA3RLLT2A . You are receiving this because you authored the thread.Message ID: @.***>

g0ldencybersec commented 1 year ago

Can you copy in the text of you running the tool? And also a 'ls' run after the fact as well

aburroughs commented 1 year ago

Here is the output after a successful running of ./easyeasm:

goroutine 1 [running]: github.com/g0ldencybersec/EasyEASM/pkg/passive/httpx.RunHttpx({0xc0002c8000?, 0xc000124008?, 0xc000157ae8?}) /home/kali/go/pkg/mod/github.com/g0ldencybersec/!easy!e!a!s!m@v1.0.4/pkg/passive/httpx/httpx.go:16 +0x187 github.com/g0ldencybersec/EasyEASM/pkg/passive.(*PassiveRunner).RunHttpx(...) /home/kali/go/pkg/mod/github.com/g0ldencybersec/!easy!e!a!s!m@v1.0.4/pkg/passive/passive.go:59 main.main() /home/kali/go/pkg/mod/github.com/g0ldencybersec/!easy!e!a!s!m@v1.0.4/easyeasm/main.go:60 +0xfb6

Here is the output of ls:

┌──(kali㉿kali)-[~/go/bin] └─$ ls alterx config.yml dnsx easyeasm subfinder tempHttpx.txt

g0ldencybersec commented 1 year ago

Ah... The tool is still failing on the step where it runs httpx. I think the reason for this is that kali comes with a pre-installed httpx that is written in python and different than the one the tool wants. BUT since there was a tool called "httpx" in your $PATH, the tool didn't install the right one. That is why I don't see a httpx binary in your /go/bin

If you would for me, try running: go install github.com/projectdiscovery/httpx/cmd/httpx@latest

Then run the tool again. See if it doesn't error and generates the csv correctly :) If that fixes it I will add a chunk in the README!!

aburroughs commented 1 year ago

I ran go install github.com/projectdiscovery/httpx/cmd/httpx@latest successfully but still getting a tempHttpx.txt file in the directory after successful completion instead of a generated csv file.

Looks like the same error:

Checking which domains are live and generating assets csv...
panic: exit status 2

goroutine 1 [running]:
github.com/g0ldencybersec/EasyEASM/pkg/active/httpx.RunHttpx({0xc0001a6a00?, 0xc000014018?, 0xc00012dab8?})
        /home/kali/go/pkg/mod/github.com/g0ldencybersec/!easy!e!a!s!m@v1.0.4/pkg/active/httpx/httpx.go:16 +0x187
github.com/g0ldencybersec/EasyEASM/pkg/active.(*ActiveRunner).RunHttpx(...)
        /home/kali/go/pkg/mod/github.com/g0ldencybersec/!easy!e!a!s!m@v1.0.4/pkg/active/active.go:24
main.main()
        /home/kali/go/pkg/mod/github.com/g0ldencybersec/!easy!e!a!s!m@v1.0.4/easyeasm/main.go:102 +0xc07
g0ldencybersec commented 1 year ago

I think you still are running the wrong httpx. You have to delete the python version that comes with kali

I think running which httpx will tell you where it is

oliviagallucci commented 1 year ago

This resolved? @g0ldencybersec @aburroughs

aburroughs commented 1 year ago

Yes - removing the built in httpx in usr/bin on Kali worked!

On Thu, Aug 24, 2023 at 1:07 PM Olivia Gallucci @.***> wrote:

This resolved? @g0ldencybersec https://github.com/g0ldencybersec @aburroughs https://github.com/aburroughs

— Reply to this email directly, view it on GitHub https://github.com/g0ldencybersec/EasyEASM/issues/7#issuecomment-1692261161, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIPO25MQWAJPWCZLDYUR7JDXW6Q5XANCNFSM6AAAAAA3RLLT2A . You are receiving this because you were mentioned.Message ID: @.***>