mushorg / glutton

Generic Low Interaction Honeypot
MIT License
245 stars 58 forks source link

Build error(s) #120

Closed t3chn0m4g3 closed 5 years ago

t3chn0m4g3 commented 5 years ago

The only way I am getting a successful build is firstly by modifying systems.go by removing the following lines ... https://github.com/mushorg/glutton/blob/ae9a03a65585d4fc12926a79d5b6695ac4ee80fb/system.go#L31-L37

... and secondly by following these steps for building:

    export GOPATH=/opt/go/ && \
    go get -d github.com/mushorg/glutton && \
    cd /opt/go/src/github.com/satori/ && \
    rm -rf go.uuid && \
    git clone https://github.com/satori/go.uuid && \
    cd go.uuid && \
    git checkout v1.2.0 && \
    mv /root/dist/system.go /opt/go/src/github.com/mushorg/glutton/ && \
    cd /opt/go/src/github.com/mushorg/glutton/ && \
    make build && \

... or I am getting the following build error:

# github.com/mushorg/glutton
./system.go:36:57: g.processor.Connections.Length undefined (type *freki.connTable has no field or method Length)
make: *** [Makefile:14: build] Error 2

Also if I do not use go.uuid from Satori in v1.2.0 the following error comes up (@glaslos Thanks for your support to use v1.2.0 😄):

# github.com/mushorg/glutton/protocols/smb
opt/go/src/github.com/mushorg/glutton/protocols/smb/smb.go:236:18: multiple-value uuid.NewV4() in single-value context

https://github.com/mushorg/glutton/blob/ae9a03a65585d4fc12926a79d5b6695ac4ee80fb/protocols/smb/smb.go#L236

glaslos commented 5 years ago

Which version of Go are you using? I'd recommend to use 1.11 I assume there are some issues in the go.mod file. Try to do a go get ...@version to force a certain version of a go packet you need to use. I will try to look into it as well.

t3chn0m4g3 commented 5 years ago

I am using 1.11.4 on Alpine: https://pkgs.alpinelinux.org/package/edge/community/x86/go

Thanks for the tip and support, will try :bowtie:

w00dbury commented 5 years ago

I created a pull request that addresses these two issues. Give it a try and let me know if it needs any adjustments.

w00dbury commented 5 years ago

I just got it to build properly without modifications. As such I closed my PR.

git clone https://github.com/mushorg/glutton.git
cd glutton
make build

When you use go get the modules don't download the proper version because by default it wont kick in when using $GOPATH. This is also how Travis CI appears to be doing it.

@glaslos maybe we can update the readme to reflect?

t3chn0m4g3 commented 5 years ago

@w00dbury - Thanks for the update. Build works perfectly fine.

@glaslos - For the time being, this should be reflected in the README.