haccer / subjack

Subdomain Takeover tool written in Go
Apache License 2.0
1.91k stars 337 forks source link

/src/github.com/haccer/subjack/fingerprints.json: no such file or directory #25

Open ttmyst opened 6 years ago

ttmyst commented 6 years ago

Hello

I am using the newest version of subjack with go1.10.4 on Ubuntu, but have the following error: /src/github.com/haccer/subjack/fingerprints.json: no such file or directory Subjack tries to find fingerprints.json by absolute path, not in directory marked as GOPATH. Could you please help me fixing this? I am sorry for this issue if i'm not right. Thank you

ehsandeep commented 6 years ago

What's the output of this echo $GOPATH? @ttmyst

ttmyst commented 6 years ago

@madaratech output is /home/tati/go subjack binary is in /home/tati/go/bin directory, sources are in /home/tati/go/src/github.com/haccer/subjack

ehsandeep commented 6 years ago

Can you check the existence of the file fingerprints.json in /home/tati/go/src/github.com/haccer/subjack directory?

ttmyst commented 6 years ago

@madaratech yes, the file /home/tati/go/src/github.com/haccer/subjack/fingerprints.json exists. I think the problem is that subjack is looking for /src/github.com/haccer/subjack/fingerprints.json file.

ehsandeep commented 6 years ago

No, as par code it looks with your $GOPATH https://github.com/haccer/subjack/blob/99fe2fff937aa6aa3d30679c52320fb874f3eec9/main.go#L15

ehsandeep commented 6 years ago

Anyway you can always feed that file location with -c so, use -c /home/tati/go/src/github.com/haccer/subjack/fingerprints.json while running subjack.

ttmyst commented 6 years ago

@madaratech thank you! it works with -c flag Stranger things :)

jdonsec commented 6 years ago

I'm having the same issue on Ubuntu 18.0.4 with go version go1.11.2 linux/amd64

"open /src/github.com/haccer/subjack/fingerprints.json: no such file or directory"

I can confirm file and directory exists on my system.

haccer commented 6 years ago

Thanks, I will look into this possibly tomorrow @jdonsec @ttmyst.

haccer commented 6 years ago

It’s possible this is happening because the environment variable GOPATH is not set.

jdonsec commented 6 years ago

@haccer this is what I have at the end of file for ~/ .profile

export GOPATH=$HOME/work export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

SabunMacTavish commented 5 years ago

I faced the same problem, workaround is to use -c AND -v, at the same time.

anonymoustpain commented 5 years ago

The GOPATH variable is not resolving the GOPATH using "os.Getenv("GOPATH")" with the default golang install. For bash, edit ~/.bash_profile

export GOPATH=$HOME/go

Phoenix1112 commented 5 years ago

same problem... i am using go 1.10... gopath is true..

subjack -d twitter.com -c fingerprints.json 2019/04/18 12:34:02 open : no such file or directory

vipzen commented 5 years ago

the -c flag workarounded for me. thanks.

sabeesh03 commented 4 years ago

can't load package: package subjack.go: cannot find package "subjack.go" in any of: /usr/lib/go-1.14/src/subjack.go (from $GOROOT) /home/indira/go/src/subjack.go (from $GOPATH)

neilstuartcraig commented 4 years ago

I have the same issue using subjack on MacOS (10.15.4 Catalina) and Go 1.14.4 via brew. I literally followed the install info and ran go get github.com/haccer/subjack, made a domains file in w.txt and ran ~/go/bin/subjack -w w.txt -a -ssl:

2020/07/15 17:51:03 open /src/github.com/haccer/subjack/fingerprints.json: no such file or directory
2020/07/15 17:51:03 open /src/github.com/haccer/subjack/fingerprints.json: no such file or directory

My $GOPATH is empty, seems that on MacOS via brew that doesn't get set.

I see that I do have ~/go/src/github.com/haccer/subjack/fingerprints.json and using the -c workaround fixes it. Is the issue just the lack of $GOPATH? Maybe worth using a default if that doesn't exist?

EDIT: Just checked and if I export GOPATH=~/go then it works as expected so I think this'd fix the issue on MacOS