Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can not install nuclei on a raspberry pi 3 #2747

Closed
codefaztaz opened this issue Oct 21, 2022 · 5 comments · Fixed by projectdiscovery/ratelimit#16
Closed

I can not install nuclei on a raspberry pi 3 #2747

codefaztaz opened this issue Oct 21, 2022 · 5 comments · Fixed by projectdiscovery/ratelimit#16
Assignees
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@codefaztaz
Copy link

codefaztaz commented Oct 21, 2022

Nuclei version:

latest version

Current Behavior:

when I am installing nuclei with the last version of GO I get this error

github.com/projectdiscovery/nuclei/v2/pkg/utils/ratelimit
# github.com/projectdiscovery/nuclei/v2/pkg/utils/ratelimit
bugpi/go/pkg/mod/github.com/projectdiscovery/nuclei/v2@v2.7.8/pkg/utils/ratelimit/ratelimit.go:59:13: cannot use math.MaxInt64 (untyped int constant 9223372036854775807) as int value in struct literal (overflows)
@codefaztaz codefaztaz added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Oct 21, 2022
@jimen0
Copy link
Contributor

jimen0 commented Oct 31, 2022

@codefaztaz Is your OS on the raspberry pi 32 or 64 bit?
if your raspberry OS is 32 bits just deploy a 64 bits one and the project should compile just fine.

.../nuclei/v2/cmd/nuclei (dev) $ GOOS=linux GOARCH=arm64 go build.../nuclei/v2/cmd/nuclei (dev) $ echo $?
0

cc @forgedhallpass this can be reproduced by building nuclei targeting for a 32 bits arm version:

.../nuclei/v2/cmd/nuclei (dev) $ GOOS=linux GOARCH=arm GOARM=7 go build
# github.com/projectdiscovery/ratelimit
/go/pkg/mod/github.com/projectdiscovery/ratelimit@v0.0.0-20221004232058-7b82379157fa/ratelimit.go:59:13: cannot use math.MaxInt64 (untyped int constant 9223372036854775807) as int value in struct literal (overflows)
/go/pkg/mod/github.com/projectdiscovery/ratelimit@v0.0.0-20221004232058-7b82379157fa/ratelimit.go:60:13: cannot use math.MaxInt64 (untyped int constant 9223372036854775807) as int value in struct literal (overflows)

It comes from: https://github.com/projectdiscovery/ratelimit/blob/main/ratelimit.go#L59-L60 which use math.MaxInt64 (constant) on an int field resulting in an overflow as the int field is 32 bits on 32 bit systems.

@forgedhallpass
Copy link
Contributor

Thanks @jimen0 for looking into it.

At first sight it seems that we might have a relevant ticket for it: projectdiscovery/ratelimit#4

@Mzack9999 could you please confirm?

@Mzack9999
Copy link
Member

Mzack9999 commented Nov 23, 2022

@tarunKoyalwar in order to prevent this from happening again, I think we can add a further step to GH actions that install the tool from latest version/commit:

go install github.com/projectdiscovery/nuclei/v2/cmd/nuclei@xxx (xxx => commit/version/latest)

Note: might be already covered by

- name: Installing Nuclei

@tarunKoyalwar
Copy link
Member

go install xx@latest by default uses module mirror ex: https://proxy.golang.org.

[proxy.golang.org](https://proxy.golang.org/) - a module mirror which implements the [module proxy protocol]
(https://golang.org/ref/mod#goproxy-protocol). For users downloading large numbers of modules (e.g. for bulk static 
analysis), the mirror supports a non-standard header, Disable-Module-Fetch: true that instructs it to return only cached
 content. This will avoid slow downloads, at the cost of possibly missing some rarely-used modules.

module mirror cache is refreshed every 30 minutes .

To download latest release one can use

GOPROXY=direct go install github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest

@tarunKoyalwar
Copy link
Member

Future issues similar to this will be fixed by autorelease schedule of ratelimit library

will be closed by projectdiscovery/ratelimit#16

@tarunKoyalwar tarunKoyalwar added the Status: Completed Nothing further to be done with this issue. Awaiting to be closed. label Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants