projectdiscovery / nuclei

Fast and customizable vulnerability scanner based on simple YAML based DSL.
https://docs.projectdiscovery.io/tools/nuclei
MIT License
20.07k stars 2.46k forks source link

Installation issues on android termux #4184

Closed schooldropout1337 closed 1 year ago

schooldropout1337 commented 1 year ago

Hi PD,

Couldnt install on termux (non-rooted), even using fakeroot [proot -0].

I used

git clone https://github.com/projectdiscovery/nuclei.git; \ cd nuclei/v2; \ make build; \ ./nuclei -version;

and

go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest

termux_installation

schooldropout1337 commented 1 year ago

Hi PD,

i decided to revert to version 2.9.6

and remove epps-percentile from yaml in /cve folder.

command as below

find /data/data/com.termux/files/home/nuclei-templates/http/cves// -type f -name '.yaml' -exec sed -i 's/epss-percentile: [0-9.]+//g' {} \;

But now, another problem with JARM

jarm

ehsandeep commented 1 year ago

@schooldropout1337, it looks like you are running older version of go? what's the go output of go version and you can not use public templates with older versions of nuclei as they include features supported in latest version of nuclei engine.

romanovj commented 1 year ago

Hi PD,

Couldnt install on termux (non-rooted), even using fakeroot [proot -0].

I used

git clone https://github.com/projectdiscovery/nuclei.git; cd nuclei/v2; make build; ./nuclei -version;

and

go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest

termux_installation

you just need to delete everything in go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_other.go

except package permissionutil

schooldropout1337 commented 1 year ago

@schooldropout1337, it looks like you are running older version of go? what's the go output of go version and you can not use public templates with older versions of nuclei as they include features supported in latest version of nuclei engine.

The screeshot above was installation of latest one. Since it causes failure due to redeclarations of checkCurrentUserRoot & checkCurrentUserCapNetRaw in permission_other.go & permission_linux.go, i decided to reinstall version 2.9.6 (which was the previous working version on my android running on termux).

go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@v2.9.6

And i remove the epss-percentile with this command

find /data/data/com.termux/files/home/nuclei-templates/http/cves/*/ -type f -name '*.yaml' -exec sed -i 's/epss-percentile: [0-9.]\+//g' {} \;

to get cve's yaml working as usual.

schooldropout1337 commented 1 year ago

Hi PD, Couldnt install on termux (non-rooted), even using fakeroot [proot -0]. I used git clone https://github.com/projectdiscovery/nuclei.git; cd nuclei/v2; make build; ./nuclei -version; and go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest termux_installation

you just need to delete everything in go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_other.go

except package permissionutil

Ill give it a try. We'll get back to you.

schooldropout1337 commented 1 year ago

Hi PD, Couldnt install on termux (non-rooted), even using fakeroot [proot -0]. I used git clone https://github.com/projectdiscovery/nuclei.git; cd nuclei/v2; make build; ./nuclei -version; and go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest termux_installation

you just need to delete everything in go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_other.go

except package permissionutil

Hi,

I did as you advised

  1. Re-Install go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest
  2. delete everything in go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_other.go , except package permissionutil
  3. Make Build
  4. Got new error ; libc6 or libc6-dev not available for termux
  5. clang version 16.0.6 and go version go1.21.0 android/arm64

make_build

romanovj commented 1 year ago

this was enough for me go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest

~ $ go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest
...
go: downloading github.com/klauspost/compress v1.16.7
go: downloading github.com/gabriel-vasile/mimetype v1.4.2
go: downloading github.com/pierrec/lz4 v2.6.1+incompatible
github.com/projectdiscovery/utils/permission
# github.com/projectdiscovery/utils/permission
go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_other.go:10:6: checkCurrentUserRoot redeclared in this block
        go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_linux.go:16:6: other declaration of checkCurrentUserRoot
go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_other.go:15:6: checkCurrentUserCapNetRaw redeclared in this block
        go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_linux.go:21:6: other declaration of checkCurrentUserCapNetRaw
~ $ chmod 755 -R go
~ $ nano go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_other.go
~ $ go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest        github.com/projectdiscovery/utils/permission

~ $ ls go/bin
nuclei

what's up with your prompt? is it termux environent or termux-chroot?

schooldropout1337 commented 1 year ago

this was enough for me go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest

~ $ go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest
...
go: downloading github.com/klauspost/compress v1.16.7
go: downloading github.com/gabriel-vasile/mimetype v1.4.2
go: downloading github.com/pierrec/lz4 v2.6.1+incompatible
github.com/projectdiscovery/utils/permission
# github.com/projectdiscovery/utils/permission
go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_other.go:10:6: checkCurrentUserRoot redeclared in this block
        go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_linux.go:16:6: other declaration of checkCurrentUserRoot
go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_other.go:15:6: checkCurrentUserCapNetRaw redeclared in this block
        go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_linux.go:21:6: other declaration of checkCurrentUserCapNetRaw
~ $ chmod 755 -R go
~ $ nano go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_other.go
~ $ go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest        github.com/projectdiscovery/utils/permission

~ $ ls go/bin
nuclei

what's up with your prompt? is it termux environent or termux-chroot?

Bro! Saviour!

nuclei_2_9_15

Video Nuclei 2.9.15 on android : https://youtu.be/r9SdUYi1Amk?si=oLjWBm4FD8hwiBwq

Thanks RomanovJ

schooldropout1337 commented 1 year ago

@schooldropout1337, it looks like you are running older version of go? what's the go output of go version and you can not use public templates with older versions of nuclei as they include features supported in latest version of nuclei engine.

Bro, its fixed.

go version go1.21.0 android/arm64

[INF] Nuclei Engine Version: v2.9.15

Video https://youtube.com/shorts/6qBBDyh5MPU?si=QDMp8KCYxYk498ep

Thanks PD

martwale commented 11 months ago

How do i delete, save and exit in step 3 of the video description.

schooldropout1337 commented 11 months ago

How do i delete, save and exit in step 3 of the video description.

vi go/pkg/mod/github.com/projectdiscovery/utils@v0.0.54/permission/permission_other.go

u can use, vi,vim,nano editor in unix.